cashflows - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Finance

 cashflows
 present value of a list of cash flows

 Calling Sequence cashflows(flows, rate)

Parameters

 flows - list of cash flows, one per period, starting at period = 1 rate - interest rate per period

Description

 • The function cashflows computes the present value of a list of cash flows. The flows are given one per period, starting at period 1.
 • Since cashflows used to be part of the (now deprecated) finance package, for compatibility with older worksheets, this command can also be called using finance[cashflows]. However, it is recommended that you use the superseding package name, Finance, instead: Finance[cashflows].

Examples

I will receive 100 units, 200 units and 50 units at the end of this year, and at the end of the next 2 years. If the discount rate is 10%, this is equivalent to receiving immediately the amount of:

 > $\mathrm{with}\left(\mathrm{finance}\right):$
 > $\mathrm{cashflows}\left(\left[100,200,50\right],0.1\right)$
 ${293.7640872}$ (1)

If these cash flows are generated from an initial investment of 95 units, the net present value is

 > $-95+\mathrm{cashflows}\left(\left[100,200,50\right],0.1\right)$
 ${198.7640872}$ (2)

Since the net present value (npv) is positive, the project would be accepted on that basis.

What is the internal rate of return?

 > $\mathrm{npv}≔-95+\mathrm{cashflows}\left(\left[100,200,50\right],r\right)$
 ${\mathrm{npv}}{≔}{-}{95}{+}\frac{{100}}{{r}{+}{1}}{+}\frac{{200}}{{\left({r}{+}{1}\right)}^{{2}}}{+}\frac{{50}}{{\left({r}{+}{1}\right)}^{{3}}}$ (3)
 > $\mathrm{fsolve}\left(\mathrm{npv}=0,r,0..2\right)$
 ${1.147236683}$ (4)

The internal return is 115%. Since this is bigger than the discount rate the project would be also be accepted on the IRR basis. One can see the npv versus rate by plotting

 > $\mathrm{plot}\left(\mathrm{npv},r=0..2\right)$

It is prudent to do this plotting, since it is possible to have multiple solutions to the IRR relationship (npv=0).

Compatibility

 • The Finance[cashflows] command was introduced in Maple 15.
 • For more information on Maple 15 changes, see Updates in Maple 15.