function PresentValue(const Rate: Extended; NPeriods: Integer; const Payment: Extended; const FutureValue: Extended; PaymentTime: TPaymentTime): Extended;
long double __fastcall PresentValue(long double Rate, int NPeriods, long double Payment, long double FutureValue, Math::TPaymentTime PaymentTime);
Calculates the present value of an investment.
PresentValue calculates the present value of an investment where Payment is received for NPeriods and is discounted at the rate of Rate per period. FutureValue is the value the investment may reach at some point. PaymentTime indicates whether the cash flows occur at the beginning or end of the period.