pub struct HestonParams {
pub v0: f64,
pub kappa: f64,
pub theta: f64,
pub vol_of_vol: f64,
pub rho: f64,
}Expand description
Heston parameters. theta is the long-run variance, v0 the initial
variance, vol_of_vol the volatility of variance (often written xi or
sigma), rho the spot-variance correlation.
Fields§
§v0: f64§kappa: f64§theta: f64§vol_of_vol: f64§rho: f64Implementations§
Source§impl HestonParams
impl HestonParams
pub fn validate(&self) -> Result<(), RustyQLibError>
Sourcepub fn feller_condition_holds(&self) -> bool
pub fn feller_condition_holds(&self) -> bool
Whether the Feller condition 2 kappa theta >= vol_of_vol^2 holds
(if not, the variance process can touch zero; pricing still works).
Sourcepub fn with_vol_shift(&self, shift: f64) -> HestonParams
pub fn with_vol_shift(&self, shift: f64) -> HestonParams
Parameters with a parallel shift applied to the instantaneous and long-run vol (used for vega bump-and-reprice).
Trait Implementations§
Source§impl Clone for HestonParams
impl Clone for HestonParams
Source§fn clone(&self) -> HestonParams
fn clone(&self) -> HestonParams
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 moreimpl Copy for HestonParams
Source§impl Debug for HestonParams
impl Debug for HestonParams
Source§impl<'de> Deserialize<'de> for HestonParams
impl<'de> Deserialize<'de> for HestonParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 PartialEq for HestonParams
impl PartialEq for HestonParams
Source§impl Serialize for HestonParams
impl Serialize for HestonParams
impl StructuralPartialEq for HestonParams
Auto Trait Implementations§
impl Freeze for HestonParams
impl RefUnwindSafe for HestonParams
impl Send for HestonParams
impl Sync for HestonParams
impl Unpin for HestonParams
impl UnsafeUnpin for HestonParams
impl UnwindSafe for HestonParams
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