Add settlement logic for option expiry with Settlement exit reason, leg_expiry_timestamps parameter for per-leg expiry tracking, and new single-leg spread types (LongCall, LongPut, NakedCall, NakedPut). Positions are force-closed at settlement with premiums replaced by intrinsic value, and re-entry is prevented after all legs expire.
Introduces PyBatchSpreadItem and batch_spread_backtest function for running multiple spread strategies in parallel using Rayon, enabling efficient multi-strategy backtesting workflows.
Add two new risk/reward metrics to BacktestMetrics:
- payoff_ratio: avg winning return / avg losing return (absolute)
- recovery_factor: net profit / max drawdown in absolute terms
Computed in both StreamingMetrics::finalize() and PortfolioEngine.
Exposed via PyO3 with #[pyo3(get)] on PyBacktestMetrics.
Updated README with API reference and changelog.
- Add Monte Carlo forward simulation using Geometric Brownian Motion
- Support correlated multi-asset simulation with Cholesky decomposition
- Implement parallel execution via Rayon for performance
- Expose simulate_portfolio_mc function in Python bindings
- Update version from 0.3.0 to 0.3.1 across all project files
* 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