Function to calculate present value of annuities-certain.
Usage
annuity(i, n,m=1,type = "immediate")
Arguments
i
Effective interest rate expressed in decimal form. E.g. 0.03 means 3%. It can be a vector of interest rates of the same length
of periods. If i = infinity then it returns the value of a perpetuity.
n
Number of payments.
m
Frequency of payments. A payment of $m^-1$ is supposed to be performed at the end of each due
date.
type
A string, either "immediate" or "due".
Value
A string, either "immediate" or "due".
Details
This function calculates the present value of a stream of fixed payments separated by equal interval of time. Annuity immediate has the
fist payment at time t=0, while an annuity due has the first payment at time t=1.
References
Broverman, S.A., Mathematics of Investment and Credit (Fourth Edition),
2008, ACTEX Publications.