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>
* feat: add session tracking and multi-leg spread backtesting
Add SessionTracker for trading session management: - Market hours detection (pre-open, trading, squareoff, post-close)
- Session boundary tracking with configurable timezone - Squareoff time support for intraday strategies - Session high/low/open price tracking
Add SpreadBacktest for multi-leg options strategies: - Support for straddles, strangles, vertical spreads, iron condors - Coordinated entry/exit across all legs - Net premium P&L calculation with max loss/target profit exits - Helper functions for common spread configurations
Extend StreamingMetrics for backtest integration: - Add equity and drawdown tracking (update_equity, current_drawdown_pct) - Add trade recording (record_trade, record_fees) - Add finalize() method to produce BacktestMetrics - Add with_initial_capital() constructor
Bump version to 0.2.0.
* chore: bump up version to 0.2.0
* feat: update version to 0.2.1 and add rolling min/max indicators
* fix: formatting