Struct FutureOptionVolView
pub struct FutureOptionVolView<'a, R: Scalar> {
data: &'a FutureOptionVolSurface,
params: Cow<'a, [R]>,
}Expand description
A futures option vol surface lifted into mode R.
Fields§
§data: &'a FutureOptionVolSurface§params: Cow<'a, [R]>Implementations§
§impl<'a, R: Scalar> FutureOptionVolView<'a, R>
impl<'a, R: Scalar> FutureOptionVolView<'a, R>
pub fn parameters(&self) -> &[R]
pub fn parameters(&self) -> &[R]
The lifted node vols, in parameter order.
pub fn convention(&self) -> VolConvention
pub fn convention(&self) -> VolConvention
The quoting convention.
pub fn year_fraction(&self, date: NaiveDate) -> f64
pub fn year_fraction(&self, date: NaiveDate) -> f64
The year fraction from the surface’s reference date to date, in the
measure the vols are quoted per unit of. A pricer reads its option’s
life here rather than counting it for itself.
pub fn vol(&self, expiry: NaiveDate, strike: f64) -> R
pub fn vol(&self, expiry: NaiveDate, strike: f64) -> R
The vol at expiry and strike: linear in strike within an expiry,
linear in total variance across expiries, flat beyond every end.
fn row_vol(&self, i: usize, strike: f64) -> R
fn row_vol(&self, i: usize, strike: f64) -> R
Expiry row i’s vol at strike, linear between strikes, flat beyond.
pub fn passive(&self) -> FutureOptionVolView<'a, f64>
pub fn passive(&self) -> FutureOptionVolView<'a, f64>
The derivative-free projection.
Trait Implementations§
§impl<'a, R: Clone + Scalar> Clone for FutureOptionVolView<'a, R>
impl<'a, R: Clone + Scalar> Clone for FutureOptionVolView<'a, R>
§fn clone(&self) -> FutureOptionVolView<'a, R>
fn clone(&self) -> FutureOptionVolView<'a, R>
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 moreAuto Trait Implementations§
impl<'a, R> Freeze for FutureOptionVolView<'a, R>
impl<'a, R> RefUnwindSafe for FutureOptionVolView<'a, R>where
R: RefUnwindSafe,
impl<'a, R> Send for FutureOptionVolView<'a, R>
impl<'a, R> Sync for FutureOptionVolView<'a, R>
impl<'a, R> Unpin for FutureOptionVolView<'a, R>where
R: Unpin,
impl<'a, R> UnsafeUnpin for FutureOptionVolView<'a, R>
impl<'a, R> UnwindSafe for FutureOptionVolView<'a, R>where
R: RefUnwindSafe + UnwindSafe,
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