npv {jrvFinance} | R Documentation |
Net Present Value
Description
Computes NPV (Net Present Value) for cash flows with different cash flow and compounding conventions. Cash flows need not be evenly spaced.
Usage
npv(
cf,
rate,
cf.freq = 1,
comp.freq = 1,
cf.t = seq(from = if (immediate.start) 0 else 1/cf.freq, by = 1/cf.freq, along.with =
cf),
immediate.start = FALSE
)
Arguments
cf |
Vector of cash flows |
rate |
The interest rate in decimal (0.10 or 10e-2 for 10%) |
cf.freq |
Frequency of annuity payments: 1 for annual, 2 for semi-annual, 12 for monthly. |
comp.freq |
Frequency of compounding of interest rates: 1 for annual, 2 for semi-annual, 12 for monthly, Inf for continuous compounding. |
cf.t |
Optional vector of timing (in years) of cash flows. If omitted regular sequence of years is assumed. |
immediate.start |
Logical variable which is |