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:
@@ -26,6 +26,7 @@ from raptorbt._raptorbt import (
|
||||
run_pairs_backtest,
|
||||
run_multi_backtest,
|
||||
run_spread_backtest,
|
||||
run_tick_backtest,
|
||||
# Batch backtest
|
||||
PyBatchSpreadItem,
|
||||
batch_spread_backtest,
|
||||
@@ -46,7 +47,7 @@ from raptorbt._raptorbt import (
|
||||
rolling_max,
|
||||
)
|
||||
|
||||
__version__ = "0.3.4"
|
||||
__version__ = "0.4.0"
|
||||
|
||||
__all__ = [
|
||||
# Config classes
|
||||
@@ -65,6 +66,7 @@ __all__ = [
|
||||
"run_pairs_backtest",
|
||||
"run_multi_backtest",
|
||||
"run_spread_backtest",
|
||||
"run_tick_backtest",
|
||||
# Batch backtest
|
||||
"PyBatchSpreadItem",
|
||||
"batch_spread_backtest",
|
||||
|
||||
Reference in New Issue
Block a user