The finance developer workbenchSearch the reference Development · 0.1.4 · unpublished

Public API / @insiderfinance/totalfinance

@insiderfinance/totalfinance/fixed-income/lattice

import from '@insiderfinance/totalfinance/fixed-income/lattice'

Every public export in this entry point, including type-only declarations. Search by name or concept.

Jump to an export (10)

BermudanSwaptionResult · BermudanSwaptionSpecification · BondOption · CallableBondResult · CallableBondSpecification · OasAnalyticsResult · OasAnalyticsSpecification · bermudanSwaption · callableBond · oasAnalytics

interface

BermudanSwaptionResult

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export interface BermudanSwaptionResult {
    /** Option value, scaled by `notional`. */
    price: number;
    /** The exercise schedule actually used, sorted ascending from the valuation date. */
    exerciseDates: string[];
    /** Applied conventions and model knobs, echoed (Law 2 report grammar). */
    assumptions: {
        conventionsVersion: string;
        model: 'hull-white';
        dayCount: 'ACT/365F';
        settlementDate: string;
        stepsPerYear: number;
        meanReversion: number;
        sigma: number;
        fixedFrequency: Frequency;
        fixedDayCount: FixedIncomeDayCount;
        notional: number;
    };
    /** Honest computation report: the lattice method behind the price (Law 2 report grammar). */
    diagnostics: Diagnostics;
}
Fields, parameters & returned members (31)
Name / typeMeaning & unitOptional / default
assumptions
{ conventionsVersion: string; dayCount: 'ACT/365F'; fixedDayCount: FixedIncomeDayCount; fixedFrequency: Frequency; meanReversion: number; model: 'hull-white'; notional: number; settlementDate: string; sigma: number; stepsPerYear: number; }
Applied conventions and model knobs, echoed (Law 2 report grammar).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.conventionsVersion
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.dayCount
'ACT/365F'

count (integer)
Required / declared member
No @default declared; consult the signature and description.
assumptions.fixedDayCount
FixedIncomeDayCount

count (integer)
Required / declared member
No @default declared; consult the signature and description.
assumptions.fixedFrequency
Frequency

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.meanReversion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.model
'hull-white'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.notional
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.settlementDate
string

calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
assumptions.sigma
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.stepsPerYear
number

