Conversation
BUGS FIXED: 1. Execution handler was using $100 default price for market orders instead of actual market prices, causing cascading calculation errors 2. Signal generation was processing ALL historical bars on each market event, causing signals to accumulate exponentially 3. Performance metrics formatting was double-multiplying percentages CHANGES: - execution_handler.py: Added set_data_handler() to get actual prices - engine.py: Connect data handler to execution handler - momentum.py, momentum_simplified.py, mean_reversion.py, trend_following.py: Added latest_only parameter to generate_signals() to only process the latest bar during live backtesting - run_router_backtest.py: Fixed percentage display formatting TESTING: - Backtest now completes in ~2.7s with 65 trades - Metrics are now reasonable (7.88% max drawdown, 41.54% win rate)
- Updated strategy comparison results from latest backtest run - Made autonomous_trading_system.sh executable
Implemented multiple trading strategies with both long and short capabilities: - TrendMomentumStrategy: Trend-following strategy with MACD, RSI, and EMA - Best single-stock (GOOGL): 0.51 Sharpe, 3.94% return, 50% win rate - Multi-stock: 0.32 Sharpe, 3.66% return, profit factor 1.55 - QuantitativeStrategy: Statistical z-score based strategy - Supports both long and short operations - Regime-aware position sizing - Asymmetric risk management (tighter stops for shorts) - MLEnsembleStrategy: ML-based approach (data limited for full training) - Random Forest, GBM, XGBoost ensemble - Feature engineering with 50+ technical indicators Key findings: - Underlying stocks had Sharpe 0.71-1.64 as buy-and-hold - Active trading adds volatility, making Sharpe 1.2 target challenging - Best approach: Patient trend-following with wide stops and high targets Fixed issues: - Fixed missing Optional import in cross_validator.py - Fixed imports in ml/features/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.