rate: effective annual interest rate
nper: number of periods
pv: present value
fv: future value
type: payment type
PMT calculates the payment amount for an annuity.
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.