pub struct MultiAssetGbmProcess {
pub drift_rates: Vec<f64>,
pub vols: Vec<f64>,
pub chol: Vec<Vec<f64>>,
}Expand description
N correlated lognormal assets as one N-state, N-factor process:
dS_i = (r - q_i) S_i dt + sigma_i S_i dW_i, d<W_i, W_j> = rho_ij dtThe correlation enters through the rows of the lower-triangular
Cholesky factor, so dw carries independent increments (the
StochasticProcess contract). evolve overrides the generic Euler
with the exact per-asset lognormal transition — under constant
coefficients the joint law is exact at any step size, so coarse
grids only cost monitoring resolution, never bias.
Fields§
§drift_rates: Vec<f64>Per-asset risk-neutral drift rates r - q_i.
vols: Vec<f64>§chol: Vec<Vec<f64>>Lower-triangular Cholesky factor of the asset correlation matrix.
Trait Implementations§
Source§impl StochasticProcess for MultiAssetGbmProcess
impl StochasticProcess for MultiAssetGbmProcess
Source§fn drift(&self, _t: f64, x: &[f64], out: &mut [f64])
fn drift(&self, _t: f64, x: &[f64], out: &mut [f64])
Drift vector
a(t, x) into out (dim long).Source§fn diffusion(&self, _t: f64, x: &[f64], out: &mut [f64])
fn diffusion(&self, _t: f64, x: &[f64], out: &mut [f64])
Diffusion matrix
b(t, x) into out, row-major dim × factors.Source§fn evolve(&self, _t: f64, x: &[f64], dt: f64, dw: &[f64], out: &mut [f64])
fn evolve(&self, _t: f64, x: &[f64], dt: f64, dw: &[f64], out: &mut [f64])
One Euler-Maruyama step from
x into out. The default
allocates small scratch buffers; hot loops should override with
model-specific stepping (which is also where non-Euler schemes —
exact transitions, Heston full-truncation/QE — live, since
generic multi-factor Milstein would need Lévy areas).Auto Trait Implementations§
impl Freeze for MultiAssetGbmProcess
impl RefUnwindSafe for MultiAssetGbmProcess
impl Send for MultiAssetGbmProcess
impl Sync for MultiAssetGbmProcess
impl Unpin for MultiAssetGbmProcess
impl UnsafeUnpin for MultiAssetGbmProcess
impl UnwindSafe for MultiAssetGbmProcess
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