Commit Graph

5 Commits

Author SHA1 Message Date
KhizarImran c22153f02f feat: strategy data access, sharpe ratio, and correctness fixes
- Trade.pnl now stores net pnl (after exit commission) so per-trade stats are accurate
- Position pyclass uses from_py_object to fix deprecation warning
- Removed dead AttributeError swallow in engine.rs
- Strategy gains self.data, self.index, self.cash, self.equity properties
- Broker.cash exposed to Python via pyo3(get)
- Sharpe ratio added to Stats (unannualized)
- Added examples/sma_cross.py and examples/compare_bt.py
- Logic verified against backtesting.py: 34 trades, 29.4% win rate match
2026-07-05 14:42:10 +01:00
KhizarImran 706be103f0 bug fixes: types.rs 2026-06-20 17:52:19 +01:00
KhizarImran 322ff54d63 made pyclass work for stats 2026-06-14 01:29:20 +01:00
Khizar Imran 26e625d6f8 new: better stats 2026-06-08 23:55:42 +01:00
Khizar Imran bbfe87edb7 checkpoint: spread/commisions working 2026-06-06 17:16:32 +01:00