Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

NPV

Net Present Value


Description

Calculates the net present value for a series of cash flows, and provides a time diagram of the cash flows.

Usage

NPV(cf0,cf,times,i,plot=FALSE)

Arguments

cf0

cash flow at period 0

cf

vector of cash flows

times

vector of the times for each cash flow

i

interest rate per period

plot

tells whether or not to plot the time diagram of the cash flows

Details

NPV=cf0-∑_{k=1}^n\frac{cf_k}{(1+i)^{times_k}}

Value

The NPV.

Note

The periods in t must be positive integers.

The lengths of cf and t must be equal.

See Also

Examples

NPV(cf0=100,cf=c(50,40),times=c(3,5),i=.01)

NPV(cf0=100,cf=50,times=3,i=.05)

NPV(cf0=100,cf=c(50,60,10,20),times=c(1,5,9,9),i=.045)

FinancialMath

Financial Mathematics for Actuaries

v0.1.1
GPL-2
Authors
Kameron Penn [aut, cre], Jack Schmidt [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.