/* $DOC$ $NAME$ ft_NetPV() $CATEGORY$ Math $ONELINER$ Calculate net present value $SYNTAX$ ft_NetPV( , , ; [, ] ) -> nNetPV $ARGUMENTS$ is the amount of cash invested for purposes of generating the cash flows. is the annual interest rate used to discount expected cash flows (10.5% = 10.5, not .105). is an array of the expected cash receipts each year. is the number of years cash flows are expected (optional, Len( aCashFlow ) ). $RETURNS$ The difference between the initial investment and the discounted cash flow in dollars. $DESCRIPTION$ This function calculates the net present value, the difference between the cost of an initial investment and the present value of the expected cash flow(s) from the investment. The present value of the expected cashflow(s) is calculated at the specified interest rate, which is often referred to as the "cost of capital". This function can be used to evaluate alternative investments. The larger the NPV, the more profitable the investment. See also the FutureValue and PresentValue for further explanations. The formula to calculate the net present value is: NetPresentValue := SUM( CashFlow[ i ] / ( ( 1 + InterestRate ) ^ i ) ) FOR i := 1 TO NoOfCashFlows // NEXT $EXAMPLES$ ? ft_NetPV( 10000, 10, { 10000, 15000, 16000, 17000 } ) $END$ */