Expand description
Monte Carlo engines to simulate stochastic processes.
The following is a list of stochastic processes that can be generated.
- Brownian Motions:
- Standard Brownian Motion
- $dX(t) = dW(t)$
- Arithmetic Brownian Motion
- $dX(t) = \mu dt + \sigma dW(t)$
- Geometric Brownian Motion
- $dX(t) = \mu X(t) dt + \sigma X(t) dW(t)$
- Fractional Brownian Motion
- Standard Brownian Motion
- Cox-Ingersoll-Ross (1985)
- $dX(t) = \left[ \theta - \alpha X(t) \right] dt + \sigma \sqrt{r_t} dW(t)$
- Ornstein-Uhlenbeck process
- $dX(t) = \theta \left[ \mu - X(t) \right] dt + \sigma dW(t)$
- Ho-Lee (1986)
- $dX(t) = \theta(t) dt + \sigma dW(t)$
- Hull-White (1990)
- $dX(t) = \left[ \theta(t) - \alpha X(t) \right]dt + \sigma dW(t)$
- Extended Vasicek (1990)
- $dX(t) = \left[ \theta(t) - \alpha(t) X(t) \right] dt + \sigma dW(t)$
- Black-Derman-Toy (1990)
- $d\ln[X(t)] = \left[ \theta(t) + \frac{\sigma’(t)}{\sigma(t)}\ln[X(t)] \right]dt + \sigma_t dW(t)$
use RustQuant::stochastics::*;
// Create new GBM with mu and sigma.
let gbm = GeometricBrownianMotion::new(0.05, 0.9);
// Generate path using Euler-Maruyama scheme.
// Parameters: x_0, t_0, t_n, n, sims, parallel.
let config = StochasticProcessConfig::new(10., 0., 0.5, 10, 1, false);
let output = (&gbm).euler_maruyama(&config);
println!("GBM = {:?}", output.paths);Re-exports§
pub use arithmetic_brownian_motion::*;pub use black_derman_toy::*;pub use brownian_motion::*;pub use constant_elasticity_of_variance::*;pub use cox_ingersoll_ross::*;pub use extended_vasicek::*;pub use fractional_brownian_motion::*;pub use fractional_cox_ingersoll_ross::*;pub use fractional_ornstein_uhlenbeck::*;pub use geometric_brownian_bridge::*;pub use geometric_brownian_motion::*;pub use heston::*;pub use ho_lee::*;pub use hull_white::*;pub use merton_jump_diffusion::*;pub use ornstein_uhlenbeck::*;pub use sabr::*;pub use process::*;pub use model_parameter::*;pub use nelson_siegel_svensson::*;pub use curve_model::*;
Modules§
- arithmetic_
brownian_ motion - Arithmetic Brownian Motion.
- black_
derman_ toy - Black-Derman-Toy short rate model.
- brownian_
motion - Standard Brownian Motion.
- constant_
elasticity_ of_ variance - Constant Elasticity of Variance process.
- cox_
ingersoll_ ross - Cox-Ingersoll-Ross process.
- curve_
model - Curve model trait. Curves models module.
- extended_
vasicek - Extended Vasicek process.
- fractional_
brownian_ motion - Fractional Brownian Motion.
- fractional_
cox_ ingersoll_ ross - Fractional Cox-Ingersoll-Ross process.
- fractional_
ornstein_ uhlenbeck - Fractional Ornstein-Uhlenbeck process.
- geometric_
brownian_ bridge - Geometric brownian bridge process.
- geometric_
brownian_ motion - Geometric Brownian Motion.
- heston
- Heston model process.
- ho_lee
- Ho-Lee process.
- hull_
white - Hull-White model process.
- merton_
jump_ diffusion - Merton jump diffusion process.
- model_
parameter - Model parameter struct.
- nelson_
siegel_ svensson - Nelson-Siegel-Svensson model process.
- ornstein_
uhlenbeck - Ornstein-Uhlenbeck process.
- process
- Defines
TrajectoriesandStochasticProcess.Trajectoriesis the return type of all the stochastic processes.StochasticProcessis the base trait for all the stochastic processes. - sabr
- SABR model process.