per year (count)
Required / declared member
No @default declared; consult the signature and description.
diagnostics
Diagnostics
Honest computation report: the lattice method behind the price (Law 2 report grammar).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.autoReason
string
When a meta-engine (e.g. `engines.auto()`) selected a delegate, this is a one-sentence, human-readable explanation of WHY that delegate was chosen (`engine` then names the delegate). Absent when no auto-selection took place.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.converged
boolean
Whether an iterative procedure converged. `false` means the value is not trustworthy.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.decomposition
Record<string, number>
Named intermediate quantities the value decomposes into — a par spread's protection leg and risky annuity, a forward variance's near/far legs. The H-series explain paths disclose their arithmetic here so a caller can audit the ratio, not just receive it (3B.3).
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.engine
string
Pricing/solver engine name, e.g. `black-scholes-merton`.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.finiteDifferenceBumps
Record<string, number>
Finite-difference engines: the ACTUAL bump sizes used for FD Greeks (spec P2.3) — adaptive near the vol/time boundaries, so the caller can see exactly what was differenced. Keys: `spotStep`, `volatilityStep`, `timeStepYears`, `rateStep`, and — extended Greeks only — `dividendYieldStep`. Each is the actual step differenced, in the unit of the coordinate it bumps. (This doc named the retired `hS`/`hSig`/`hT`/`hR`/`hQ` keys for one release after the emit sites had moved to the semantic names, so a caller following it read `undefined`.)
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.iterations
number
Iteration count for iterative methods.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.method
string
Numerical method, e.g. `closed-form`, `brent`, `finite-difference`.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.selection
import('@insiderfinance/totalfinance/core/pricing').SelectionReport
The structured engine-selection report (Gate C, `@insiderfinance/totalfinance/core/pricing`): who was selected, why, and — for automatic selection — every candidate considered with its verdict. This is the machine-readable superset of `engine` + `autoReason` (which remain for compatibility); `selected.name` always agrees with `engine` when both are present.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.selection.candidates
readonly import('@insiderfinance/totalfinance/core/pricing').SelectionCandidate[]
Candidates an automatic selection considered; absent for explicit mode.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.selection.mode
'explicit' | 'automatic'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.selection.reason
string
Why the selected engine answers this request.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.selection.selected
{ name: string; version?: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.selection.selected.name
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.selection.selected.version
string

unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.timingMs
number
Wall-clock timing in milliseconds, when measured.
milliseconds
Optional
No @default declared; consult the signature and description.
diagnostics.warmup
number
Series facades: number of leading output slots that are warmup sentinels (null/NaN) while the computation seeds. Equals the input length when the indicator never emitted.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.warnings
import('@insiderfinance/totalfinance/core').QuantWarning[]
Structured warnings; always present (possibly empty).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
exerciseDates
string[]
The exercise schedule actually used, sorted ascending from the valuation date.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
price
number
Option value, scaled by `notional`.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

BermudanSwaptionSpecification

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

// ───────────────────────── Bermudan swaptions ─────────────────────────
export interface BermudanSwaptionSpecification {
    /** Discount/forecast curve (single-curve); its reference date is the valuation date. */
    curve: YieldCurve;
    /** Underlying swap maturity. */
    maturityDate: string;
    /** Fixed rate of the underlying swap. */
    fixedRate: number;
    /** `payer` = option to pay fixed; `receiver` = option to receive fixed. */
    optionType: 'payer' | 'receiver';
    /** Dates on which the holder may exercise into the swap (each is a swap start). */
    exerciseDates: string[];
    /** Fixed-leg frequency (default semiannual). */
    fixedFrequency?: Frequency;
    /** Fixed-leg day count (default `30/360`). */
    fixedDayCount?: FixedIncomeDayCount;
    /** Mean reversion and short-rate vol. */
    meanReversion: number;
    sigma: number;
    notional?: number;
    /** Tree steps per year (default 24, hard outer maximum 1,000,000; total-tree cap may be lower). */
    stepsPerYear?: number;
}
Fields, parameters & returned members (38)
Name / typeMeaning & unitOptional / default
curve
YieldCurve
Discount/forecast curve (single-curve); its reference date is the valuation date.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.addSpread
(spread: YieldCurve) => YieldCurve
Combine with a term-structure spread curve: the continuous zeros ADD at each tenor (equivalently discount factors multiply, `D(t)·D_spread(t)`). Unions both curves' pillar tenors so the spread's shape — not just a level — is preserved. Used to discount over `benchmark + spread` (e.g. OIS + a sector/rating spread) while keeping curve construction out of leaf entrypoints.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.addSpread(spread)
YieldCurve

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.bumpPillar
(index: number, delta: number) => YieldCurve
Bump a single pillar's continuous zero by `delta` (key-rate risk).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.bumpPillar(delta)
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.bumpPillar(index)
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.dayCount
FixedIncomeDayCount

count (integer)
Required / declared member
No @default declared; consult the signature and description.
curve.discount
(at: string | number) => number
Discount factor to a date or year fraction.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.discount(at)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.extrapolation
import('@insiderfinance/totalfinance/fixed-income').CurveExtrapolation

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.forwardRate
(from: string | number, to: string | number, dayCount?: FixedIncomeDayCount) => number
Simple (money-market) forward rate between two times/dates under `dayCount`.
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
curve.forwardRate(dayCount)
FixedIncomeDayCount | undefined

unitless by name
Optional
No @default declared; consult the signature and description.
curve.forwardRate(from)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.forwardRate(to)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.instantaneousForward
(at: string | number) => number
Instantaneous (continuously-compounded) forward rate at a time/date.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.instantaneousForward(at)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.interpolation
import('@insiderfinance/totalfinance/fixed-income').CurveInterpolation

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.pillars
readonly import('@insiderfinance/totalfinance/fixed-income').CurvePillar[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.referenceDate
string

calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
curve.shift
(delta: number) => YieldCurve
Parallel shift of every pillar's continuous zero by `delta` (e.g. +0.0001 = +1bp).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.shift(delta)
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.timeTo
(at: string | number) => number
Year fraction from the reference date to a date (or pass a number through unchanged).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.timeTo(at)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.zeroRate
(at: string | number, compounding?: import('@insiderfinance/totalfinance/core').InterestCompounding) => number
Zero rate to a date or year fraction, in the requested compounding (default continuous).
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
curve.zeroRate(at)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.zeroRate(compounding)
import('@insiderfinance/totalfinance/core').InterestCompounding | undefined

unitless by name
Optional
No @default declared; consult the signature and description.
curve.zeroRate(compounding).periodsPerYear
number

per year (count)
Required / declared member
No @default declared; consult the signature and description.
curve.zeroRate(compounding).type
'periodic'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
exerciseDates
string[]
Dates on which the holder may exercise into the swap (each is a swap start).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
fixedDayCount
FixedIncomeDayCount
Fixed-leg day count (default `30/360`).
count (integer)
Optional
No @default declared; consult the signature and description.
fixedFrequency
Frequency
Fixed-leg frequency (default semiannual).
unitless by name
Optional
No @default declared; consult the signature and description.
fixedRate
number
Fixed rate of the underlying swap.
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
maturityDate
string
Underlying swap maturity.
calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
meanReversion
number
Mean reversion and short-rate vol.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
notional
number

unitless by name
Optional
No @default declared; consult the signature and description.
optionType
'payer' | 'receiver'
`payer` = option to pay fixed; `receiver` = option to receive fixed.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
sigma
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stepsPerYear
number
Tree steps per year (default 24, hard outer maximum 1,000,000; total-tree cap may be lower).
per year (count)
Optional
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

BondOption

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

// ───────────────────────── callable / putable bonds ─────────────────────────
export interface BondOption {
    /** Option date (issuer call / holder put opportunity). */
    date: string;
    /** Strike (clean redemption price per the bond's face value, e.g. 102). */
    price: number;
}
Fields, parameters & returned members (2)
Name / typeMeaning & unitOptional / default
date
string
Option date (issuer call / holder put opportunity).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
price
number
Strike (clean redemption price per the bond's face value, e.g. 102).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

CallableBondResult

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export interface CallableBondResult {
    /** Model dirty price including the embedded option(s). */
    price: number;
    /** Model dirty price of the otherwise-identical straight bond (no embedded options). */
    straightPrice: number;
    /** Value of the embedded option(s): `straightPrice − price` (positive for a callable). */
    optionValue: number;
    /** Effective duration from a ±1bp parallel curve shock (re-trees each side). */
    effectiveDuration: number;
    /** Option-adjusted spread (parallel curve shift repricing the model to `marketPrice`); present only when `marketPrice` is supplied. */
    oas?: number;
    /** Applied conventions and model knobs, echoed (R2). */
    assumptions: {
        conventionsVersion: string;
        dayCount: 'ACT/365F';
        settlementDate: string;
        model: TreeModel;
        stepsPerYear: number;
        meanReversion: number;
        sigma: number;
    };
    /** Honest computation report: the lattice method, and the OAS root-find when one ran (R2). */
    diagnostics: Diagnostics;
}
Fields, parameters & returned members (31)
Name / typeMeaning & unitOptional / default
assumptions
{ conventionsVersion: string; dayCount: 'ACT/365F'; meanReversion: number; model: TreeModel; settlementDate: string; sigma: number; stepsPerYear: number; }
Applied conventions and model knobs, echoed (R2).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.conventionsVersion
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.dayCount
'ACT/365F'

count (integer)
Required / declared member
No @default declared; consult the signature and description.
assumptions.meanReversion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.model
TreeModel

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.settlementDate
string

calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
assumptions.sigma
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.stepsPerYear
number

per year (count)
Required / declared member
No @default declared; consult the signature and description.
diagnostics
Diagnostics
Honest computation report: the lattice method, and the OAS root-find when one ran (R2).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.autoReason
string
When a meta-engine (e.g. `engines.auto()`) selected a delegate, this is a one-sentence, human-readable explanation of WHY that delegate was chosen (`engine` then names the delegate). Absent when no auto-selection took place.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.converged
boolean
Whether an iterative procedure converged. `false` means the value is not trustworthy.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.decomposition
Record<string, number>
Named intermediate quantities the value decomposes into — a par spread's protection leg and risky annuity, a forward variance's near/far legs. The H-series explain paths disclose their arithmetic here so a caller can audit the ratio, not just receive it (3B.3).
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.engine
string
Pricing/solver engine name, e.g. `black-scholes-merton`.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.finiteDifferenceBumps
Record<string, number>
Finite-difference engines: the ACTUAL bump sizes used for FD Greeks (spec P2.3) — adaptive near the vol/time boundaries, so the caller can see exactly what was differenced. Keys: `spotStep`, `volatilityStep`, `timeStepYears`, `rateStep`, and — extended Greeks only — `dividendYieldStep`. Each is the actual step differenced, in the unit of the coordinate it bumps. (This doc named the retired `hS`/`hSig`/`hT`/`hR`/`hQ` keys for one release after the emit sites had moved to the semantic names, so a caller following it read `undefined`.)
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.iterations
number
Iteration count for iterative methods.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.method
string
Numerical method, e.g. `closed-form`, `brent`, `finite-difference`.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.selection
import('@insiderfinance/totalfinance/core/pricing').SelectionReport
The structured engine-selection report (Gate C, `@insiderfinance/totalfinance/core/pricing`): who was selected, why, and — for automatic selection — every candidate considered with its verdict. This is the machine-readable superset of `engine` + `autoReason` (which remain for compatibility); `selected.name` always agrees with `engine` when both are present.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.selection.candidates
readonly import('@insiderfinance/totalfinance/core/pricing').SelectionCandidate[]
Candidates an automatic selection considered; absent for explicit mode.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.selection.mode
'explicit' | 'automatic'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.selection.reason
string
Why the selected engine answers this request.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.selection.selected
{ name: string; version?: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.selection.selected.name
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.selection.selected.version
string

unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.timingMs
number
Wall-clock timing in milliseconds, when measured.
milliseconds
Optional
No @default declared; consult the signature and description.
diagnostics.warmup
number
Series facades: number of leading output slots that are warmup sentinels (null/NaN) while the computation seeds. Equals the input length when the indicator never emitted.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.warnings
import('@insiderfinance/totalfinance/core').QuantWarning[]
Structured warnings; always present (possibly empty).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
effectiveDuration
number
Effective duration from a ±1bp parallel curve shock (re-trees each side).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
oas
number
Option-adjusted spread (parallel curve shift repricing the model to `marketPrice`); present only when `marketPrice` is supplied.
unitless by name
Optional
No @default declared; consult the signature and description.
optionValue
number
Value of the embedded option(s): `straightPrice − price` (positive for a callable).
currency amount (the field or record currency)
Required / declared member
No @default declared; consult the signature and description.
price
number
Model dirty price including the embedded option(s).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
straightPrice
number
Model dirty price of the otherwise-identical straight bond (no embedded options).
currency amount (the field or record currency)
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

CallableBondSpecification

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export interface CallableBondSpecification {
    bond: Bond;
    /** Calibration/discount curve (its reference date is the valuation date). */
    curve: YieldCurve;
    /** Mean reversion and short-rate volatility for the tree model. */
    meanReversion: number;
    sigma: number;
    /** Tree model (default `hull-white`). */
    model?: TreeModel;
    /** Issuer call schedule (caps the bond's value at each strike). */
    calls?: BondOption[];
    /** Holder put schedule (floors the bond's value at each strike). */
    puts?: BondOption[];
    /** Tree steps per year (default 24, hard outer maximum 1,000,000; total-tree cap may be lower). */
    stepsPerYear?: number;
    /** Market dirty price; when given, the result includes the option-adjusted spread. */
    marketPrice?: number;
}
Fields, parameters & returned members (62)
Name / typeMeaning & unitOptional / default
bond
Bond

unitless by name
Required / declared member
No @default declared; consult the signature and description.
bond.accrued
(settlementDate: string, context?: import('@insiderfinance/totalfinance/fixed-income').ProjectionContext) => number
Accrued interest at `settlementDate` (per the bond's face value).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
bond.accrued(context)
import('@insiderfinance/totalfinance/fixed-income').ProjectionContext | undefined

unitless by name
Optional
No @default declared; consult the signature and description.
bond.accrued(context).forecastCurve
YieldCurve
Forecast curve for projecting floating-rate coupons.
unitless by name
Optional
No @default declared; consult the signature and description.
bond.accrued(context).knownFixingRate
number
The index fixing (decimal, e.g. `0.0532` for 5.32%) that ALREADY SET the coupon currently accruing on a floating-rate note — the one whose accrual period began before the forecast curve's reference date. A settled-mid-period FRN has one coupon that is no longer a projection: it was fixed in the past, on a date the curve does not reach. Asking the curve for it is a query before its reference date, which throws. Supply the observed fixing (SOFR/EURIBOR print for that reset) and it is used verbatim for that one coupon; every later coupon still projects off the curve. The note's quoted `spread` is added on top, exactly as for a projected coupon. Only the in-progress coupon is substituted. Coupons that both began AND ended before the curve's reference date are settled history, not projections — one fixing cannot honestly stand in for a whole strip of past resets, so those are rejected rather than fabricated.
decimal rate (0.05 = 5%)
Optional
No @default declared; consult the signature and description.
bond.accrued(context).referenceIndex
(date: string) => number
Price-index level at a date, for inflation-linked indexation.
count (integer)
Optional
No @default declared; consult the signature and description.
bond.accrued(settlementDate)
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
bond.businessDayConvention
import('@insiderfinance/totalfinance/fixed-income').BusinessDayConvention
Business-day convention applied when the payment schedule was generated.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
bond.cashflows
(context?: import('@insiderfinance/totalfinance/fixed-income').ProjectionContext) => import('@insiderfinance/totalfinance/fixed-income').CashFlow[]
Every life cash flow (projected via `context` for FRN/inflation).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
bond.cashflows(context)
import('@insiderfinance/totalfinance/fixed-income').ProjectionContext | undefined

unitless by name
Optional
No @default declared; consult the signature and description.
bond.cashflows(context).forecastCurve
YieldCurve
Forecast curve for projecting floating-rate coupons.
unitless by name
Optional
No @default declared; consult the signature and description.
bond.cashflows(context).knownFixingRate
number
The index fixing (decimal, e.g. `0.0532` for 5.32%) that ALREADY SET the coupon currently accruing on a floating-rate note — the one whose accrual period began before the forecast curve's reference date. A settled-mid-period FRN has one coupon that is no longer a projection: it was fixed in the past, on a date the curve does not reach. Asking the curve for it is a query before its reference date, which throws. Supply the observed fixing (SOFR/EURIBOR print for that reset) and it is used verbatim for that one coupon; every later coupon still projects off the curve. The note's quoted `spread` is added on top, exactly as for a projected coupon. Only the in-progress coupon is substituted. Coupons that both began AND ended before the curve's reference date are settled history, not projections — one fixing cannot honestly stand in for a whole strip of past resets, so those are rejected rather than fabricated.
decimal rate (0.05 = 5%)
Optional
No @default declared; consult the signature and description.
bond.cashflows(context).referenceIndex
(date: string) => number
Price-index level at a date, for inflation-linked indexation.
count (integer)
Optional
No @default declared; consult the signature and description.
bond.couponRate
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
bond.dayCount
FixedIncomeDayCount

count (integer)
Required / declared member
No @default declared; consult the signature and description.
bond.faceValue
number

currency amount (the field or record currency)
Required / declared member
No @default declared; consult the signature and description.
bond.frequency
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
bond.futureCashflows
(settlementDate: string, context?: import('@insiderfinance/totalfinance/fixed-income').ProjectionContext) => import('@insiderfinance/totalfinance/fixed-income').CashFlow[]
Cash flows strictly after `settlementDate` — what a buyer settling then receives.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
bond.futureCashflows(context)
import('@insiderfinance/totalfinance/fixed-income').ProjectionContext | undefined

unitless by name
Optional
No @default declared; consult the signature and description.
bond.futureCashflows(context).forecastCurve
YieldCurve
Forecast curve for projecting floating-rate coupons.
unitless by name
Optional
No @default declared; consult the signature and description.
bond.futureCashflows(context).knownFixingRate
number
The index fixing (decimal, e.g. `0.0532` for 5.32%) that ALREADY SET the coupon currently accruing on a floating-rate note — the one whose accrual period began before the forecast curve's reference date. A settled-mid-period FRN has one coupon that is no longer a projection: it was fixed in the past, on a date the curve does not reach. Asking the curve for it is a query before its reference date, which throws. Supply the observed fixing (SOFR/EURIBOR print for that reset) and it is used verbatim for that one coupon; every later coupon still projects off the curve. The note's quoted `spread` is added on top, exactly as for a projected coupon. Only the in-progress coupon is substituted. Coupons that both began AND ended before the curve's reference date are settled history, not projections — one fixing cannot honestly stand in for a whole strip of past resets, so those are rejected rather than fabricated.
decimal rate (0.05 = 5%)
Optional
No @default declared; consult the signature and description.
bond.futureCashflows(context).referenceIndex
(date: string) => number
Price-index level at a date, for inflation-linked indexation.
count (integer)
Optional
No @default declared; consult the signature and description.
bond.futureCashflows(settlementDate)
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
bond.issueDate
string

calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
bond.kind
import('@insiderfinance/totalfinance/fixed-income').BondKind

unitless by name
Required / declared member
No @default declared; consult the signature and description.
bond.maturityDate
string

calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
bond.schedule
readonly import('@insiderfinance/totalfinance/fixed-income').SchedulePeriod[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
calls
BondOption[]
Issuer call schedule (caps the bond's value at each strike).
unitless by name
Optional
No @default declared; consult the signature and description.
curve
YieldCurve
Calibration/discount curve (its reference date is the valuation date).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.addSpread
(spread: YieldCurve) => YieldCurve
Combine with a term-structure spread curve: the continuous zeros ADD at each tenor (equivalently discount factors multiply, `D(t)·D_spread(t)`). Unions both curves' pillar tenors so the spread's shape — not just a level — is preserved. Used to discount over `benchmark + spread` (e.g. OIS + a sector/rating spread) while keeping curve construction out of leaf entrypoints.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.addSpread(spread)
YieldCurve

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.bumpPillar
(index: number, delta: number) => YieldCurve
Bump a single pillar's continuous zero by `delta` (key-rate risk).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.bumpPillar(delta)
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.bumpPillar(index)
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.dayCount
FixedIncomeDayCount

count (integer)
Required / declared member
No @default declared; consult the signature and description.
curve.discount
(at: string | number) => number
Discount factor to a date or year fraction.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.discount(at)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.extrapolation
import('@insiderfinance/totalfinance/fixed-income').CurveExtrapolation

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.forwardRate
(from: string | number, to: string | number, dayCount?: FixedIncomeDayCount) => number
Simple (money-market) forward rate between two times/dates under `dayCount`.
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
curve.forwardRate(dayCount)
FixedIncomeDayCount | undefined

unitless by name
Optional
No @default declared; consult the signature and description.
curve.forwardRate(from)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.forwardRate(to)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.instantaneousForward
(at: string | number) => number
Instantaneous (continuously-compounded) forward rate at a time/date.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.instantaneousForward(at)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.interpolation
import('@insiderfinance/totalfinance/fixed-income').CurveInterpolation

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.pillars
readonly import('@insiderfinance/totalfinance/fixed-income').CurvePillar[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.referenceDate
string

calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
curve.shift
(delta: number) => YieldCurve
Parallel shift of every pillar's continuous zero by `delta` (e.g. +0.0001 = +1bp).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.shift(delta)
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.timeTo
(at: string | number) => number
Year fraction from the reference date to a date (or pass a number through unchanged).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.timeTo(at)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.zeroRate
(at: string | number, compounding?: import('@insiderfinance/totalfinance/core').InterestCompounding) => number
Zero rate to a date or year fraction, in the requested compounding (default continuous).
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
curve.zeroRate(at)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.zeroRate(compounding)
import('@insiderfinance/totalfinance/core').InterestCompounding | undefined

unitless by name
Optional
No @default declared; consult the signature and description.
curve.zeroRate(compounding).periodsPerYear
number

per year (count)
Required / declared member
No @default declared; consult the signature and description.
curve.zeroRate(compounding).type
'periodic'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
marketPrice
number
Market dirty price; when given, the result includes the option-adjusted spread.
currency amount (the field or record currency)
Optional
No @default declared; consult the signature and description.
meanReversion
number
Mean reversion and short-rate volatility for the tree model.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
model
TreeModel
Tree model (default `hull-white`).
unitless by name
Optional
No @default declared; consult the signature and description.
puts
BondOption[]
Holder put schedule (floors the bond's value at each strike).
unitless by name
Optional
No @default declared; consult the signature and description.
sigma
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stepsPerYear
number
Tree steps per year (default 24, hard outer maximum 1,000,000; total-tree cap may be lower).
per year (count)
Optional
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

OasAnalyticsResult

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export interface OasAnalyticsResult {
    /** Parallel curve shift repricing the callable model to `marketPrice` (decimal; ×1e4 = bps). */
    oas: number;
    /** Zero-volatility spread on the same lattice's straight leg (decimal). */
    zSpread: number;
    /** `zSpread − oas` (decimal) — the embedded-option cost. Positive callable / negative putable. */
    optionCost: number;
    /** OAS-consistent effective duration (curve shocked ±`durationShock` at constant OAS). */
    effectiveDuration: number;
    /** OAS-consistent effective convexity. */
    effectiveConvexity: number;
    /** The no-spread lattice model price (the gap `marketPrice − modelPrice` is what the OAS explains). */
    modelPrice: number;
    marketPrice: number;
    assumptions: CallableBondResult['assumptions'];
    diagnostics: Diagnostics;
}
Fields, parameters & returned members (33)
Name / typeMeaning & unitOptional / default
assumptions
{ conventionsVersion: string; dayCount: 'ACT/365F'; meanReversion: number; model: TreeModel; settlementDate: string; sigma: number; stepsPerYear: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.conventionsVersion
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.dayCount
'ACT/365F'

count (integer)
Required / declared member
No @default declared; consult the signature and description.
assumptions.meanReversion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.model
TreeModel

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.settlementDate
string

calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
assumptions.sigma
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.stepsPerYear
number

per year (count)
Required / declared member
No @default declared; consult the signature and description.
diagnostics
Diagnostics

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.autoReason
string
When a meta-engine (e.g. `engines.auto()`) selected a delegate, this is a one-sentence, human-readable explanation of WHY that delegate was chosen (`engine` then names the delegate). Absent when no auto-selection took place.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.converged
boolean
Whether an iterative procedure converged. `false` means the value is not trustworthy.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.decomposition
Record<string, number>
Named intermediate quantities the value decomposes into — a par spread's protection leg and risky annuity, a forward variance's near/far legs. The H-series explain paths disclose their arithmetic here so a caller can audit the ratio, not just receive it (3B.3).
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.engine
string
Pricing/solver engine name, e.g. `black-scholes-merton`.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.finiteDifferenceBumps
Record<string, number>
Finite-difference engines: the ACTUAL bump sizes used for FD Greeks (spec P2.3) — adaptive near the vol/time boundaries, so the caller can see exactly what was differenced. Keys: `spotStep`, `volatilityStep`, `timeStepYears`, `rateStep`, and — extended Greeks only — `dividendYieldStep`. Each is the actual step differenced, in the unit of the coordinate it bumps. (This doc named the retired `hS`/`hSig`/`hT`/`hR`/`hQ` keys for one release after the emit sites had moved to the semantic names, so a caller following it read `undefined`.)
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.iterations
number
Iteration count for iterative methods.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.method
string
Numerical method, e.g. `closed-form`, `brent`, `finite-difference`.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.selection
import('@insiderfinance/totalfinance/core/pricing').SelectionReport
The structured engine-selection report (Gate C, `@insiderfinance/totalfinance/core/pricing`): who was selected, why, and — for automatic selection — every candidate considered with its verdict. This is the machine-readable superset of `engine` + `autoReason` (which remain for compatibility); `selected.name` always agrees with `engine` when both are present.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.selection.candidates
readonly import('@insiderfinance/totalfinance/core/pricing').SelectionCandidate[]
Candidates an automatic selection considered; absent for explicit mode.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.selection.mode
'explicit' | 'automatic'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.selection.reason
string
Why the selected engine answers this request.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.selection.selected
{ name: string; version?: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.selection.selected.name
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.selection.selected.version
string

unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.timingMs
number
Wall-clock timing in milliseconds, when measured.
milliseconds
Optional
No @default declared; consult the signature and description.
diagnostics.warmup
number
Series facades: number of leading output slots that are warmup sentinels (null/NaN) while the computation seeds. Equals the input length when the indicator never emitted.
unitless by name
Optional
No @default declared; consult the signature and description.
diagnostics.warnings
import('@insiderfinance/totalfinance/core').QuantWarning[]
Structured warnings; always present (possibly empty).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
effectiveConvexity
number
OAS-consistent effective convexity.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
effectiveDuration
number
OAS-consistent effective duration (curve shocked ±`durationShock` at constant OAS).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
marketPrice
number

currency amount (the field or record currency)
Required / declared member
No @default declared; consult the signature and description.
modelPrice
number
The no-spread lattice model price (the gap `marketPrice − modelPrice` is what the OAS explains).
currency amount (the field or record currency)
Required / declared member
No @default declared; consult the signature and description.
oas
number
Parallel curve shift repricing the callable model to `marketPrice` (decimal; ×1e4 = bps).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
optionCost
number
`zSpread − oas` (decimal) — the embedded-option cost. Positive callable / negative putable.
currency amount (the field or record currency)
Required / declared member
No @default declared; consult the signature and description.
zSpread
number
Zero-volatility spread on the same lattice's straight leg (decimal).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

OasAnalyticsSpecification

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

// ───────────────────────── OAS analytics ─────────────────────────
export interface OasAnalyticsSpecification extends Omit<CallableBondSpecification, 'marketPrice'> {
    /** Market dirty price the OAS and Z-spread are solved to. */
    marketPrice: number;
    /** Curve shock for the effective duration/convexity, in decimal. Default 1e-4 (1 bp). */
    durationShock?: number;
    /**
     * Optional term-structure spread curve added to `curve` before the spreads are solved. The effective
     * benchmark becomes `curve` + `spreadCurve` (continuous zeros add ⇔ discount factors multiply), so the
     * reported OAS and Z-spread are measured OVER a NON-FLAT benchmark — e.g. an OIS discount curve plus a
     * sector/rating spread curve — rather than the plain `curve`. Its zero rates ARE the spreads (build one
     * with `curves.fromZeroRates(spreadPillars)`); it must share `curve`'s reference date.
     */
    spreadCurve?: YieldCurve;
}
Fields, parameters & returned members (91)
Name / typeMeaning & unitOptional / default
bond
Bond

unitless by name
Required / declared member
No @default declared; consult the signature and description.
bond.accrued
(settlementDate: string, context?: import('@insiderfinance/totalfinance/fixed-income').ProjectionContext) => number
Accrued interest at `settlementDate` (per the bond's face value).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
bond.accrued(context)
import('@insiderfinance/totalfinance/fixed-income').ProjectionContext | undefined

unitless by name
Optional
No @default declared; consult the signature and description.
bond.accrued(context).forecastCurve
YieldCurve
Forecast curve for projecting floating-rate coupons.
unitless by name
Optional
No @default declared; consult the signature and description.
bond.accrued(context).knownFixingRate
number
The index fixing (decimal, e.g. `0.0532` for 5.32%) that ALREADY SET the coupon currently accruing on a floating-rate note — the one whose accrual period began before the forecast curve's reference date. A settled-mid-period FRN has one coupon that is no longer a projection: it was fixed in the past, on a date the curve does not reach. Asking the curve for it is a query before its reference date, which throws. Supply the observed fixing (SOFR/EURIBOR print for that reset) and it is used verbatim for that one coupon; every later coupon still projects off the curve. The note's quoted `spread` is added on top, exactly as for a projected coupon. Only the in-progress coupon is substituted. Coupons that both began AND ended before the curve's reference date are settled history, not projections — one fixing cannot honestly stand in for a whole strip of past resets, so those are rejected rather than fabricated.
decimal rate (0.05 = 5%)
Optional
No @default declared; consult the signature and description.
bond.accrued(context).referenceIndex
(date: string) => number
Price-index level at a date, for inflation-linked indexation.
count (integer)
Optional
No @default declared; consult the signature and description.
bond.accrued(settlementDate)
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
bond.businessDayConvention
import('@insiderfinance/totalfinance/fixed-income').BusinessDayConvention
Business-day convention applied when the payment schedule was generated.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
bond.cashflows
(context?: import('@insiderfinance/totalfinance/fixed-income').ProjectionContext) => import('@insiderfinance/totalfinance/fixed-income').CashFlow[]
Every life cash flow (projected via `context` for FRN/inflation).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
bond.cashflows(context)
import('@insiderfinance/totalfinance/fixed-income').ProjectionContext | undefined

unitless by name
Optional
No @default declared; consult the signature and description.
bond.cashflows(context).forecastCurve
YieldCurve
Forecast curve for projecting floating-rate coupons.
unitless by name
Optional
No @default declared; consult the signature and description.
bond.cashflows(context).knownFixingRate
number
The index fixing (decimal, e.g. `0.0532` for 5.32%) that ALREADY SET the coupon currently accruing on a floating-rate note — the one whose accrual period began before the forecast curve's reference date. A settled-mid-period FRN has one coupon that is no longer a projection: it was fixed in the past, on a date the curve does not reach. Asking the curve for it is a query before its reference date, which throws. Supply the observed fixing (SOFR/EURIBOR print for that reset) and it is used verbatim for that one coupon; every later coupon still projects off the curve. The note's quoted `spread` is added on top, exactly as for a projected coupon. Only the in-progress coupon is substituted. Coupons that both began AND ended before the curve's reference date are settled history, not projections — one fixing cannot honestly stand in for a whole strip of past resets, so those are rejected rather than fabricated.
decimal rate (0.05 = 5%)
Optional
No @default declared; consult the signature and description.
bond.cashflows(context).referenceIndex
(date: string) => number
Price-index level at a date, for inflation-linked indexation.
count (integer)
Optional
No @default declared; consult the signature and description.
bond.couponRate
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
bond.dayCount
FixedIncomeDayCount

count (integer)
Required / declared member
No @default declared; consult the signature and description.
bond.faceValue
number

currency amount (the field or record currency)
Required / declared member
No @default declared; consult the signature and description.
bond.frequency
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
bond.futureCashflows
(settlementDate: string, context?: import('@insiderfinance/totalfinance/fixed-income').ProjectionContext) => import('@insiderfinance/totalfinance/fixed-income').CashFlow[]
Cash flows strictly after `settlementDate` — what a buyer settling then receives.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
bond.futureCashflows(context)
import('@insiderfinance/totalfinance/fixed-income').ProjectionContext | undefined

unitless by name
Optional
No @default declared; consult the signature and description.
bond.futureCashflows(context).forecastCurve
YieldCurve
Forecast curve for projecting floating-rate coupons.
unitless by name
Optional
No @default declared; consult the signature and description.
bond.futureCashflows(context).knownFixingRate
number
The index fixing (decimal, e.g. `0.0532` for 5.32%) that ALREADY SET the coupon currently accruing on a floating-rate note — the one whose accrual period began before the forecast curve's reference date. A settled-mid-period FRN has one coupon that is no longer a projection: it was fixed in the past, on a date the curve does not reach. Asking the curve for it is a query before its reference date, which throws. Supply the observed fixing (SOFR/EURIBOR print for that reset) and it is used verbatim for that one coupon; every later coupon still projects off the curve. The note's quoted `spread` is added on top, exactly as for a projected coupon. Only the in-progress coupon is substituted. Coupons that both began AND ended before the curve's reference date are settled history, not projections — one fixing cannot honestly stand in for a whole strip of past resets, so those are rejected rather than fabricated.
decimal rate (0.05 = 5%)
Optional
No @default declared; consult the signature and description.
bond.futureCashflows(context).referenceIndex
(date: string) => number
Price-index level at a date, for inflation-linked indexation.
count (integer)
Optional
No @default declared; consult the signature and description.
bond.futureCashflows(settlementDate)
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
bond.issueDate
string

calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
bond.kind
import('@insiderfinance/totalfinance/fixed-income').BondKind

unitless by name
Required / declared member
No @default declared; consult the signature and description.
bond.maturityDate
string

calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
bond.schedule
readonly import('@insiderfinance/totalfinance/fixed-income').SchedulePeriod[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
calls
BondOption[]
Issuer call schedule (caps the bond's value at each strike).
unitless by name
Optional
No @default declared; consult the signature and description.
curve
YieldCurve
Calibration/discount curve (its reference date is the valuation date).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.addSpread
(spread: YieldCurve) => YieldCurve
Combine with a term-structure spread curve: the continuous zeros ADD at each tenor (equivalently discount factors multiply, `D(t)·D_spread(t)`). Unions both curves' pillar tenors so the spread's shape — not just a level — is preserved. Used to discount over `benchmark + spread` (e.g. OIS + a sector/rating spread) while keeping curve construction out of leaf entrypoints.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.addSpread(spread)
YieldCurve

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.bumpPillar
(index: number, delta: number) => YieldCurve
Bump a single pillar's continuous zero by `delta` (key-rate risk).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.bumpPillar(delta)
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.bumpPillar(index)
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.dayCount
FixedIncomeDayCount

count (integer)
Required / declared member
No @default declared; consult the signature and description.
curve.discount
(at: string | number) => number
Discount factor to a date or year fraction.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.discount(at)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.extrapolation
import('@insiderfinance/totalfinance/fixed-income').CurveExtrapolation

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.forwardRate
(from: string | number, to: string | number, dayCount?: FixedIncomeDayCount) => number
Simple (money-market) forward rate between two times/dates under `dayCount`.
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
curve.forwardRate(dayCount)
FixedIncomeDayCount | undefined

unitless by name
Optional
No @default declared; consult the signature and description.
curve.forwardRate(from)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.forwardRate(to)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.instantaneousForward
(at: string | number) => number
Instantaneous (continuously-compounded) forward rate at a time/date.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.instantaneousForward(at)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.interpolation
import('@insiderfinance/totalfinance/fixed-income').CurveInterpolation

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.pillars
readonly import('@insiderfinance/totalfinance/fixed-income').CurvePillar[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.referenceDate
string

calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
curve.shift
(delta: number) => YieldCurve
Parallel shift of every pillar's continuous zero by `delta` (e.g. +0.0001 = +1bp).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.shift(delta)
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.timeTo
(at: string | number) => number
Year fraction from the reference date to a date (or pass a number through unchanged).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.timeTo(at)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.zeroRate
(at: string | number, compounding?: import('@insiderfinance/totalfinance/core').InterestCompounding) => number
Zero rate to a date or year fraction, in the requested compounding (default continuous).
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
curve.zeroRate(at)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
curve.zeroRate(compounding)
import('@insiderfinance/totalfinance/core').InterestCompounding | undefined

unitless by name
Optional
No @default declared; consult the signature and description.
curve.zeroRate(compounding).periodsPerYear
number

per year (count)
Required / declared member
No @default declared; consult the signature and description.
curve.zeroRate(compounding).type
'periodic'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
durationShock
number
Curve shock for the effective duration/convexity, in decimal. Default 1e-4 (1 bp).
unitless by name
Optional
No @default declared; consult the signature and description.
marketPrice
number
Market dirty price the OAS and Z-spread are solved to.
currency amount (the field or record currency)
Required / declared member
No @default declared; consult the signature and description.
meanReversion
number
Mean reversion and short-rate volatility for the tree model.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
model
TreeModel
Tree model (default `hull-white`).
unitless by name
Optional
No @default declared; consult the signature and description.
puts
BondOption[]
Holder put schedule (floors the bond's value at each strike).
unitless by name
Optional
No @default declared; consult the signature and description.
sigma
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
spreadCurve
YieldCurve
Optional term-structure spread curve added to `curve` before the spreads are solved. The effective benchmark becomes `curve` + `spreadCurve` (continuous zeros add ⇔ discount factors multiply), so the reported OAS and Z-spread are measured OVER a NON-FLAT benchmark — e.g. an OIS discount curve plus a sector/rating spread curve — rather than the plain `curve`. Its zero rates ARE the spreads (build one with `curves.fromZeroRates(spreadPillars)`); it must share `curve`'s reference date.
unitless by name
Optional
No @default declared; consult the signature and description.
spreadCurve.addSpread
(spread: YieldCurve) => YieldCurve
Combine with a term-structure spread curve: the continuous zeros ADD at each tenor (equivalently discount factors multiply, `D(t)·D_spread(t)`). Unions both curves' pillar tenors so the spread's shape — not just a level — is preserved. Used to discount over `benchmark + spread` (e.g. OIS + a sector/rating spread) while keeping curve construction out of leaf entrypoints.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.addSpread(spread)
YieldCurve

unitless by name
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.bumpPillar
(index: number, delta: number) => YieldCurve
Bump a single pillar's continuous zero by `delta` (key-rate risk).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.bumpPillar(delta)
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.bumpPillar(index)
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.dayCount
FixedIncomeDayCount

count (integer)
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.discount
(at: string | number) => number
Discount factor to a date or year fraction.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.discount(at)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.extrapolation
import('@insiderfinance/totalfinance/fixed-income').CurveExtrapolation

unitless by name
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.forwardRate
(from: string | number, to: string | number, dayCount?: FixedIncomeDayCount) => number
Simple (money-market) forward rate between two times/dates under `dayCount`.
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.forwardRate(dayCount)
FixedIncomeDayCount | undefined

unitless by name
Optional
No @default declared; consult the signature and description.
spreadCurve.forwardRate(from)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.forwardRate(to)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.instantaneousForward
(at: string | number) => number
Instantaneous (continuously-compounded) forward rate at a time/date.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.instantaneousForward(at)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.interpolation
import('@insiderfinance/totalfinance/fixed-income').CurveInterpolation

unitless by name
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.pillars
readonly import('@insiderfinance/totalfinance/fixed-income').CurvePillar[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.referenceDate
string

calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.shift
(delta: number) => YieldCurve
Parallel shift of every pillar's continuous zero by `delta` (e.g. +0.0001 = +1bp).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.shift(delta)
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.timeTo
(at: string | number) => number
Year fraction from the reference date to a date (or pass a number through unchanged).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.timeTo(at)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.zeroRate
(at: string | number, compounding?: import('@insiderfinance/totalfinance/core').InterestCompounding) => number
Zero rate to a date or year fraction, in the requested compounding (default continuous).
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.zeroRate(at)
string | number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.zeroRate(compounding)
import('@insiderfinance/totalfinance/core').InterestCompounding | undefined

unitless by name
Optional
No @default declared; consult the signature and description.
spreadCurve.zeroRate(compounding).periodsPerYear
number

per year (count)
Required / declared member
No @default declared; consult the signature and description.
spreadCurve.zeroRate(compounding).type
'periodic'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
stepsPerYear
number
Tree steps per year (default 24, hard outer maximum 1,000,000; total-tree cap may be lower).
per year (count)
Optional
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

function

bermudanSwaption

Price a Bermudan swaption on the Hull-White tree. At each exercise date the holder takes `max(continuation, swapValue)`, where the node-level forward swap value uses the Hull-White analytic bond reconstruction `P(tᵢ, T; r_node)`. (Hull-White only — the lognormal Black-Karasinski tree has no analytic node bond.)

export declare function bermudanSwaption(specification: BermudanSwaptionSpecification): BermudanSwaptionResult;
Fields, parameters & returned members (26)
Name / typeMeaning & unitOptional / default
(specification)
BermudanSwaptionSpecification

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(specification).curve
YieldCurve
Discount/forecast curve (single-curve); its reference date is the valuation date.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
(specification).exerciseDates
string[]
Dates on which the holder may exercise into the swap (each is a swap start).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
(specification).fixedDayCount
FixedIncomeDayCount
Fixed-leg day count (default `30/360`).
count (integer)
Optional
No @default declared; consult the signature and description.
(specification).fixedFrequency
Frequency
Fixed-leg frequency (default semiannual).
unitless by name
Optional
No @default declared; consult the signature and description.
(specification).fixedRate
number
Fixed rate of the underlying swap.
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
(specification).maturityDate
string
Underlying swap maturity.
calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
(specification).meanReversion
number
Mean reversion and short-rate vol.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
(specification).notional
number

unitless by name
Optional
No @default declared; consult the signature and description.
(specification).optionType
'payer' | 'receiver'
`payer` = option to pay fixed; `receiver` = option to receive fixed.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
(specification).sigma
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(specification).stepsPerYear
number
Tree steps per year (default 24, hard outer maximum 1,000,000; total-tree cap may be lower).
per year (count)
Optional
No @default declared; consult the signature and description.
return.assumptions
{ conventionsVersion: string; dayCount: 'ACT/365F'; fixedDayCount: FixedIncomeDayCount; fixedFrequency: Frequency; meanReversion: number; model: 'hull-white'; notional: number; settlementDate: string; sigma: number; stepsPerYear: number; }
Applied conventions and model knobs, echoed (Law 2 report grammar).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.conventionsVersion
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.dayCount
'ACT/365F'

count (integer)
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.fixedDayCount
FixedIncomeDayCount

count (integer)
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.fixedFrequency
Frequency

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.meanReversion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.model
'hull-white'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.notional
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.settlementDate
string

calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.sigma
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.stepsPerYear
number

per year (count)
Required / declared member
No @default declared; consult the signature and description.
return.diagnostics
Diagnostics
Honest computation report: the lattice method behind the price (Law 2 report grammar).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.exerciseDates
string[]
The exercise schedule actually used, sorted ascending from the valuation date.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.price
number
Option value, scaled by `notional`.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

function

callableBond

Price a callable and/or putable bond on a short-rate tree, with option value, effective duration, and OAS.

export declare function callableBond(specification: CallableBondSpecification): CallableBondResult;
Fields, parameters & returned members (24)
Name / typeMeaning & unitOptional / default
(specification)
CallableBondSpecification

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(specification).bond
Bond

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(specification).calls
BondOption[]
Issuer call schedule (caps the bond's value at each strike).
unitless by name
Optional
No @default declared; consult the signature and description.
(specification).curve
YieldCurve
Calibration/discount curve (its reference date is the valuation date).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
(specification).marketPrice
number
Market dirty price; when given, the result includes the option-adjusted spread.
currency amount (the field or record currency)
Optional
No @default declared; consult the signature and description.
(specification).meanReversion
number
Mean reversion and short-rate volatility for the tree model.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
(specification).model
TreeModel
Tree model (default `hull-white`).
unitless by name
Optional
No @default declared; consult the signature and description.
(specification).puts
BondOption[]
Holder put schedule (floors the bond's value at each strike).
unitless by name
Optional
No @default declared; consult the signature and description.
(specification).sigma
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(specification).stepsPerYear
number
Tree steps per year (default 24, hard outer maximum 1,000,000; total-tree cap may be lower).
per year (count)
Optional
No @default declared; consult the signature and description.
return.assumptions
{ conventionsVersion: string; dayCount: 'ACT/365F'; meanReversion: number; model: TreeModel; settlementDate: string; sigma: number; stepsPerYear: number; }
Applied conventions and model knobs, echoed (R2).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.conventionsVersion
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.dayCount
'ACT/365F'

count (integer)
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.meanReversion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.model
TreeModel

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.settlementDate
string

calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.sigma
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.stepsPerYear
number

per year (count)
Required / declared member
No @default declared; consult the signature and description.
return.diagnostics
Diagnostics
Honest computation report: the lattice method, and the OAS root-find when one ran (R2).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.effectiveDuration
number
Effective duration from a ±1bp parallel curve shock (re-trees each side).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.oas
number
Option-adjusted spread (parallel curve shift repricing the model to `marketPrice`); present only when `marketPrice` is supplied.
unitless by name
Optional
No @default declared; consult the signature and description.
return.optionValue
number
Value of the embedded option(s): `straightPrice − price` (positive for a callable).
currency amount (the field or record currency)
Required / declared member
No @default declared; consult the signature and description.
return.price
number
Model dirty price including the embedded option(s).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.straightPrice
number
Model dirty price of the otherwise-identical straight bond (no embedded options).
currency amount (the field or record currency)
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

function

oasAnalytics

Market-calibrated option-adjusted-spread analytics for a callable/putable bond: the OAS, the Z-spread, their difference (the embedded-**option cost**), and the **OAS-consistent** effective duration and convexity (the curve shocked with the spread held fixed). Composes the same short-rate lattice as {@link callableBond}. See `docs/specs/oas-analytics.md`.

export declare function oasAnalytics(specification: OasAnalyticsSpecification): OasAnalyticsResult;
Fields, parameters & returned members (28)
Name / typeMeaning & unitOptional / default
(specification)
OasAnalyticsSpecification

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(specification).bond
Bond

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(specification).calls
BondOption[]
Issuer call schedule (caps the bond's value at each strike).
unitless by name
Optional
No @default declared; consult the signature and description.
(specification).curve
YieldCurve
Calibration/discount curve (its reference date is the valuation date).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
(specification).durationShock
number
Curve shock for the effective duration/convexity, in decimal. Default 1e-4 (1 bp).
unitless by name
Optional
No @default declared; consult the signature and description.
(specification).marketPrice
number
Market dirty price the OAS and Z-spread are solved to.
currency amount (the field or record currency)
Required / declared member
No @default declared; consult the signature and description.
(specification).meanReversion
number
Mean reversion and short-rate volatility for the tree model.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
(specification).model
TreeModel
Tree model (default `hull-white`).
unitless by name
Optional
No @default declared; consult the signature and description.
(specification).puts
BondOption[]
Holder put schedule (floors the bond's value at each strike).
unitless by name
Optional
No @default declared; consult the signature and description.
(specification).sigma
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(specification).spreadCurve
YieldCurve
Optional term-structure spread curve added to `curve` before the spreads are solved. The effective benchmark becomes `curve` + `spreadCurve` (continuous zeros add ⇔ discount factors multiply), so the reported OAS and Z-spread are measured OVER a NON-FLAT benchmark — e.g. an OIS discount curve plus a sector/rating spread curve — rather than the plain `curve`. Its zero rates ARE the spreads (build one with `curves.fromZeroRates(spreadPillars)`); it must share `curve`'s reference date.
unitless by name
Optional
No @default declared; consult the signature and description.
(specification).stepsPerYear
number
Tree steps per year (default 24, hard outer maximum 1,000,000; total-tree cap may be lower).
per year (count)
Optional
No @default declared; consult the signature and description.
return.assumptions
{ conventionsVersion: string; dayCount: 'ACT/365F'; meanReversion: number; model: TreeModel; settlementDate: string; sigma: number; stepsPerYear: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.conventionsVersion
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.dayCount
'ACT/365F'

count (integer)
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.meanReversion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.model
TreeModel

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.settlementDate
string

calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.sigma
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions.stepsPerYear
number

per year (count)
Required / declared member
No @default declared; consult the signature and description.
return.diagnostics
Diagnostics

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.effectiveConvexity
number
OAS-consistent effective convexity.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.effectiveDuration
number
OAS-consistent effective duration (curve shocked ±`durationShock` at constant OAS).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.marketPrice
number

currency amount (the field or record currency)
Required / declared member
No @default declared; consult the signature and description.
return.modelPrice
number
The no-spread lattice model price (the gap `marketPrice − modelPrice` is what the OAS explains).
currency amount (the field or record currency)
Required / declared member
No @default declared; consult the signature and description.
return.oas
number
Parallel curve shift repricing the callable model to `marketPrice` (decimal; ×1e4 = bps).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.optionCost
number
`zSpread − oas` (decimal) — the embedded-option cost. Positive callable / negative putable.
currency amount (the field or record currency)
Required / declared member
No @default declared; consult the signature and description.
return.zSpread
number
Zero-volatility spread on the same lattice's straight leg (decimal).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.