irr2 {FinCal}R Documentation

Computing IRR, the internal rate of return

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

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

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

[Package FinCal version 0.6.3 Index]