pub trait AccountTracker: Send {
    fn update(&mut self, timestamp: u64, price: f64, upnl: f64);
    fn log_rpnl(&mut self, rpnl: f64);
    fn log_fee(&mut self, fee: f64);
    fn log_limit_order_submission(&mut self);
    fn log_limit_order_cancellation(&mut self);
    fn log_limit_order_fill(&mut self);
    fn log_trade(&mut self, side: Side, price: f64, size: f64);
}
Expand description

Something that tracks the performance of the Account. This allows for greated flexibility over using the FullAccountTracker which can easily use more than 10GB of RAM due to storage of tick-by-tick returns

Required Methods

Update with each tick, using data provided in update_state method of Exchange # Arguments timestamp: timestamp of latest tick price: price of latest tick upnl: unrealized profit and loss of account in current tick

Log a realized profit and loss event

Log a fee event

Log a limit order submission event

Log a limit order cancellation event

Log a limit order fill event

Log a trade event where some order got filled and the position changed

Implementors