NPV: Net Present Value

Description Usage Arguments Details Value Note See Also Examples

Description

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

Usage

1
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

IRR

Examples

1
2
3
4
5
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 documentation built on May 1, 2019, 11:16 p.m.