Module xccy
Expand description
Cross-currency swap templates — the xccy group.
Cross-currency swaps differ structurally from single-currency swaps along
four axes: per-leg currency, per-leg calendar (often joint), per-leg roll
direction, and a swap-level notional-exchange shape. These do not fit the
single-currency super::SwapTemplate, so the group carries its own
value-type bundle. Currencies are ISO 4217 codes (as on
crate::statics::indices::OvernightIndex), keeping statics free of any
market dependency.
MTM-resetting templates carry shape only (NotionalExchange::Mtm); MTM
pricing is out of scope for this layer.
Structs§
- CsaSpec
- Collateral (CSA) specification: collateral currency + its overnight index.
- FxIndex
Spec - FX-index metadata for an MTM-resetting cross-currency swap.
- LegFx
- Where a non-deliverable leg’s FX fixing comes from: a source, as an NDS row names one, and an optional fixing calendar overriding the source’s — BRL fixes on Brazil and New York days where its NDF template names Brazil alone.
- Xccy
LegTemplate - Per-leg conventions for a cross-currency swap leg.
- Xccy
Swap Template - Per-leg conventions for a cross-currency swap: two legs plus swap-level fields.
Enums§
- Accretion
Mode - OIS-leg spread-compounding mode.
ExclSprdadds the spread after compounding the daily index;InclSprdfolds it into each daily step. - Coupon
Mode - Coupon-payment shape: periodic coupons vs a single payment at maturity.
- Deliverability
- Deliverable vs non-deliverable.
- Fixing
Anchor - What a non-deliverable coupon’s FX fixing is dated from.
- Ibor
Projection - The window an IBOR leg’s coupon reads its index over.
- Notional
Exchange - Notional-exchange shape.
Mtmcarries shape only (itsreset_datesare populated at trade time); MTM pricing is out of scope here. - Reset
Position - IBOR-leg fixing timing. OIS-compounded legs are structurally In-Arrears, so
this is carried only on
XccyLegKind::IborProjected. - Xccy
LegKind - Per-leg rate-projection mechanism. Orthogonal to the swap-level
CouponMode. - Xccy
LegSide - Which template leg carries the quoted spread / rate.
- Xccy
Template Error - Why a customised cross-currency template could not be built.
Statics§
- XCCY
- Registry rows for the cross-currency group.
Functions§
- ars_
usd_ ndccs - ARS fixed / USD SOFR NDCCS — fixed leg only. Settlement: USD on the ARS NDF template’s fixing, Payment − 2 BD on ARBA and USNY (ARS05, the registered NDF template’s fixing); timeline MP8. Coupon terms — semi-annual ACT/360 — are UNVERIFIED: no source states them.
- cad_
usd_ corra_ sofr_ basis_ q - CAD CORRA / USD SOFR OIS-OIS basis swap. MTM (CADUSD on a 3-way Canada ∪ US ∪ London fixing calendar), USD/SOFR collateral, quoted on the CAD leg.
- clp_
usd_ ndccs - CLP fixed / USD SOFR NDCCS. Settlement: USD on CLP DOLAR.OBS (CLP10), Payment − 2 BD on CLSA and USNY; timeline MP8. Coupon terms — semi-annual ACT/360 on Santiago and New York — are inferred from the CLP NDS template.
- cnh_
usd_ ccs_ q - CNH fixed / USD SOFR OIS cross-currency swap on a 3-way China-Interbank ∪ Hong Kong ∪ US calendar. Non-MTM, USD/SOFR collateral, quoted on the CNH leg.
- cop_
usd_ ndccs - COP fixed / USD SOFR NDCCS. Settlement: USD on COP TRM (COP02), Payment − 2 BD on USNY and COBO; timeline MP8. Coupon terms — quarterly ACT/360 on Bogotá and New York — are inferred from the COP NDS template.
- czk_
eur_ pribor_ euribor_ basis_ q - CZK PRIBOR-3M / EUR EURIBOR-3M IBOR-IBOR basis swap. MTM (EURCZK), the only EUR/ESTR-collateralized template here, quoted on the CZK leg.
- days 🔒
- dkk_
usd_ cibor_ sofr_ basis_ q - DKK CIBOR-3M / USD SOFR mixed IBOR-OIS basis swap. MTM (USDDKK), USD/SOFR collateral, quoted on the DKK leg.
- eur_
usd_ estr_ sofr_ basis_ nr - EUR ESTR / USD SOFR OIS-OIS basis swap without notional resets: principal
is exchanged at start and end at the struck FX, with no FX index. Otherwise
the conventions of
eur_usd_estr_sofr_basis_q. - eur_
usd_ estr_ sofr_ basis_ q - EUR ESTR / USD SOFR OIS-OIS basis swap. MTM-resetting (EURUSD on London), USD/SOFR collateral, quoted on the EUR leg.
- fixed_
leg 🔒 - Fixed-rate cross-currency leg.
frequency,end_of_month, andpay_delayvary per template. - frequency_
of 🔒 - The coupon frequency an IBOR index’s tenor pays at.
- fx 🔒
- An MtM reset FX-index spec. The reset lag is uniformly 2 business days and
reset_centeris the joint publication calendar, both per the pair’s row in the ISDA MTM Matrix for Mark-to-market Currency Swaps (2006 ISDA Definitions edition, published 2017-09-07) — verified verbatim: EUR/USD and GBP/USD fix “two London Business Days prior”; CAD/USD “two Toronto, New York and London”; EUR/CZK “two Prague Business Days and two TARGET Settlement Days”; USD/DKK “two Copenhagen Business Days”. - gbp_
usd_ sonia_ sofr_ basis_ q - GBP SONIA / USD SOFR OIS-OIS basis swap (GBP ACT/365F vs USD ACT/360). MTM (GBPUSD on London), USD/SOFR collateral, quoted on the GBP leg.
- hkd_
usd_ hibor_ sofr_ basis_ q - HKD HIBOR-3M / USD SOFR mixed IBOR-OIS basis swap. HIBOR fixes same-day
(
fixing_lag = 0 BD). Non-MTM, USD/SOFR collateral, quoted on the HKD leg. - ibor_
leg 🔒 - Term-IBOR-projected cross-currency leg: Quarterly, EOM, Backward,
In-Advance.
fixing_lag/pay_delayvary per screen. - inr_
usd_ ndccs - INR fixed / USD SOFR NDCCS. Settlement: USD on INR FBIL (INR01) under the Asian Terms. Coupon terms — semi-annual ACT/365F on Mumbai and New York — are inferred from the INR NDS template (CME Rule 901 F(c)). The period-end fixing and the two-day payment lag follow MP8 by inference: MP8 is a LatAm practice.
- mtm 🔒
- ndccs 🔒
- An EM fixed / USD SOFR non-deliverable cross-currency swap row: the EM
leg fixed, quoted, paying two business days after each period end; the
SOFR leg compounding on ACT/360 at the same frequency and lag; principal
exchanged at the end alone; the EM leg settling in USD on
ndf’s fixing, each coupon fixing two business days before its period end for value on it (EMTA-ISDA MP8, 4 Jan 2022); USD SOFR collateral. - ois_leg 🔒
- Overnight-compounded (OIS) cross-currency leg: Quarterly, EOM, Backward,
ExclSprd,fixing_lag = 0 BD,pay_delay = 2 BD; the screens’ 1 BD rate cut-off is deliberately not modelled (seeXccyLegTemplate). - pen_
usd_ ndccs - PEN fixed / USD SOFR NDCCS — fixed leg only. Settlement: USD on PEN05, Payment − 2 BD on USNY and PELI; timeline MP8. Coupon terms — semi-annual ACT/360 — are UNVERIFIED: no source states them.
- resolve_
overnight 🔒 - try_
usd_ ccs - TRY fixed / USD SOFR OIS cross-currency swap.
AtStartAndEnd, USD/SOFR collateral, quoted on the TRY (fixed) leg. - usd_
brl_ simple_ zero - USD fixed / BRL CDI zero-coupon non-deliverable cross-currency swap — the
offshore DI × dólar swap. Each leg pays once at termination: the BRL leg
compounds the CDI over Brazilian business days,
∏(1 + CDI_j)^(1/252) − 1(theBRL-CDI-NDSleg’s arithmetic), and the USD leg accrues its fixed rate simply on ACT/360. Quoted on the USD fixed rate — the cupom cambial — against CDI flat. The BRL leg, its final exchange included, settles in USD at BRL PTAX (BRL09), fixing two Brazil-and-New-York business days before payment (USNY and any of BR{SP,RJ,BR}). Principal is exchanged at the end alone; USD SOFR collateral. Payment on termination is inferred: the CME rule’s “+1 BD” is for the NDIRS, and no source states the CCS’s.