StochasticVolatilityProcess

Trait StochasticVolatilityProcess 

Source
pub trait StochasticVolatilityProcess: Sync {
    // Required methods
    fn drift_1(&self, x: f64, t: f64) -> f64;
    fn drift_2(&self, x: f64, t: f64) -> f64;
    fn diffusion_1(&self, x: f64, t: f64) -> f64;
    fn diffusion_2(&self, x: f64, t: f64) -> f64;

    // Provided method
    fn euler_maruyama(
        &self,
        x_0: f64,
        y_0: f64,
        t_0: f64,
        t_n: f64,
        n_steps: usize,
        m_paths: usize,
        parallel: bool,
    ) -> Trajectories { ... }
}
Expand description

Trait to implement stochastic volatility processes.

Required Methods§

Source

fn drift_1(&self, x: f64, t: f64) -> f64

Base method for the asset’s drift.

Source

fn drift_2(&self, x: f64, t: f64) -> f64

Base method for the volatility process’ drift.

Source

fn diffusion_1(&self, x: f64, t: f64) -> f64

Base method for the asset’s diffusion.

Source

fn diffusion_2(&self, x: f64, t: f64) -> f64

Base method for the volatility process’ diffusion.

Provided Methods§

Source

fn euler_maruyama( &self, x_0: f64, y_0: f64, t_0: f64, t_n: f64, n_steps: usize, m_paths: usize, parallel: bool, ) -> Trajectories

Simulate via Euler-Maruyama discretisation scheme.

Implementors§