pub struct AvellanedaStoikovBilateralHawkesOrderFlowImbalanceStrategy {
pub params: AvellanedaStoikovBilateralHawkesOrderFlowImbalanceParameters,
pub bid_spread_table: Arc<LookupTable>,
pub ask_spread_table: Arc<LookupTable>,
/* private fields */
}Expand description
Avellaneda-Stoikov strategy driven by precomputed FDM bilateral-Hawkes-with-OFI spreads.
On every tick the strategy:
- Reads
hawkes_buy_intensity(lambda+) andhawkes_sell_intensity(lambda-) fromobs.parameters. - Interpolates the 4-D FDM spread tables at
(q, lambda+, lambda-, tau). - Places bid/ask orders at
mid -/+ interpolated_spread.
The spreads embed the adverse-selection response to order flow imbalance, automatically skewing quotes when one side is more toxic than the other.
§Table format
Both tables must be 4-dimensional with axes [q, lambda+, lambda-, tau]:
- axis 0: inventory grid (e.g. -10..10, 21 points)
- axis 1: buy-side intensity grid (e.g. 0.0..8.0, 40 points)
- axis 2: sell-side intensity grid (e.g. 0.0..8.0, 40 points)
- axis 3: time remaining in seconds (0.0..T_HORIZON)
Fields§
§params: AvellanedaStoikovBilateralHawkesOrderFlowImbalanceParameters§bid_spread_table: Arc<LookupTable>4D lookup table for the bid half-spread: axes [q, lambda+, lambda-, tau].
ask_spread_table: Arc<LookupTable>4D lookup table for the ask half-spread: axes [q, lambda+, lambda-, tau].
Implementations§
Source§impl AvellanedaStoikovBilateralHawkesOrderFlowImbalanceStrategy
impl AvellanedaStoikovBilateralHawkesOrderFlowImbalanceStrategy
pub fn new( params: AvellanedaStoikovBilateralHawkesOrderFlowImbalanceParameters, bid_spread_table: Arc<LookupTable>, ask_spread_table: Arc<LookupTable>, ) -> Self
Trait Implementations§
Source§impl Clone for AvellanedaStoikovBilateralHawkesOrderFlowImbalanceStrategy
impl Clone for AvellanedaStoikovBilateralHawkesOrderFlowImbalanceStrategy
Source§fn clone(&self) -> AvellanedaStoikovBilateralHawkesOrderFlowImbalanceStrategy
fn clone(&self) -> AvellanedaStoikovBilateralHawkesOrderFlowImbalanceStrategy
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 Strategy for AvellanedaStoikovBilateralHawkesOrderFlowImbalanceStrategy
impl Strategy for AvellanedaStoikovBilateralHawkesOrderFlowImbalanceStrategy
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 AvellanedaStoikovBilateralHawkesOrderFlowImbalanceStrategy
impl RefUnwindSafe for AvellanedaStoikovBilateralHawkesOrderFlowImbalanceStrategy
impl Send for AvellanedaStoikovBilateralHawkesOrderFlowImbalanceStrategy
impl Sync for AvellanedaStoikovBilateralHawkesOrderFlowImbalanceStrategy
impl Unpin for AvellanedaStoikovBilateralHawkesOrderFlowImbalanceStrategy
impl UnsafeUnpin for AvellanedaStoikovBilateralHawkesOrderFlowImbalanceStrategy
impl UnwindSafe for AvellanedaStoikovBilateralHawkesOrderFlowImbalanceStrategy
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> 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