interface
CrossCurrencyBasisInput
Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.
export interface CrossCurrencyBasisInput {
/** FX spot: domestic units per 1 foreign unit. */
spot: number;
/** Domestic collateral (OIS) discount curve. */
domestic: YieldCurve;
/** Foreign index/OIS discount curve (pre-basis). */
foreign: YieldCurve;
/**
* Cross-currency basis term structure added to the foreign curve (its zero rates ARE the basis
* spreads). Omit for the pure covered-interest-parity case (no basis): `fxForward` is then
* `spot · D_for(t)/D_dom(t)` and the collateralized curve is the foreign curve itself.
*/
basis?: YieldCurve;
}Fields, parameters & returned members (85)
| Name / type | Meaning & unit | Optional / default |
|---|---|---|
basisYieldCurve | Cross-currency basis term structure added to the foreign curve (its zero rates ARE the basis
spreads). Omit for the pure covered-interest-parity case (no basis): `fxForward` is then
`spot · D_for(t)/D_dom(t)` and the collateralized curve is the foreign curve itself. unitless by name | Optional No @default declared; consult the signature and description. |
basis.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. |
basis.addSpread(spread)YieldCurve | unitless by name | Required / declared member No @default declared; consult the signature and description. |
basis.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. |
basis.bumpPillar(delta)number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
basis.bumpPillar(index)number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
basis.dayCountimport('@insiderfinance/totalfinance/fixed-income').FixedIncomeDayCount | count (integer) | Required / declared member No @default declared; consult the signature and description. |
basis.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. |
basis.discount(at)string | number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
basis.extrapolationimport('@insiderfinance/totalfinance/fixed-income').CurveExtrapolation | unitless by name | Required / declared member No @default declared; consult the signature and description. |
basis.forwardRate(from: string | number, to: string | number, dayCount?: import('@insiderfinance/totalfinance/fixed-income').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. |
basis.forwardRate(dayCount)import('@insiderfinance/totalfinance/fixed-income').FixedIncomeDayCount | undefined | unitless by name | Optional No @default declared; consult the signature and description. |
basis.forwardRate(from)string | number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
basis.forwardRate(to)string | number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
basis.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. |
basis.instantaneousForward(at)string | number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
basis.interpolationimport('@insiderfinance/totalfinance/fixed-income').CurveInterpolation | unitless by name | Required / declared member No @default declared; consult the signature and description. |
basis.pillarsreadonly import('@insiderfinance/totalfinance/fixed-income').CurvePillar[] | unitless by name | Required / declared member No @default declared; consult the signature and description. |
basis.referenceDatestring | calendar date (YYYY-MM-DD) | Required / declared member No @default declared; consult the signature and description. |
basis.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. |
basis.shift(delta)number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
basis.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. |
basis.timeTo(at)string | number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
basis.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. |
basis.zeroRate(at)string | number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
basis.zeroRate(compounding)import('@insiderfinance/totalfinance/core').InterestCompounding | undefined | unitless by name | Optional No @default declared; consult the signature and description. |
basis.zeroRate(compounding).periodsPerYearnumber | per year (count) | Required / declared member No @default declared; consult the signature and description. |
basis.zeroRate(compounding).type'periodic' | unitless by name | Required / declared member No @default declared; consult the signature and description. |
domesticYieldCurve | Domestic collateral (OIS) discount curve. unitless by name | Required / declared member No @default declared; consult the signature and description. |
domestic.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. |
domestic.addSpread(spread)YieldCurve | unitless by name | Required / declared member No @default declared; consult the signature and description. |
domestic.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. |
domestic.bumpPillar(delta)number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
domestic.bumpPillar(index)number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
domestic.dayCountimport('@insiderfinance/totalfinance/fixed-income').FixedIncomeDayCount | count (integer) | Required / declared member No @default declared; consult the signature and description. |
domestic.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. |
domestic.discount(at)string | number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
domestic.extrapolationimport('@insiderfinance/totalfinance/fixed-income').CurveExtrapolation | unitless by name | Required / declared member No @default declared; consult the signature and description. |
domestic.forwardRate(from: string | number, to: string | number, dayCount?: import('@insiderfinance/totalfinance/fixed-income').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. |
domestic.forwardRate(dayCount)import('@insiderfinance/totalfinance/fixed-income').FixedIncomeDayCount | undefined | unitless by name | Optional No @default declared; consult the signature and description. |
domestic.forwardRate(from)string | number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
domestic.forwardRate(to)string | number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
domestic.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. |
domestic.instantaneousForward(at)string | number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
domestic.interpolationimport('@insiderfinance/totalfinance/fixed-income').CurveInterpolation | unitless by name | Required / declared member No @default declared; consult the signature and description. |
domestic.pillarsreadonly import('@insiderfinance/totalfinance/fixed-income').CurvePillar[] | unitless by name | Required / declared member No @default declared; consult the signature and description. |
domestic.referenceDatestring | calendar date (YYYY-MM-DD) | Required / declared member No @default declared; consult the signature and description. |
domestic.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. |
domestic.shift(delta)number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
domestic.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. |
domestic.timeTo(at)string | number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
domestic.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. |
domestic.zeroRate(at)string | number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
domestic.zeroRate(compounding)import('@insiderfinance/totalfinance/core').InterestCompounding | undefined | unitless by name | Optional No @default declared; consult the signature and description. |
domestic.zeroRate(compounding).periodsPerYearnumber | per year (count) | Required / declared member No @default declared; consult the signature and description. |
domestic.zeroRate(compounding).type'periodic' | unitless by name | Required / declared member No @default declared; consult the signature and description. |
foreignYieldCurve | Foreign index/OIS discount curve (pre-basis). unitless by name | Required / declared member No @default declared; consult the signature and description. |
foreign.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. |
foreign.addSpread(spread)YieldCurve | unitless by name | Required / declared member No @default declared; consult the signature and description. |
foreign.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. |
foreign.bumpPillar(delta)number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
foreign.bumpPillar(index)number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
foreign.dayCountimport('@insiderfinance/totalfinance/fixed-income').FixedIncomeDayCount | count (integer) | Required / declared member No @default declared; consult the signature and description. |
foreign.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. |
foreign.discount(at)string | number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
foreign.extrapolationimport('@insiderfinance/totalfinance/fixed-income').CurveExtrapolation | unitless by name | Required / declared member No @default declared; consult the signature and description. |
foreign.forwardRate(from: string | number, to: string | number, dayCount?: import('@insiderfinance/totalfinance/fixed-income').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. |
foreign.forwardRate(dayCount)import('@insiderfinance/totalfinance/fixed-income').FixedIncomeDayCount | undefined | unitless by name | Optional No @default declared; consult the signature and description. |
foreign.forwardRate(from)string | number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
foreign.forwardRate(to)string | number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
foreign.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. |
foreign.instantaneousForward(at)string | number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
foreign.interpolationimport('@insiderfinance/totalfinance/fixed-income').CurveInterpolation | unitless by name | Required / declared member No @default declared; consult the signature and description. |
foreign.pillarsreadonly import('@insiderfinance/totalfinance/fixed-income').CurvePillar[] | unitless by name | Required / declared member No @default declared; consult the signature and description. |
foreign.referenceDatestring | calendar date (YYYY-MM-DD) | Required / declared member No @default declared; consult the signature and description. |
foreign.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. |
foreign.shift(delta)number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
foreign.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. |
foreign.timeTo(at)string | number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
foreign.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. |
foreign.zeroRate(at)string | number | unitless by name | Required / declared member No @default declared; consult the signature and description. |
foreign.zeroRate(compounding)import('@insiderfinance/totalfinance/core').InterestCompounding | undefined | unitless by name | Optional No @default declared; consult the signature and description. |
foreign.zeroRate(compounding).periodsPerYearnumber | per year (count) | Required / declared member No @default declared; consult the signature and description. |
foreign.zeroRate(compounding).type'periodic' | unitless by name | Required / declared member No @default declared; consult the signature and description. |
spotnumber | FX spot: domestic units per 1 foreign unit. 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.