pub struct StationaryAvellaneda {
pub gamma: f64,
pub kappa: f64,
pub a: f64,
pub sigma: f64,
}Expand description
Infinite-horizon Avellaneda-Stoikov market making model in inventory space.
See the module-level documentation for the formulation and exact solution.
Fields§
§gamma: f64Risk aversion for inventory holding.
kappa: f64Order filling intensity decay (kappa).
a: f64Base order arrival intensity (A).
sigma: f64Mid-price volatility.
Implementations§
Source§impl StationaryAvellaneda
impl StationaryAvellaneda
Sourcepub fn new(gamma: f64, kappa: f64, a: f64, sigma: f64) -> Self
pub fn new(gamma: f64, kappa: f64, a: f64, sigma: f64) -> Self
Creates a stationary Avellaneda model.
§Examples
use solver::models::stationary_avellaneda::StationaryAvellaneda;
let model = StationaryAvellaneda::new(0.1, 1.5, 140.0, 0.1);
assert_eq!(model.gamma, 0.1);Sourcepub fn base_spread(&self) -> f64
pub fn base_spread(&self) -> f64
The exact base half-spread at zero inventory.
Trait Implementations§
Source§impl Clone for StationaryAvellaneda
impl Clone for StationaryAvellaneda
Source§fn clone(&self) -> StationaryAvellaneda
fn clone(&self) -> StationaryAvellaneda
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 Debug for StationaryAvellaneda
impl Debug for StationaryAvellaneda
Source§impl StationaryEigenProblem<1> for StationaryAvellaneda
impl StationaryEigenProblem<1> for StationaryAvellaneda
Auto Trait Implementations§
impl Freeze for StationaryAvellaneda
impl RefUnwindSafe for StationaryAvellaneda
impl Send for StationaryAvellaneda
impl Sync for StationaryAvellaneda
impl Unpin for StationaryAvellaneda
impl UnsafeUnpin for StationaryAvellaneda
impl UnwindSafe for StationaryAvellaneda
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