Skip to main content

NdfTemplate

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: String

Template name (doubles as registry code), e.g. KRW-USD-NDF.

§reference_ccy: Currency

The non-deliverable currency the forward references.

§settlement_ccy: Currency

The currency the net amount is paid in.

§rate_option: &'static str

The 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: bool

Whether 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: u32

Business days of the valuation calendar between fixing and settlement.

§valuation_centers: &'static str

Calendar expression the valuation (fixing) date is a business day of.

§settlement_centers: &'static str

Calendar expression the settlement date is a business day of.

§spot_lag: Period

Days from trade date to spot, counted on the joint calendar.

§business_day_convention: BusinessDayConvention

Convention rolling spot plus a tenor onto a settlement date.

§end_of_month: bool

Whether a month-end spot rolls to month-end settlements.

§max_postponement_days: u32

Maximum Days of Postponement, in calendar days.

§deferral_days: u32

Deferral Period for an Unscheduled Holiday, in calendar days.

§cumulative_days: u32

Cumulative Events cap, in calendar days.

§settle_after_moved_fixing: u32

Latest settlement, in business days, after a moved or postponed fixing.

§template_date: NaiveDate

The effective date of the EMTA template the row follows.

Implementations§

§

impl NdfTemplate

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>

The calendar the settlement date is a business day of.

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

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

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

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

This template with its spot lag overridden, in business days.

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

This template with its fixing lag overridden, in business days.

Trait Implementations§

§

impl Clone for NdfTemplate

§

fn clone(&self) -> NdfTemplate

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl From<NdfTemplate> for AnyTemplate

§

fn from(t: NdfTemplate) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.