Commit d3735f5
committed
Add quantitative trading strategies targeting Sharpe >= 1.2
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__.py1 parent 3fe3d84 commit d3735f5
File tree
55 files changed
+2210
-19
lines changed- docs/strategy_comparison
- scripts
- src
- __pycache__
- api/__pycache__
- backtesting/__pycache__
- data/__pycache__
- models/__pycache__
- simulations/__pycache__
- strategies
- __pycache__
- ml
- __pycache__
- features
- __pycache__
- models/__pycache__
- validation
- __pycache__
- utils/__pycache__
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
55 files changed
+2210
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
0 commit comments