Language Reference

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 x 1 column vector of times. Elements should be nonnegative.
flows
is an n x 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 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 n x 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
p=\sum_{k=1}^k c(k) d(t_k)
where p is the present value of the asset, \{c(k)\}k=1, ... ,k is the sequence of cash flows from the asset, t_k is the time to the kth cash flow in periods from the present, and d(t) is the discount function for time t.
With per-unit-time-period discount factors d_t:
d(t) = d_t^t
With continuous compounding:
   d(t) = e^{-r_t t}
With discrete compounding:
d(t) = (1+fr)^{-t/f}
where f \gt 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:

  
     data a; 
       pv=mort(.,438.79,.10/12,30*12); 
     run; 
  
     proc print data=a; 
     run; 
  
     /*  Use PROC IML 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; 
     quit;
 
The result is as follows:
  
     Obs       pv 
  
      1     50000.48 
  
         pv 
  
      50000.48 
  
         pv 
  
      50000.48
 

Previous Page | Next Page | Top of Page