Skip to main content

RiskAxis

Enum RiskAxis 

#[non_exhaustive]
pub enum RiskAxis {
Show 15 variants Rate, Credit, Fx, Inflation, SecuritySpread, Repo, FxVol, RateVol, Correlation, Recovery, CreditVol, InflationVol, FuturePrice, Equity, EquityVol,
}
Expand description

The class of market input a measure reads.

An axis is a filter, not a label: a measure declaring one sums only the entries belonging to it. axis_of is the single classifier, and it has no catch-all arm — adding a key without deciding its axis does not compile.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Rate

Discount and projection pillars, including meeting and turn knots.

§

Credit

Survival-curve parameters — the CS01 axis.

§

Fx

FX spot, quoted or implied — the FX-delta axis.

§

Inflation

Inflation-curve parameters.

§

SecuritySpread

Per-security spread curves — a bond’s spread axis, distinct from the benchmark curve it is quoted over.

§

Repo

Repo/financing curves. Distinct from RiskAxis::Rate: a repo pillar is a financing spread, not a discount rate.

§

FxVol

FX vol-surface nodes — the FX vega axis.

§

RateVol

Rate vol-surface nodes — the swaption and bond-option vega axis.

§

Correlation

Base-correlation points — a tranche’s correlation axis, bucketed by detachment.

§

Recovery

Market recoveries, one per entity, with the survival curve held.

§

CreditVol

Credit vol-surface nodes — the CDS option vega axis.

§

InflationVol

Inflation vol-surface nodes — the year-on-year optionlet vega axis.

§

FuturePrice

Quoted listed-futures prices — the futures-delta axis of an option on a future. Distinct from RiskAxis::Rate: a price point is not a pillar.

§

Equity

Quoted equity spots — the equity-delta axis.

§

EquityVol

Equity vol-surface nodes — the equity option vega axis.

Implementations§

§

impl RiskAxis

pub const ACCEPTED: &'static [&'static str]

Every spelling this vocabulary accepts, canonical forms first.

Matching additionally ignores case and _/-/whitespace — see normalize in core::vocabulary.

pub fn code(self) -> &'static str

The canonical code for this variant; round-trips through FromStr.

§

impl RiskAxis

pub const ALL: [RiskAxis; 15]

Every axis, for a caller sweeping them.

pub fn asset_class(self) -> AssetClass

The desk this axis’s risk is run on.

Exhaustive, like axis_of: a new axis does not compile until someone decides whose it is. A bond’s security spread is Credit — it is the spread over the benchmark, not the benchmark.

pub fn quantity_kind(self) -> QuantityKind

The kind of quantity this axis’s quote is — what a caller’s default scale is chosen per.

Keyed by the quote rather than by the desk, so a caller who wants every vol in basis points says so once, whether the vol is a rate’s or an FX pair’s.

Trait Implementations§

§

impl Clone for RiskAxis

§

fn clone(&self) -> RiskAxis

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 Copy for RiskAxis

§

impl Debug for RiskAxis

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl Display for RiskAxis

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl Eq for RiskAxis

§

impl FromIterator<RiskAxis> for AxisSet

§

fn from_iter<I: IntoIterator<Item = RiskAxis>>(iter: I) -> Self

Creates a value from an iterator. Read more
§

impl FromStr for RiskAxis

§

type Err = VocabularyParseError

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
§

impl Hash for RiskAxis

§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl PartialEq for RiskAxis

§

fn eq(&self, other: &RiskAxis) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl StructuralPartialEq for RiskAxis

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.