30 $type = FinancialConstants::PAYMENT_END_OF_PERIOD
45 return $e->getMessage();
49 if ($interestRate != 0.0) {
50 return (-$futureValue - $presentValue * (1 + $interestRate) ** $numberOfPeriods) /
51 (1 + $interestRate *
$type) / (((1 + $interestRate) ** $numberOfPeriods - 1) / $interestRate);
54 return (-$presentValue - $futureValue) / $numberOfPeriods;
78 $type = FinancialConstants::PAYMENT_END_OF_PERIOD
95 return $e->getMessage();
99 if ($period <= 0 || $period > $numberOfPeriods) {
113 return $interestAndPrincipal->principal();
static validatePresentValue($presentValue)
static validateRate($rate)
static annuity( $interestRate, $numberOfPeriods, $presentValue, $futureValue=0, $type=FinancialConstants::PAYMENT_END_OF_PERIOD)
PMT.
static validatePeriodType($type)
static validateFutureValue($futureValue)
static interestPayment( $interestRate, $period, $numberOfPeriods, $presentValue, $futureValue=0, $type=FinancialConstants::PAYMENT_END_OF_PERIOD)
PPMT.
static validateInt($value)
static flattenSingleValue($value='')
Convert an array to a single scalar value by extracting the first element.