pub struct GeometricBrownianBridge {
pub mu: ModelParameter,
pub sigma: ModelParameter,
pub end_value: f64,
pub end_time: f64,
}Expand description
Struct containing the Geometric Brownian Bridge parameters. The Geometric Brownian Bridge is a stochastic process that models a path-dependent option. It is a modification of the Geometric Brownian Motion where the end value is known.
Fields§
§mu: ModelParameterThe drift ($\mu$) in percentage.
sigma: ModelParameterThe volatility ($\sigma$) in percentage.
end_value: f64The known end value of the process.
end_time: f64The known end time of the process.
Implementations§
Source§impl GeometricBrownianBridge
impl GeometricBrownianBridge
Sourcepub fn new(
mu: impl Into<ModelParameter>,
sigma: impl Into<ModelParameter>,
end_value: f64,
end_time: f64,
) -> GeometricBrownianBridge
pub fn new( mu: impl Into<ModelParameter>, sigma: impl Into<ModelParameter>, end_value: f64, end_time: f64, ) -> GeometricBrownianBridge
Create a new Geometric Brownian Bridge process.
§Arguments
mu- The drift ($\mu$) in percentage.sigma- The volatility ($\sigma$) in percentage.end_value- The known end value of the process.end_time- The known end time of the process.
Trait Implementations§
Source§impl StochasticProcess for GeometricBrownianBridge
impl StochasticProcess for GeometricBrownianBridge
Source§fn diffusion(&self, x: f64, t: f64) -> f64
fn diffusion(&self, x: f64, t: f64) -> f64
The diffusion function for the Geometric Brownian Bridge.
Source§fn jump(&self, _x: f64, _t: f64) -> Option<f64>
fn jump(&self, _x: f64, _t: f64) -> Option<f64>
The jump function for the Geometric Brownian Bridge. As the Geometric Brownian Bridge does not have a jump term, this always returns None.
Source§fn parameters(&self) -> Vec<f64>
fn parameters(&self) -> Vec<f64>
Return the model’s parameters as a
Vec<f64>.Source§fn euler_maruyama(&self, config: &StochasticProcessConfig) -> Trajectories
fn euler_maruyama(&self, config: &StochasticProcessConfig) -> Trajectories
Euler-Maruyama discretisation scheme. Read more
Auto Trait Implementations§
impl Freeze for GeometricBrownianBridge
impl !RefUnwindSafe for GeometricBrownianBridge
impl Send for GeometricBrownianBridge
impl Sync for GeometricBrownianBridge
impl Unpin for GeometricBrownianBridge
impl !UnwindSafe for GeometricBrownianBridge
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.