Previous Page | Next Page

Language Reference

PV Function

PV( times,flows,freq,rates ) ;

The PV function returns a scalar that contains the present value of the cash flows based on the specified frequency and rates.

The arguments to the function are as follows:

times

is an column vector of times. Elements should be nonnegative.

flows

is an 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 per period. If zero, it represents continuous compounding. If -1, the rates represent per-period discount factors. No other negative values are accepted.

rates

is an 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 is the present value of the asset, is the sequence of cash flows from the asset, is the time to the th cash flow in periods from the present, and is the discount function for time .
With per-unit-time-period discount factors :

     

With continuous compounding:

     

With discrete compounding:

     

where is the frequency, the reciprocal of the number of compoundings per unit time period.

The following statements present an example of the PV function:

    data a;
      pv = mort(.,438.79,.10/12,30*12);
    run;

    proc print data=a;
    run;

    /*  Use PV function to compute PV.     */
    proc iml;

    /*  If rate is specified as annual rate divided */
    /*  by 12 and FREQ=1, then results are equal    */
    /*  to those computed by the MORT function.     */

    timesn = t(do(1, 360, 1));
    flows = repeat(438.79, 360);
    rate = repeat(.10/12, 360);
    freq = 1;
    pv = pv(timesn, flows, freq, rate);
    print pv;

    /*  If rate is specified as annual rate, then   */
    /*  the cash flow TIMES need to be specified    */
    /*  in 1/12 increments and the FREQ=1/12. This  */
    /*  specification returns the same result as    */
    /*  the MORT function and the previous PV run.  */
  
    timesn = t(do(1/12, 30, 1/12));
    flows = repeat(438.79, 360);
    rate = repeat(.10, 360);       /* specify annual rate  */
    freq = 1/12;  /* 12 compoundings annually:  freq=1/12  */
    pv = pv(timesn, flows, freq, rate);
    print pv;

The result is as follows:

    Obs       pv

     1     50000.48

        pv

     50000.48

        pv

     50000.48
Previous Page | Next Page | Top of Page