1. Paper equity calculation (High): - get_balance() now correctly includes position value (size * current_price) - Previously only added unrealized_pnl, missing position principal 2. Buy affordability checks (High): - place_order() now uses execution price including slippage for market orders - Uses limit price for limit orders instead of current price - Prevents orders that would drive cash negative 3. ExchangeInterface price stubs (High): - get_trade_executed_price() now handles order_price=0.0 (market orders) - Falls back to current price or entry price when order_price is zero 4. Determinism hash strengthening (Medium): - Hash now includes full trade sequence with individual trade details - Added test for different trade sequences with same totals 5. Live mode consistency (Medium): - Factory now falls back to paper trading with warning instead of raising - Consistent behavior between factory.py and Strategies.py Added test: test_paper_broker_equity_calculation to verify fix #1 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| UML | ||
| __pycache__ | ||
| archived_code | ||
| config | ||
| markdown | ||
| src | ||
| tests | ||
| .claudeignore | ||
| .gitignore | ||
| BrighterTrading.db | ||
| CLAUDE.md | ||
| pytest.ini | ||
| requirements.txt | ||