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 supported cohort.
- getCurrentRate / getRateForCohort / getRateTable — rate lookups that mirror the IGCP-published methodology.
For a single discriminated result instead of try/catch, use the
non-throwing safeSimulate, safeSimulatePortfolio,
safeSimulateRedemption, safeGetCurrentRate,
safeGetRateForCohort, and safeGetRateTable entry points
(SafeResult).
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
Seção intitulada “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
Seção intitulada “Interfaces”- CohortRateInput
- CohortRateResult
- CohortTaxYearRollup
- CurrentRateInput
- MonthlyBaseRate
- PortfolioResult
- PortfolioSeriesBreakdown
- PortfolioSubscription
- PortfolioTaxYearRollup
- PremiumTier
- PremiumTierAnnualRate
- RateEntry
- RateTableInput
- RedemptionInput
- RedemptionResult
- ScheduleRow
- SeriesMetadata
- SimulateInput
- SimulatePortfolioInput
- SimulateResult
- TaxYearRollup
- TaxYearRollupFromScheduleInput
- TaxYearRollupInput
Type Aliases
Seção intitulada “Type Aliases”Variables
Seção intitulada “Variables”Functions
Seção intitulada “Functions”- annualRatesByPremiumTier
- getCurrentRate
- getPortfolioTaxYearRollup
- getRateForCohort
- getRateTable
- getSeries
- getTaxYearRollup
- getTaxYearRollupFromSchedule
- listSeries
- rollupTaxYears
- rollupTaxYearsFromPortfolio
- rollupTaxYearsFromSchedule
- safeGetCurrentRate
- safeGetRateForCohort
- safeGetRateTable
- safeGetTaxYearRollup
- safeRollupTaxYears
- safeRollupTaxYearsFromPortfolio
- safeSimulate
- safeSimulatePortfolio
- safeSimulateRedemption
- simulate
- simulatePortfolio
- simulateRedemption