pub struct RoughOrnsteinUhlenbeck {
pub kappa: f64,
pub theta: f64,
pub sigma: f64,
pub hurst: f64,
/* private fields */
}Expand description
Rough Ornstein-Uhlenbeck process with Hurst parameter H.
The fractional kernel K(t) = t^{H-1/2} / Gamma(H+1/2) is approximated
by a sum of exponentials via n_factors factors.
Fields§
§kappa: f64§theta: f64§sigma: f64§hurst: f64Implementations§
Trait Implementations§
Source§impl Clone for RoughOrnsteinUhlenbeck
impl Clone for RoughOrnsteinUhlenbeck
Source§fn clone(&self) -> RoughOrnsteinUhlenbeck
fn clone(&self) -> RoughOrnsteinUhlenbeck
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Simulatable for RoughOrnsteinUhlenbeck
impl Simulatable for RoughOrnsteinUhlenbeck
Source§type Output = RoughOUState
type Output = RoughOUState
The type emitted at each step (e.g.
f64 for GBM, BookSnapshot for L3).Source§fn dim(&self) -> usize
fn dim(&self) -> usize
Dimensionality of the Brownian driver. Used by the runner to
pre-generate the correct number of random normals per step.
GBM is 1, Heston is 2, etc.
Source§fn step(&mut self, dt: f64, dw: &[f64], _rng: &mut impl Rng) -> Self::Output
fn step(&mut self, dt: f64, dw: &[f64], _rng: &mut impl Rng) -> Self::Output
Advance the model by one step of size
dt. Read moreSource§fn current(&self) -> RoughOUState
fn current(&self) -> RoughOUState
The current state snapshot. Called once before simulation starts.
Source§impl StochasticProcess for RoughOrnsteinUhlenbeck
impl StochasticProcess for RoughOrnsteinUhlenbeck
type State = RoughOUState
type Diffusion = f64
type BrownianIncrement = f64
fn drift(&self, x: &Self::State, _t: f64) -> Self::State
fn diffusion(&self, _x: &Self::State, _t: f64) -> Self::Diffusion
fn jump_size<R: Rng + ?Sized>( &self, _x: &Self::State, _t: f64, _rng: &mut R, ) -> Self::State
fn expected_value(&self, x0: &Self::State, t: f64) -> Self::State
fn variance(&self, _x0: &Self::State, t: f64) -> Self::State
fn step<R: Rng + ?Sized>( &self, x: &Self::State, _t: f64, dt: f64, dw: &Self::BrownianIncrement, _rng: &mut R, ) -> Self::State
fn generate_increment<R: Rng + ?Sized>( &self, rng: &mut R, _dt: f64, ) -> Self::BrownianIncrement
fn simulate<R: Rng + ?Sized>( &self, x0: Self::State, t0: f64, t_end: f64, dt: f64, rng: &mut R, ) -> Vec<(f64, Self::State)>
fn jump_intensity(&self, _x: &Self::State, _t: f64) -> f64
fn simulate_paths( &self, x0: Self::State, t0: f64, t_end: f64, dt: f64, num_paths: usize, ) -> Vec<Vec<(f64, Self::State)>>
Auto Trait Implementations§
impl Freeze for RoughOrnsteinUhlenbeck
impl RefUnwindSafe for RoughOrnsteinUhlenbeck
impl Send for RoughOrnsteinUhlenbeck
impl Sync for RoughOrnsteinUhlenbeck
impl Unpin for RoughOrnsteinUhlenbeck
impl UnsafeUnpin for RoughOrnsteinUhlenbeck
impl UnwindSafe for RoughOrnsteinUhlenbeck
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more