Skip to main content

MarketProcess

Trait MarketProcess 

Source
pub trait MarketProcess: StochasticProcess {
    // Required methods
    fn get_price(&self, state: &Self::State) -> f64;
    fn add_price_impact(&self, state: &mut Self::State, impact: f64);

    // Provided methods
    fn get_volatility(&self, _state: &Self::State) -> Option<f64> { ... }
    fn get_drift(&self, _state: &Self::State) -> Option<f64> { ... }
    fn get_parameters(&self) -> Option<HashMap<String, f64>> { ... }
}

Required Methods§

Source

fn get_price(&self, state: &Self::State) -> f64

Source

fn add_price_impact(&self, state: &mut Self::State, impact: f64)

Provided Methods§

Source

fn get_volatility(&self, _state: &Self::State) -> Option<f64>

Source

fn get_drift(&self, _state: &Self::State) -> Option<f64>

Source

fn get_parameters(&self) -> Option<HashMap<String, f64>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl MarketProcess for BatesProcess

Source§

fn get_price(&self, state: &Array1<f64>) -> f64

Source§

fn get_volatility(&self, state: &Array1<f64>) -> Option<f64>

Source§

fn get_drift(&self, _state: &Array1<f64>) -> Option<f64>

Source§

fn get_parameters(&self) -> Option<HashMap<String, f64>>

Source§

fn add_price_impact(&self, state: &mut Array1<f64>, impact: f64)

Source§

impl MarketProcess for GeometricBrownianMotion

Source§

fn get_price(&self, state: &f64) -> f64

Source§

fn get_volatility(&self, _state: &f64) -> Option<f64>

Source§

fn get_drift(&self, _state: &f64) -> Option<f64>

Source§

fn get_parameters(&self) -> Option<HashMap<String, f64>>

Source§

fn add_price_impact(&self, state: &mut f64, impact: f64)

Source§

impl MarketProcess for HestonProcess

Source§

fn get_price(&self, state: &Array1<f64>) -> f64

Source§

fn get_volatility(&self, state: &Array1<f64>) -> Option<f64>

Source§

fn get_drift(&self, _state: &Array1<f64>) -> Option<f64>

Source§

fn get_parameters(&self) -> Option<HashMap<String, f64>>

Source§

fn add_price_impact(&self, state: &mut Array1<f64>, impact: f64)

Implementors§