;roi: rephrase IRR solver errors a bit

This commit is contained in:
Dmitry Astapov 2025-12-27 16:15:46 +00:00 committed by Simon Michael
parent 1c37dc44a7
commit edfea86656

View File

@ -306,9 +306,9 @@ internalRateOfReturn styles showCashFlow prettyTables (OneSpan begin end valueBe
(0.000000000001,10000)
(interestSum end totalCF) of
Root rate -> return ((rate-1)*100)
NotBracketed -> error' $ "Error (NotBracketed): No solution for Internal Rate of Return (IRR).\n"
NotBracketed -> error' $ "Equation for Internal Rate of Return (IRR) can not be solved.\n"
++ " Possible causes: IRR is huge (>1000000%), balance of investment becomes negative at some point in time."
SearchFailed -> error' $ "Error (SearchFailed): Failed to find solution for Internal Rate of Return (IRR).\n"
SearchFailed -> error' $ "Equation for Internal Rate of Return (IRR) can not be solved.\n"
++ " Either search does not converge to a solution, or converges too slowly."
type CashFlow = [(Day, MixedAmount)]