Enum FixingSource
pub enum FixingSource {
Single(String),
Cross {
reference: String,
settlement: String,
},
}Expand description
Where a cash settlement’s fixing comes from: one FX series, or the cross of two series through USD — EMTA’s Cross Currency Settlement Rate, the reference currency’s rate crossed with the settlement currency’s, both for the one valuation date.
Variants§
Single(String)
The pair’s canonical FX key (FX-USDKRW).
Cross
Two canonical keys against USD: the reference currency’s (FX-USDKRW)
and the settlement currency’s (FX-EURUSD). It fixes reference units
per one settlement unit.
Implementations§
§impl FixingSource
impl FixingSource
pub fn cross(
reference: impl Into<String>,
settlement: impl Into<String>,
) -> Result<Self, FixingSourceError>
pub fn cross( reference: impl Into<String>, settlement: impl Into<String>, ) -> Result<Self, FixingSourceError>
The cross of reference’s and settlement’s keys against USD.
§Errors
FixingSourceError when a key is not an FX key against USD, or both
name one currency.
pub fn usd_key(currency: &str) -> String
pub fn usd_key(currency: &str) -> String
A currency’s FX key against USD as the market quotes it: EUR, GBP, AUD
and NZD are priced in USD per unit (FX-EURUSD), every other currency
in units per USD (FX-USDJPY, FX-USDKRW).
pub fn currencies(&self) -> Option<(&str, &str)>
pub fn currencies(&self) -> Option<(&str, &str)>
The two currency codes the fixing is between, (settlement, reference) as it quotes: a single key’s base and quote; a cross’s
settlement key’s non-USD currency and its reference key’s. None for a
key that is not FX- followed by two three-letter codes.
Trait Implementations§
§impl Clone for FixingSource
impl Clone for FixingSource
§fn clone(&self) -> FixingSource
fn clone(&self) -> FixingSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more