feat(tick): add run_tick_backtest — tick-native simulation engine, bump to 0.4.0
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>
This commit is contained in:
co-authored by
porcelaincode
parent
514c235f1c
commit
fa6959bb99
@@ -6,6 +6,7 @@ pub mod options;
|
||||
pub mod pairs;
|
||||
pub mod single;
|
||||
pub mod spreads;
|
||||
pub mod tick;
|
||||
|
||||
pub use basket::BasketBacktest;
|
||||
pub use multi::MultiStrategyBacktest;
|
||||
@@ -15,3 +16,4 @@ pub use single::SingleBacktest;
|
||||
pub use spreads::{
|
||||
LegConfig, OptionType as SpreadOptionType, SpreadBacktest, SpreadConfig, SpreadType,
|
||||
};
|
||||
pub use tick::{TickBacktest, TickBacktestConfig};
|
||||
|
||||
Reference in New Issue
Block a user