pub struct FlatSmileSection { /* private fields */ }Expand description
A SmileSection with one volatility for every strike.
Implementations§
Source§impl FlatSmileSection
impl FlatSmileSection
Sourcepub fn with_reference_date(
exercise_date: Date,
vol: Volatility,
day_counter: DayCounter,
reference_date: Date,
atm_level: Option<Rate>,
volatility_type: VolatilityType,
shift: Rate,
) -> QlResult<FlatSmileSection>
pub fn with_reference_date( exercise_date: Date, vol: Volatility, day_counter: DayCounter, reference_date: Date, atm_level: Option<Rate>, volatility_type: VolatilityType, shift: Rate, ) -> QlResult<FlatSmileSection>
Flat section anchored to a fixed reference date (C++’s Date
constructor).
§Errors
Propagates SmileSectionBase::with_reference_date.
Sourcepub fn with_exercise_time(
exercise_time: Time,
vol: Volatility,
day_counter: DayCounter,
atm_level: Option<Rate>,
volatility_type: VolatilityType,
shift: Rate,
) -> QlResult<FlatSmileSection>
pub fn with_exercise_time( exercise_time: Time, vol: Volatility, day_counter: DayCounter, atm_level: Option<Rate>, volatility_type: VolatilityType, shift: Rate, ) -> QlResult<FlatSmileSection>
Flat section built from an exercise time (C++’s Time constructor).
§Errors
Propagates SmileSectionBase::with_exercise_time.
Trait Implementations§
Source§impl Clone for FlatSmileSection
impl Clone for FlatSmileSection
Source§fn clone(&self) -> FlatSmileSection
fn clone(&self) -> FlatSmileSection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FlatSmileSection
impl Debug for FlatSmileSection
Source§impl SmileSection for FlatSmileSection
impl SmileSection for FlatSmileSection
Source§fn base(&self) -> &SmileSectionBase
fn base(&self) -> &SmileSectionBase
The shared state holder.
Source§fn volatility_impl(&self, _strike: Rate) -> QlResult<Volatility>
fn volatility_impl(&self, _strike: Rate) -> QlResult<Volatility>
Volatility at
strike; the caller owns any range checking. Read moreSource§fn min_strike(&self) -> Rate
fn min_strike(&self) -> Rate
The lowest strike the section can quote.
Source§fn max_strike(&self) -> Rate
fn max_strike(&self) -> Rate
The highest strike the section can quote.
Source§fn atm_level(&self) -> Option<Rate>
fn atm_level(&self) -> Option<Rate>
The at-the-money level, or
None when the section provides none.Source§fn volatility(&self, strike: Rate) -> QlResult<Volatility>
fn volatility(&self, strike: Rate) -> QlResult<Volatility>
Volatility at
strike. Read moreSource§fn exercise_time(&self) -> Time
fn exercise_time(&self) -> Time
The exercise time this section was built for.
Source§fn day_counter(&self) -> DayCounter
fn day_counter(&self) -> DayCounter
The day counter used to turn dates into times.
Source§fn volatility_type(&self) -> VolatilityType
fn volatility_type(&self) -> VolatilityType
The volatility model this section is quoted against.
Source§fn reference_date(&self) -> QlResult<Date>
fn reference_date(&self) -> QlResult<Date>
The reference date the section is anchored to. Read more
Source§fn option_price(
&self,
strike: Rate,
option_type: OptionType,
discount: Real,
) -> QlResult<Real>
fn option_price( &self, strike: Rate, option_type: OptionType, discount: Real, ) -> QlResult<Real>
Undiscounted-times-
discount price of a European option struck at
strike, priced through the section’s volatility model. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for FlatSmileSection
impl !Send for FlatSmileSection
impl !Sync for FlatSmileSection
impl !UnwindSafe for FlatSmileSection
impl Freeze for FlatSmileSection
impl Unpin for FlatSmileSection
impl UnsafeUnpin for FlatSmileSection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more