Learn R Programming

lifecontingencies (version 1.3.12)

presentValue: Present value of a series of cash flows.

Description

This function evaluates the present values of a series of cash flows, given occurrence time. Probabilities of occurrence can also be taken into account.

Usage

presentValue(cashFlows, timeIds, interestRates, probabilities,power=1)

Value

A numeric value representing the present value of cashFlows vector, or the actuarial present value if probabilities are provided.

Arguments

cashFlows

Vector of cashFlow, must be coherent with timeIds

timeIds

Vector of points of time where cashFlows are due.

interestRates

A numeric value or a time-size vector of interest rate used to discount cahs flow.

probabilities

Optional vector of probabilities.

power

Power to square discount and cash flows. Default is set to 1

Author

Giorgio A. Spedicato

Warning

The function is provided as is, without any guarantee regarding the accuracy of calculation. The author disclaims any liability for eventual losses arising from direct or indirect use of this software.

Details

probabilities is optional, a sequence of 1 length of timeIds is assumed. Interest rate shall be a fixed number or a vector of the same size of timeIds. power parameters is generally useless beside life contingencies insurances evaluations.

References

Broverman, S.A., Mathematics of Investment and Credit (Fourth Edition), 2008, ACTEX Publications.

See Also

annuity, axn

Examples

Run this code
 #simple example
 cf=c(10,10,10)	#$10 of payments one per year for three years
 t=c(1,2,3) #years
 p=c(1,1,1) #assume payments certainty
 #assume 3% of interest rate
presentValue(cashFlows=cf, timeIds=t, interestRates=0.03, probabilities=p)

Run the code above in your browser using DataLab