atoti.finance.irr(Return the Internal Rate of Return based on the underlying cash flows and market values. The IRR is the rate that nullifies the Net Present Value: With:
*,
cash_flows: VariableMeasureConvertible,
market_value: VariableMeasureConvertible,
date: Hierarchy,
precision: float =0.001,
period: Literal[‘annualized’, ‘total’] ='total',
guess: float | None =None,
) → MeasureDefinition
- the total number of days since the beginning
- the number of days since the beginning for date
- the unit period in days in which the rate is expressed
- the enhanced cashflow for date
- CF of the first day is the opposite of the market value for this day: .
- CF of the last day is increased by the market value for this day: .
- Otherwise CF is the input cash flow: .
Parameters
cash_flows
The measure representing the cash flows.market_value
The measure representing the market value, used to enhanced the cashflows first and last value. If the cash flows don’t need to be enhanced then0 can be used.
date
The date hierarchy. It must have a single date level.precision
The precision of the IRR value.period
Unit period in which to express the rate.annualized: The measure evaluates to a rate as a percentage per 365-day period, i.e. .total: The measure evaluates to a rate over the entire date range, i.e. .
guess
Estimated value of the IRR, used when the default guesses do not converge to a solution.See also:
The IRR Wikipedia page.