9 Commits

Author SHA1 Message Date
KhizarImran 494f157c13 bench: add three-way speed benchmark (backtesting.py vs py-next vs native rust)
Adds a native-Rust SMA strategy path (Engine.run_native_sma) so we can time
the pure-Rust engine against the Python-callback path and backtesting.py.
2026-07-18 00:08:49 +01:00
Khizar c31e0088db feat: add standalone HTML reports 2026-07-17 14:54:59 +00:00
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 e79070539d feat: column-aware CSV loading and changelog
- Replaced manual CSV parsing with csv crate, columns now looked up by name
- Fixed Rust example path and contract_size
- Added CHANGELOG.md for release tracking

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 18:54:14 +01:00
KhizarImran 9847a99561 feat: stoploss and take profit implementation on the broker.rs 2026-06-13 12:01:44 +01:00
Khizar Imran 516f6029ac 13/06 2026-06-13 10:08:33 +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
Khizar Imran 1dc728078f new: added a working example 2026-06-06 16:18:45 +01:00