Skip to main content

ExoticParams

Struct ExoticParams 

Source
pub struct ExoticParams {
Show 21 fields pub spot_prices: Option<Vec<Positive>>, pub spot_min: Option<Decimal>, pub spot_max: Option<Decimal>, pub cliquet_local_cap: Option<Decimal>, pub cliquet_local_floor: Option<Decimal>, pub cliquet_global_cap: Option<Decimal>, pub cliquet_global_floor: Option<Decimal>, pub rainbow_second_asset_price: Option<Positive>, pub rainbow_second_asset_volatility: Option<Positive>, pub rainbow_second_asset_dividend: Option<Positive>, pub rainbow_correlation: Option<Decimal>, pub spread_second_asset_volatility: Option<Positive>, pub spread_second_asset_dividend: Option<Positive>, pub spread_correlation: Option<Decimal>, pub quanto_fx_volatility: Option<Positive>, pub quanto_fx_correlation: Option<Decimal>, pub quanto_foreign_rate: Option<Decimal>, pub foreign_rate: Option<Decimal>, pub exchange_second_asset_volatility: Option<Positive>, pub exchange_second_asset_dividend: Option<Positive>, pub exchange_correlation: Option<Decimal>,
}
Expand description

Parameters for exotic option pricing models.

This structure holds specific data required by various exotic option types such as Asian options (which depend on average prices) and Lookback options (which depend on minimum/maximum prices during the option’s lifetime).

Each field is optional since different exotic option types require different parameters.

Fields§

§spot_prices: Option<Vec<Positive>>

Historical spot prices, primarily used for Asian options which depend on the average price of the underlying asset.

§spot_min: Option<Decimal>

Minimum observed spot price during the option’s lifetime, used for lookback option pricing.

§spot_max: Option<Decimal>

Maximum observed spot price during the option’s lifetime, used for lookback option pricing.

§cliquet_local_cap: Option<Decimal>

Local cap for Cliquet options, limiting the periodic return.

§cliquet_local_floor: Option<Decimal>

Local floor for Cliquet options, limiting the periodic return.

§cliquet_global_cap: Option<Decimal>

Global cap for Cliquet options, limiting the total return.

§cliquet_global_floor: Option<Decimal>

Global floor for Cliquet options, limiting the total return.

§rainbow_second_asset_price: Option<Positive>

Price of the second underlying asset for Rainbow options.

§rainbow_second_asset_volatility: Option<Positive>

Volatility of the second underlying asset for Rainbow options.

§rainbow_second_asset_dividend: Option<Positive>

Dividend yield of the second underlying asset for Rainbow options.

§rainbow_correlation: Option<Decimal>

Correlation between the two underlying assets for Rainbow options. Must be between -1.0 and 1.0.

§spread_second_asset_volatility: Option<Positive>

Volatility of the second underlying asset for Spread options.

§spread_second_asset_dividend: Option<Positive>

Dividend yield of the second underlying asset for Spread options.

§spread_correlation: Option<Decimal>

Correlation between the two underlying assets for Spread options. Must be between -1.0 and 1.0.

§quanto_fx_volatility: Option<Positive>

Volatility of the exchange rate for Quanto options.

§quanto_fx_correlation: Option<Decimal>

Correlation between the underlying asset and the exchange rate for Quanto options. Must be between -1.0 and 1.0.

§quanto_foreign_rate: Option<Decimal>

Foreign risk-free interest rate for Quanto options.

§foreign_rate: Option<Decimal>

Foreign risk-free interest rate r_f of a Garman–Kohlhagen FX option, per year, continuously compounded. Signed, so a negative foreign rate (CHF, JPY, EUR in parts of 2015–2022) is expressible, which Options::dividend_yield (a Positive) is not. When None, Garman–Kohlhagen falls back to Options::dividend_yield; when set, it takes precedence and dividend_yield is ignored by that model. Only the Garman–Kohlhagen pricer and Greeks read it; Quanto reads quanto_foreign_rate.

§exchange_second_asset_volatility: Option<Positive>

Volatility of the second underlying asset for Exchange options.

§exchange_second_asset_dividend: Option<Positive>

Dividend yield of the second underlying asset for Exchange options.

§exchange_correlation: Option<Decimal>

Correlation between the two underlying assets for Exchange options. Must be between -1.0 and 1.0.

Trait Implementations§

Source§

impl Clone for ExoticParams

Source§

fn clone(&self) -> Self

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
Source§

impl ComposeSchema for ExoticParams

Source§

impl Debug for ExoticParams

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for ExoticParams

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ExoticParams

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for ExoticParams

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ExoticParams

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for ExoticParams

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ExoticParams

Source§

impl ToSchema for ExoticParams

Source§

fn name() -> Cow<'static, str>

Return name of the schema. Read more
Source§

fn schemas(schemas: &mut Vec<(String, RefOr<Schema>)>)

Implement reference utoipa::openapi::schema::Schemas for this type. Read more

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PartialSchema for T
where T: ComposeSchema + ?Sized,

Source§

fn schema() -> RefOr<Schema>

Return ref or schema of implementing type that can then be used to construct combined schemas.
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more