@railpath/finance-toolkit
Version:
Production-ready finance library for portfolio construction, risk analytics, quantitative metrics, and ML-based regime detection
17 lines (16 loc) • 792 B
TypeScript
import { IRRResult } from './calculateIRRWithNewtonRaphson';
/**
* Calculate IRR using Bisection method (robust fallback)
*
* Bisection is a robust root-finding method that guarantees convergence
* if a sign change exists in the interval. It's slower than Newton-Raphson
* but more stable for difficult cases.
*
* @param cashFlows - Array of cash flows
* @param timePeriods - Array of time periods in years
* @param maxIterations - Maximum number of iterations
* @param tolerance - Convergence tolerance
* @returns IRR result with rate, iterations, and method used
* @throws Error if no sign change found in reasonable interval
*/
export declare function calculateIRRWithBisection(cashFlows: number[], timePeriods: number[], maxIterations: number, tolerance: number): IRRResult;