igcp-aforro
Public entry point for the igcp-aforro library.
Re-exports every supported value and type with named exports only —
there is no default export so consumers (and starlight-typedoc) get a
stable, tree-shakable API surface.
The two main calls are:
- simulate — quarterly-compounding simulator for a Série F cohort.
- getCurrentRate / getRateForCohort / getRateTable — rate lookups that mirror the IGCP-published methodology.
Money and rate values returned by this library are decimal strings (not
JS numbers) so callers can JSON-serialize them without precision loss;
see the per-type docs for the exact format.
Example
Section titled “Example”import { simulate, Series } from 'igcp-aforro';
const result = simulate({ series: Series.F, subscriptionDate: '2024-03-15', units: 1000,});
console.log(result.currentValueNet); // e.g. "1078.42"Interfaces
Section titled “Interfaces”- CohortRateInput
- CohortRateResult
- CurrentRateInput
- MonthlyBaseRate
- PremiumTier
- RateEntry
- RateTableInput
- ScheduleRow
- SeriesMetadata
- SimulateInput
- SimulateResult