pub struct BacktestEngine;Expand description
Event-driven backtesting engine with realistic fill simulation.
Implementations§
Source§impl BacktestEngine
impl BacktestEngine
Sourcepub fn run(signals: Vec<EngineSignal>, config: EngineConfig) -> BacktestResult
pub fn run(signals: Vec<EngineSignal>, config: EngineConfig) -> BacktestResult
Run a backtest given a list of signals and a configuration.
Signals are matched against bars by bar index: each signal fires at the next bar’s open to avoid look-ahead. Slippage is added for longs and subtracted for shorts.
§Panics
Does not panic; returns an empty result when there are no bars.
Auto Trait Implementations§
impl Freeze for BacktestEngine
impl RefUnwindSafe for BacktestEngine
impl Send for BacktestEngine
impl Sync for BacktestEngine
impl Unpin for BacktestEngine
impl UnsafeUnpin for BacktestEngine
impl UnwindSafe for BacktestEngine
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