lib/finance/annuity.rb
def present_value(rate,nper,pmt,fv=0,type = 0)
      #present value of the payments
      pv = pmt * pv_compounding(rate,nper)
      
    end
##
# Determine the present value of an asset with 
# reguar payments
# rate - interest rate / period
# nper - number of periods or duration
# pmt - per period contribution
# fv - future value
# type - 
#     0:  end of period payments (ordinary annuity)
#     1:  beginning of period payments (annuity due)
#
Determine the present value of an asset with
reguar payments
rate - interest rate / period
nper - number of periods or duration
pmt - per period contribution
fv - future value
type
0:  end of period payments (ordinary annuity)
1:  beginning of period payments (annuity due)
Determine the present value of an asset with reguar payments rate - interest rate / period nper - number of periods or duration pmt - per period contribution fv - future value type 0 : end of period payments ( ordinary annuity ) 1 : beginning of period payments ( annuity due )
def present_value(rate,nper,pmt,fv=0,type = 0)
      pv = pmt * pv_compounding(rate,nper)
    end
def present_value ( rate , nper , pmt , fv = 0 , type = 0 ) pv = pmt * pv_compounding ( rate , nper ) end
Determine the present value of an asset with
reguar payments
rate - interest rate / period
nper - number of periods or duration
pmt - per period contribution
fv - future value
type 
0:  end of period payments (ordinary annuity)
1:  beginning of period payments (annuity due)
Determine the present value of an asset with reguar payments rate - interest rate / period nper - number of periods or duration pmt - per period contribution fv - future value type 0 : end of period payments ( ordinary annuity ) 1 : beginning of period payments ( annuity due )
#present value of the payments
rate
nper
pmt
fv
type