irr: IRR – Internal Rate of Return

View source: R/irr.R

irrR Documentation

IRR – Internal Rate of Return

Description

Rate at which all cashflows will be discounted to exactly zero.

Usage

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

Arguments

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

IRR as a fraction, per annum basis; recognized interval is -50% – +150% p.a.

See Also

npv, dcf

Examples

irr(
  dates = as.Date(c("2019-01-01", "2020-01-01")),
  cashflows = c(-1000, 1100)
)


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