irr2: Computing IRR, the internal rate of return

Description Usage Arguments See Also Examples

Description

This function is the same as irr but can calculate negative value. This function may take a very long time. You can use larger cutoff and larger step to get a less precision irr first. Then based on the result, change from and to, to narrow down the interval, and use a smaller step to get a more precision irr.

Usage

1
irr2(cf, cutoff = 0.1, from = -1, to = 10, step = 1e-06)

Arguments

cf

cash flow,the first cash flow is the initial outlay

cutoff

threshold to take npv as zero

from

smallest irr to try

to

largest irr to try

step

increment of the irr

See Also

irr

Examples

1
2
# irr2(cf=c(-5, 1.6, 2.4, 2.8))
# irr2(cf=c(-200, 50, 60, -70, 30, 20))

Example output



FinCal documentation built on May 2, 2019, 1:29 p.m.