变化现金流净现值NPV计算之pvvar函数
(2012-10-30 18:04:25)
标签:
财经 |
分类: matlab与金融分析 |
pvvar Present value of varying
cash flow.
pvvar
returns the net present value of a cash flow given the periodic
interest rate.
PV =
pvvar(CF, RATE)
PV =
pvvar(CF, RATE, DF)
Optional
Inputs: DF
Inputs:
CF - A vector of varying cash flows. Include the
initial investment as the initial cash flow value (a negative
number). If CF is a matrix, each column is treated
as a separate cash-flow stream.
RATE - Periodic interest rate.
Enter as a decimal fraction. If CF is a matrix, a
scalar RATE is allowed when the same rate applies to all cash-flow
streams in CF. When multiple cash-flow
stream require different discount rates, RATE must
be a vector whose length equals the number of
columns in CF.
Optional
Inputs:
DF - A vector of serial date numbers or date
strings on which the cash flows occur. Specify DF
when there are irregular (nonperiodic) cash flows.
The default assumes CF contains regular (periodic)
cash flows. If CF is a matrix and all cash-flow
streams share the same dates, DF can be a vector
whose length matches the number of rows in CF.
Specify DF as a matrix of the same size as CF when
different cash-flow streams have different payment dates.
Outputs:
PV - The net present value of a varying cash
flow.
*************************************************************************************************
Example:
Suppose an initial investment of
$10,000 is made. The following cash flow
represents the yearly income realized by the investment. The
annual discount rate is 8%.
Year 1
$2000
Year 2
$1500
Year
3 $3000
Year 4
$3800
Year 5
$5000
To calculate the net present value of the periodic cash flow do
the following (Note that the original investment
payment is included as the first cash flow
value):
pv = pvvar([-10000 2000 1500 3000 3800 5000], .08)
pv =
1715.39
Suppose an investment of $10,000
returns the following series of cash flows at a
discount rate of 9%.
Cash Flow Dates
--------- -----------------
-10000 January 12, 1987
2500 February 14, 1988
2000 March 3, 1988