pub struct SviParams {
pub a: f64,
pub b: f64,
pub rho: f64,
pub m: f64,
pub sigma: f64,
}Expand description
Raw SVI parameters for a single expiry.
Fields§
§a: f64§b: f64§rho: f64§m: f64§sigma: f64Implementations§
Source§impl SviParams
impl SviParams
Sourcepub fn total_variance(&self, k: f64) -> f64
pub fn total_variance(&self, k: f64) -> f64
Total variance w(k) at log-moneyness k = ln(K/F).
Sourcepub fn validate(&self) -> Result<(), RustyQLibError>
pub fn validate(&self) -> Result<(), RustyQLibError>
Static parameter constraints: b >= 0, |rho| < 1, sigma > 0
and non-negative minimum variance a + b sigma sqrt(1 - rho^2).
Sourcepub fn butterfly_g(&self, k: f64) -> f64
pub fn butterfly_g(&self, k: f64) -> f64
The Gatheral-Jacquier butterfly function
g(k) = (1 - k w'/(2w))^2 - (w'^2/4)(1/w + 1/4) + w''/2,
which must stay non-negative for an arbitrage-free density.
Sourcepub fn min_butterfly_g(&self) -> f64
pub fn min_butterfly_g(&self) -> f64
Minimum of g(k) over a wide log-moneyness scan; negative means
the smile carries butterfly arbitrage.
pub fn has_butterfly_arbitrage(&self) -> bool
Trait Implementations§
impl Copy for SviParams
impl StructuralPartialEq for SviParams
Auto Trait Implementations§
impl Freeze for SviParams
impl RefUnwindSafe for SviParams
impl Send for SviParams
impl Sync for SviParams
impl Unpin for SviParams
impl UnsafeUnpin for SviParams
impl UnwindSafe for SviParams
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