Foreign exchange
Conversion, cross rates, forwards, swaps, non-deliverable forwards and hedging.
Convert and cross currencies with explicit quote conventions, price forwards from covered interest parity, value FX swaps and NDFs, and decompose hedged P&L.
Common APIs
fn
convertCurrencyConvert an amount between two currencies at the supplied spot quote.fncrossRateDerive a cross pair through the ONE currency the two supplied quotes share (EUR/USD × USD/JPY → EUR/JPY).fncoveredInterestParityForwardThe no-arbitrage forward: `forward = spot × growthFactor(domestic) / growthFactor(foreign)`.fnforeignExchangeForwardValueMark-to-market of an outstanding forward: `±(currentForward − contract) × notionalBase × discountFactorToSettlement`, positive sign for `'buyer-of-base'`, negative for `'seller-of-base'`, in the QUOTE currency.fnforeignExchangeSwapValueValue of a foreign-exchange swap as the sum of its two forward legs, each valued with {@link foreignExchangeForwardValue} (composed, not copied).fnnonDeliverableForwardValueCash-settled value of a non-deliverable forward at its OBSERVED fixing: `±(fixing − contract) × notionalBase × discountFactorToSettlement`, in the settlement currency.fnhedgeRatioThe simple hedge ratio: `hedgeNotionalBaseAmount / exposureBaseAmount`, both amounts echoed.fnspotForwardHedgedProfitAndLossP&L of a base-currency position that hedged `hedgedFraction` of its notional at a forward.Complete API reference
Browse all public exports, types, and feature imports below.