Adds a full tick-level backtest path that operates on raw tick arrays (ltp, bid, ask, per-tick buy/sell qty deltas, oi) plus caller-computed entry/exit signal bool arrays. Entry fills at ask+slippage; stop/target checked against ltp on every tick; max-hold-seconds time exit; cooldown between entries. Produces identical BacktestMetrics as run_single_backtest via the new compute_backtest_metrics free fn. 5 Rust unit tests: target-hit, stop-hit, time-exit, multi-trade-with-cooldown, empty-ticks edge case — all pass (138 total, 0 failed). Co-Authored-By: porcelaincode <contact@alphabench.in>
20 lines
498 B
Rust
20 lines
498 B
Rust
//! Strategy implementations for different backtest types.
|
|
|
|
pub mod basket;
|
|
pub mod multi;
|
|
pub mod options;
|
|
pub mod pairs;
|
|
pub mod single;
|
|
pub mod spreads;
|
|
pub mod tick;
|
|
|
|
pub use basket::BasketBacktest;
|
|
pub use multi::MultiStrategyBacktest;
|
|
pub use options::OptionsBacktest;
|
|
pub use pairs::PairsBacktest;
|
|
pub use single::SingleBacktest;
|
|
pub use spreads::{
|
|
LegConfig, OptionType as SpreadOptionType, SpreadBacktest, SpreadConfig, SpreadType,
|
|
};
|
|
pub use tick::{TickBacktest, TickBacktestConfig};
|