Struct NdsTemplate
pub struct NdsTemplate {
pub name: String,
pub swap: Box<AnyTemplate>,
pub fx: FxSource,
pub fixing_lag: Option<u32>,
pub fixing_centers: Option<&'static str>,
pub zero_coupon_up_to: Option<Period>,
pub fixed_compounds: bool,
pub template_date: NaiveDate,
pub settlement_override: Option<String>,
}Expand description
A non-deliverable swap market’s terms: the local swap, the FX fixing that converts its payments, and the short-end rule.
Fields§
§name: StringTemplate name (doubles as registry code), e.g. KRW-CD-NDS.
swap: Box<AnyTemplate>The local swap’s conventions — an OIS or a vanilla template, built here and not registered: the onshore deliverable market differs.
fx: FxSourceThe FX fixing’s source.
fixing_lag: Option<u32>The fixing lag, overriding the source’s.
fixing_centers: Option<&'static str>The fixing calendar, overriding the source’s.
zero_coupon_up_to: Option<Period>Tenors up to and including this pay once at maturity on both legs.
fixed_compounds: boolWhether the fixed leg compounds its rate into its single payment,
(1 + K)^τ — BRL’s — rather than accruing it simply.
template_date: NaiveDateThe date of the latest trade template the row follows.
settlement_override: Option<String>The currency the swap settles in, overriding the source’s — an ISO code the caller states, checked when the swap is drafted. Settling in a currency other than the source’s crosses the source’s fixing with the settlement currency’s against USD (EMTA’s Cross Currency Settlement Rate). ISDA’s NDS standard terms allow USD, EUR, GBP, JPY, AUD, HKD or SGD; the supplement’s non-USD settlement-rate mechanism is licence-gated, so this cross is the EMTA cross templates’ and is UNVERIFIED against the supplement.
Implementations§
§impl NdsTemplate
impl NdsTemplate
pub fn with_settlement_currency(self, code: &str) -> Self
pub fn with_settlement_currency(self, code: &str) -> Self
This template settling in code: the swap reports and pays in it,
each fixing crossed through USD where code is not the source’s
settlement currency, the fixing lag and calendar the source’s.
pub fn reference_ccy(&self) -> Currency
pub fn reference_ccy(&self) -> Currency
The local currency the swap accrues in.
§Panics
If the row’s swap names no ISO currency — a wiring error the registry test catches.
pub fn fx_terms(&self) -> NdsFxTerms
pub fn fx_terms(&self) -> NdsFxTerms
The FX fixing’s terms: the source’s, with the row’s overrides applied.
§Panics
If the row names an unregistered NDF template or a malformed currency — a wiring error the registry test catches.
pub fn fixing_calendar(&self) -> Arc<dyn Calendar>
pub fn fixing_calendar(&self) -> Arc<dyn Calendar>
The calendar the FX fixing is a business day of.
pub fn fx_index(&self) -> String
pub fn fx_index(&self) -> String
The FX fixing series: the pair’s canonical key, settlement currency as
base (FX-USDKRW).
pub fn fixing_date(&self, payment: NaiveDate) -> NaiveDate
pub fn fixing_date(&self, payment: NaiveDate) -> NaiveDate
The FX fixing date for a payment on payment: adjusted Preceding onto
the fixing calendar, then stepped back the lag in its business days.
pub fn fixing_for_payment(&self, payment: NaiveDate) -> (NaiveDate, NaiveDate)
pub fn fixing_for_payment(&self, payment: NaiveDate) -> (NaiveDate, NaiveDate)
The (fixing, value) dates a payment on payment converts at: the
FX fixing fixing_date dates, for value the lag
later on the same calendar — the payment date itself, unless the
payment falls on a day the fixing calendar is closed.
pub fn swap_for(&self, tenor: Period) -> AnyTemplate
pub fn swap_for(&self, tenor: Period) -> AnyTemplate
The local swap a tenor trade draws on: the row’s, paying once at
maturity on both legs when the tenor is within the zero-coupon limit.
pub fn with_spot_lag(self, days: i32) -> Self
pub fn with_spot_lag(self, days: i32) -> Self
This template with its local swap’s spot lag overridden, in business days.
pub fn spot_rule(&self) -> (Arc<dyn Calendar>, Period, BusinessDayConvention)
pub fn spot_rule(&self) -> (Arc<dyn Calendar>, Period, BusinessDayConvention)
The local swap’s calendar, spot lag and business-day convention — the spot rule a drafted NDS starts from.
§Panics
If the row’s swap is neither an OIS nor a vanilla template, which no registered row is.
pub fn with_fixing_lag(self, days: u32) -> Self
pub fn with_fixing_lag(self, days: u32) -> Self
This template with its FX fixing lag overridden, in business days.
Trait Implementations§
§impl Clone for NdsTemplate
impl Clone for NdsTemplate
§fn clone(&self) -> NdsTemplate
fn clone(&self) -> NdsTemplate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more