Struct SabrVolView
pub struct SabrVolView<'a, R: Scalar> {
data: &'a SabrVolSurface,
params: Cow<'a, [R]>,
}Expand description
A SABR surface lifted into mode R.
Fields§
§data: &'a SabrVolSurface§params: Cow<'a, [R]>Implementations§
§impl<'a, R: Scalar> SabrVolView<'a, R>
impl<'a, R: Scalar> SabrVolView<'a, R>
pub fn parameters(&self) -> &[R]
pub fn parameters(&self) -> &[R]
The lifted parameters.
pub fn surface(&self) -> &'a SabrVolSurface
pub fn surface(&self) -> &'a SabrVolSurface
The surface the view reads.
pub fn convention(&self) -> VolConvention
pub fn convention(&self) -> VolConvention
The smile’s convention.
pub fn node_parameters(&self, expiry_years: f64, tenor_years: f64) -> (R, R, R)
pub fn node_parameters(&self, expiry_years: f64, tenor_years: f64) -> (R, R, R)
(σ_ATM, ρ, ν) at (expiry_years, tenor_years): bilinear between
nodes, flat outside.
pub fn vol_at(
&self,
expiry_years: f64,
tenor_years: f64,
forward: R,
strike: f64,
) -> Result<R, RateVolError>
pub fn vol_at( &self, expiry_years: f64, tenor_years: f64, forward: R, strike: f64, ) -> Result<R, RateVolError>
The SABR vol at (expiry_years, tenor_years) of strike at forward
— α implied from the interpolated ATM vol at that forward.
§Errors
RateVolError::Sabr where the formula or the ATM solve refuses.
pub fn passive(&self) -> SabrVolView<'a, f64>
pub fn passive(&self) -> SabrVolView<'a, f64>
The derivative-free projection.
Trait Implementations§
§impl<'a, R: Clone + Scalar> Clone for SabrVolView<'a, R>
impl<'a, R: Clone + Scalar> Clone for SabrVolView<'a, R>
§fn clone(&self) -> SabrVolView<'a, R>
fn clone(&self) -> SabrVolView<'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 SabrVolView<'a, R>
impl<'a, R> RefUnwindSafe for SabrVolView<'a, R>where
R: RefUnwindSafe,
impl<'a, R> Send for SabrVolView<'a, R>
impl<'a, R> Sync for SabrVolView<'a, R>
impl<'a, R> Unpin for SabrVolView<'a, R>where
R: Unpin,
impl<'a, R> UnsafeUnpin for SabrVolView<'a, R>
impl<'a, R> UnwindSafe for SabrVolView<'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