pub struct AvellanedaStoikovStrategy {
pub params: AvellanedaStoikovParameters,
pub sigma: f64,
pub start_time: Option<f64>,
pub order_counter: u64,
pub price_history: VecDeque<f64>,
pub window_size: usize,
}Fields§
§params: AvellanedaStoikovParameters§sigma: f64§start_time: Option<f64>§order_counter: u64§price_history: VecDeque<f64>§window_size: usizeImplementations§
Source§impl AvellanedaStoikovStrategy
impl AvellanedaStoikovStrategy
pub fn new(params: AvellanedaStoikovParameters) -> Self
pub fn with_window_size(self, window_size: usize) -> Self
Trait Implementations§
Source§impl Strategy for AvellanedaStoikovStrategy
impl Strategy for AvellanedaStoikovStrategy
Source§fn on_tick(&mut self, obs: &Observation, requests: &mut Vec<OrderRequest>)
fn on_tick(&mut self, obs: &Observation, requests: &mut Vec<OrderRequest>)
Called each tick with the agent’s filtered observation.
Appends order requests (New, Cancel, CancelAll) to the provided buffer.
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Downcast helper — returns
self as &mut dyn Any.Auto Trait Implementations§
impl Freeze for AvellanedaStoikovStrategy
impl RefUnwindSafe for AvellanedaStoikovStrategy
impl Send for AvellanedaStoikovStrategy
impl Sync for AvellanedaStoikovStrategy
impl Unpin for AvellanedaStoikovStrategy
impl UnsafeUnpin for AvellanedaStoikovStrategy
impl UnwindSafe for AvellanedaStoikovStrategy
Blanket Implementations§
impl<T> Allocation for T
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> 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