rate: effective interest rate per period
nper: number of periods
pmt: payment at each period
fv: future value
type: payment type
PV calculates the present value of fv which is nper periods into the future, assuming a periodic payment of pmt and an interest rate of rate per period.
If type is 0, the default, payment is at the end of each period. If type is 1, payment is at the beginning of each period.