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S;1Ф 3?Aov "r.^k;92_^kZYbH&5l-3WGrlX8dZ ųmhqokMqcYd߯{p\X6u`8F. ]s&QδcWži-ibdIN;qc6fRK*ǛtQӮ>>Nhx%]aIMpnT(Jj_7:i*5b9& +t0?+.mN1ia* RAU*UP.Y!<{/G0jS {Ej f m\yi ɭ>~ F0Ů'nuk=//n[4oM %f=p Djh`#UI6'Rct26YTSta/-_s6E0f ZoJo 7q西aڳ,6NpZcnKɟ ; E!lñy|J;\@*i k=2E9^T'!?1'W'Tb^w=ڷB/syOg~d6Ju JrQW93sЎu]/ŴHAo$_!jwfŶnl+^|Hp)W;;w2O$TsEY؂3_6xE\e~҅OI^ꏀA˟RAfnSettlementAndMaturity) / 360)); if ($price < 0.0) { return ExcelError::NAN(); } return $price; } /** * TBILLYIELD. * * Returns the yield for a Treasury bill. * * @param mixed $settlement The Treasury bill's settlement date. * The Treasury bill's settlement date is the date after the issue date when * the Treasury bill is traded to the buyer. * @param mixed $maturity The Treasury bill's maturity date. * The maturity date is the date when the Treasury bill expires. * @param mixed $price The Treasury bill's price per $100 face value * * @return float|string */ public static function yield($settlement, $maturity, $price) { $settlement = Functions::flattenSingleValue($settlement); $maturity = Functions::flattenSingleValue($maturity); $price = Functions::flattenSingleValue($price); try { $settlement = FinancialValidations::validateSettlementDate($settlement); $maturity = FinancialValidations::validateMaturityDate($maturity); $price = FinancialValidations::validatePrice($price); } catch (Exception $e) { return $e->getMessage(); } $daysBetweenSettlementAndMaturity = $maturity - $settlement; $daysPerYear = Helpers::daysPerYear( Functions::scalar(DateTimeExcel\DateParts::year($maturity)), FinancialConstants::BASIS_DAYS_PER_YEAR_ACTUAL ); if ($daysBetweenSettlementAndMaturity > $daysPerYear || $daysBetweenSettlementAndMaturity < 0) { return ExcelError::NAN(); } return ((100 - $price) / $price) * (360 / $daysBetweenSettlementAndMaturity); } }