Skip to content

simulate

function simulate(input, options?): SimulateResult;

Defined in: core/calculator.ts:114

Simulates the value of an IGCP Aforro Série F certificate for a given cohort up to asOfDate (defaults to today, UTC).

Returns the capitalized totals plus, when the as-of date falls between two quarterly capitalizations, the gross interest accrued (pro-rated by calendar days) since the last capitalization. The returned units echoes the input principal — every other amount is a banker’s-rounded decimal string so callers can JSON-serialize without precision loss.

When includeSchedule is true, every completed quarter is materialized in SimulateResult.schedule with the rate components, gross / IRS / net interest, and the running balance after capitalization.

ParameterType
inputSimulateInput
optionsSimulateOptions

SimulateResult

when input fails Zod validation, when the bundled Euribor 3M dataset cannot resolve the base rate for any quarter the loop must process (including the in-flight quarter when computing accrued), or when the resolved series has no premium tier for the contract year.