Struct NdfTemplate
pub struct NdfTemplate {Show 18 fields
pub name: String,
pub reference_ccy: Currency,
pub settlement_ccy: Currency,
pub rate_option: &'static str,
pub survey_rate_option: Option<&'static str>,
pub settlement_rate_option: Option<&'static str>,
pub crosses_usd: bool,
pub fixing_lag: u32,
pub valuation_centers: &'static str,
pub settlement_centers: &'static str,
pub spot_lag: Period,
pub business_day_convention: BusinessDayConvention,
pub end_of_month: bool,
pub max_postponement_days: u32,
pub deferral_days: u32,
pub cumulative_days: u32,
pub settle_after_moved_fixing: u32,
pub template_date: NaiveDate,
}Expand description
The terms of one market’s non-deliverable forward: what it fixes on, when, on which calendars, and the caps its disruption fallbacks run to.
The caps and the latest settlement after a moved fixing are data for a disruption model; nothing reads them yet.
Fields§
§name: StringTemplate name (doubles as registry code), e.g. KRW-USD-NDF.
reference_ccy: CurrencyThe non-deliverable currency the forward references.
settlement_ccy: CurrencyThe currency the net amount is paid in.
rate_option: &'static strThe Annex A settlement rate option code, e.g. KRW02.
survey_rate_option: Option<&'static str>The indicative survey rate option a SFEMC template falls back to.
settlement_rate_option: Option<&'static str>The settlement currency’s own rate option, which a cross-currency row
crosses the reference rate with. None on every row: a USD row needs
none, and the EMTA cross templates leave it blank for the confirmation
to name (their §4.5B endnote points to Market Practice No. 59 and
Annex A).
crosses_usd: boolWhether the settlement rate is EMTA’s Cross Currency Settlement Rate: the reference currency’s rate against USD crossed with the settlement currency’s against USD, both for the valuation date. True on the nine cross-currency rows; false where one rate prices the pair (every USD row, and XOF/EUR, which BCEAO fixes against the euro directly).
fixing_lag: u32Business days of the valuation calendar between fixing and settlement.
valuation_centers: &'static strCalendar expression the valuation (fixing) date is a business day of.
settlement_centers: &'static strCalendar expression the settlement date is a business day of.
spot_lag: PeriodDays from trade date to spot, counted on the joint calendar.
business_day_convention: BusinessDayConventionConvention rolling spot plus a tenor onto a settlement date.
end_of_month: boolWhether a month-end spot rolls to month-end settlements.
max_postponement_days: u32Maximum Days of Postponement, in calendar days.
deferral_days: u32Deferral Period for an Unscheduled Holiday, in calendar days.
cumulative_days: u32Cumulative Events cap, in calendar days.
settle_after_moved_fixing: u32Latest settlement, in business days, after a moved or postponed fixing.
template_date: NaiveDateThe effective date of the EMTA template the row follows.
Implementations§
§impl NdfTemplate
impl NdfTemplate
pub fn valuation_calendar(&self) -> Arc<dyn Calendar>
pub fn valuation_calendar(&self) -> Arc<dyn Calendar>
The calendar the valuation date is a business day of.
pub fn settlement_calendar(&self) -> Arc<dyn Calendar>
pub fn settlement_calendar(&self) -> Arc<dyn Calendar>
The calendar the settlement date is a business day of.
pub fn joint_calendar(&self) -> Arc<dyn Calendar>
pub fn joint_calendar(&self) -> Arc<dyn Calendar>
The union of the valuation and settlement calendars, which spot and the tenor roll are counted on.
pub fn fixing_date(&self, settlement: NaiveDate) -> NaiveDate
pub fn fixing_date(&self, settlement: NaiveDate) -> NaiveDate
The fixing date for a settlement on settlement: adjusted Preceding
onto the valuation calendar, then stepped back the fixing lag in its
business days.
pub fn spot_date(&self, trade_date: NaiveDate) -> NaiveDate
pub fn spot_date(&self, trade_date: NaiveDate) -> NaiveDate
The spot date of a trade on trade_date: the spot lag in business days
of the joint calendar.
pub fn settlement_date(&self, trade_date: NaiveDate, tenor: Period) -> NaiveDate
pub fn settlement_date(&self, trade_date: NaiveDate, tenor: Period) -> NaiveDate
The settlement date of a tenor forward traded on trade_date: spot
advanced the tenor, rolled by the template’s convention and
end-of-month rule on the joint calendar.
pub fn with_spot_lag(self, days: i32) -> Self
pub fn with_spot_lag(self, days: i32) -> Self
This template with its spot lag overridden, in business days.
pub fn settling_in(
self,
settlement: &str,
settlement_centers: &'static str,
) -> Self
pub fn settling_in( self, settlement: &str, settlement_centers: &'static str, ) -> Self
This row settling in settlement on settlement_centers, the
reference terms kept — the stated terms of a cross-currency NDO with
no NDF row of its own.
§Panics
If settlement is no ISO currency — the rows pass literals.
pub fn with_fixing_lag(self, days: u32) -> Self
pub fn with_fixing_lag(self, days: u32) -> Self
This template with its fixing lag overridden, in business days.
Trait Implementations§
§impl Clone for NdfTemplate
impl Clone for NdfTemplate
§fn clone(&self) -> NdfTemplate
fn clone(&self) -> NdfTemplate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more