/** * Result of IRR calculation */ export interface IRRResult { rate: number; iterations: number; method: 'newton-raphson' | 'bisection'; } /** * Calculate IRR using Damped Newton-Raphson method with step size limiting and backtracking * * This is a robust implementation that includes: * - Step size limiting to prevent divergence * - Damping factor for stability * - Backtracking line search * - Automatic fallback triggers * * @param cashFlows - Array of cash flows * @param timePeriods - Array of time periods in years * @param initialRate - Initial guess for discount rate * @param maxIterations - Maximum number of iterations * @param tolerance - Convergence tolerance * @returns IRR result with rate, iterations, and method used * @throws Error if convergence fails or derivative becomes too small */ export declare function calculateIRRWithNewtonRaphson(cashFlows: number[], timePeriods: number[], initialRate: number, maxIterations: number, tolerance: number): IRRResult;