pub struct VarianceGammaProcess {
pub mu: f64,
pub sigma: f64,
pub nu: f64,
}Expand description
The Variance-Gamma process: X_t = μ G_t + σ W_{G_t} where G_t is a Gamma process (subordinator) and W is a Brownian motion.
VG is a popular model in mathematical finance (Madan-Seneta model).
Fields§
§mu: f64Drift parameter μ (asymmetry).
sigma: f64Volatility parameter σ.
nu: f64Variance rate ν of the Gamma subordinator.
Implementations§
Source§impl VarianceGammaProcess
impl VarianceGammaProcess
Sourcepub fn new(mu: f64, sigma: f64, nu: f64) -> Self
pub fn new(mu: f64, sigma: f64, nu: f64) -> Self
Create a VG process with parameters (μ, σ, ν).
Sourcepub fn simulate(
&self,
x0: f64,
t_end: f64,
n_steps: u32,
seed: u64,
) -> Vec<(f64, f64)>
pub fn simulate( &self, x0: f64, t_end: f64, n_steps: u32, seed: u64, ) -> Vec<(f64, f64)>
Simulate a VG path starting at x0 over [0, t_end] with n_steps steps.
At each step, sample dG ~ Gamma(dt/ν, 1/ν), then X += μ dG + σ √(dG) Z.
Sourcepub fn theoretical_mean(&self, x0: f64, t: f64) -> f64
pub fn theoretical_mean(&self, x0: f64, t: f64) -> f64
Theoretical mean of X_t: E[X_t] = x0 + μ t.
Sourcepub fn theoretical_variance(&self, t: f64) -> f64
pub fn theoretical_variance(&self, t: f64) -> f64
Theoretical variance of X_t: Var[X_t] = σ² t + μ² ν t.
Sourcepub fn characteristic_exponent(&self, u: f64) -> f64
pub fn characteristic_exponent(&self, u: f64) -> f64
The VG characteristic exponent ψ(u) = log E[e^{iuX_1}].
Auto Trait Implementations§
impl Freeze for VarianceGammaProcess
impl RefUnwindSafe for VarianceGammaProcess
impl Send for VarianceGammaProcess
impl Sync for VarianceGammaProcess
impl Unpin for VarianceGammaProcess
impl UnsafeUnpin for VarianceGammaProcess
impl UnwindSafe for VarianceGammaProcess
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