41 $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
47 $basis = ($basis === null)
48 ? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
59 return $e->getMessage();
67 if (!is_numeric($daysBetweenSettlementAndMaturity)) {
69 return $daysBetweenSettlementAndMaturity;
72 return (1 - $price / $redemption) / $daysBetweenSettlementAndMaturity;
104 $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
110 $basis = ($basis === null)
111 ? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
122 return $e->getMessage();
125 if ($investment <= 0) {
130 if (!is_numeric($daysBetweenSettlementAndMaturity)) {
132 return $daysBetweenSettlementAndMaturity;
135 return (($redemption / $investment) - 1) / ($daysBetweenSettlementAndMaturity);
static discount( $settlement, $maturity, $price, $redemption, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)
DISC.
static validatePrice($price)
static validateSecurityPeriod($settlement, $maturity)
static fraction($startDate, $endDate, $method=0)
YEARFRAC.
static validateMaturityDate($maturity)
static validateRedemption($redemption)
static validateSettlementDate($settlement)
static validateFloat($value)
static flattenSingleValue($value='')
Convert an array to a single scalar value by extracting the first element.
static validateBasis($basis)
static interest( $settlement, $maturity, $investment, $redemption, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)
INTRATE.