PV Function
calculates the present value of a vector of cash flows and returns a scalar
- PV( times,flows,freq,rates)
The PV function returns a scalar containing the present value of the cash flows based on the specified frequency and rates.
- times
- is an n ×1 column vector of times.
Elements should be non-negative.
- flows
- is an n ×1 column vector of cash flows.
- freq
- is a scalar that represents the base of the rates
to be used for discounting the cash flows.
If positive, it represents discrete compounding
as the reciprocal of the number of compoundings.
If zero, it represents continuous compounding.
If -1, it represents per-period discount factors.
No other negative values are allowed.
- rates
- is an n ×1 column vector of rates
to be used for discounting the cash flows.
Elements should be positive.
A general present value relationship can be written as

where P is the present value of the asset,
{c(k)}k = 1, ... ,K is the
sequence of cash flows from the asset, tk is the time to the
k-th cash flow in periods from the present, and
D(t) is the discount function for time t.
With per-unit-time-period discount factors dt:
-
D(t) = dtt
With continuous compounding:

With discrete compounding:
-
D(t) = (1+fr)-t/f
where f > 0 is the frequency, the reciprocal of the number of
compoundings per unit time period.
The following code presents an example of the PV function:
timesn=T(do(1,100,1));
flows=repeat(10,100);
freq=50;
rate=repeat(0.10,100);
pv=pv(timesn,flows,freq,rate);
print pv;
The result is
PV
266.4717
Copyright © 2000 by SAS Institute Inc., Cary, NC, USA. All rights reserved.