npv: NPV – Net Present Value

View source: R/npv.R

npvR Documentation

NPV – Net Present Value

Description

Discounted value of future cash flows; the date of the first cash flow is considered as origin.

Usage

npv(
  irate,
  cashflows,
  dates,
  method = "compound",
  convention = "ACT/365",
  silent = FALSE
)

Arguments

irate

Interest rate per annum. Either a scalar value, or vector.

cashflows

Cash flows, as a vector.

dates

Value dates for the cashflows vector.

method

Compound or simple interest? Default is compound.

convention

Interest rate convention; default is "ACT/365".

silent

Should warning messages be suppressed? Default is no.

Value

Net present value of future cash flows

See Also

dcf

Examples

one_thousand <- npv(
  irate = 10 / 100, # i.e. 10% p.a.
  dates = as.Date(c("2019-01-01", "2020-01-01")), # i.e. one year
  cashflows = c(0, 1100)
)

cat(one_thousand)


jla-data/TVM documentation built on Feb. 3, 2024, 8:48 p.m.