Trading Strategies Explained
How the ML-based system compares to 25+ traditional trading strategies — what’s implemented, what could be added, and why machine learning outperforms fixed-rule systems.
Quick Answer: What Makes Our System Different?
Traditional trading strategies use fixed rules (e.g., “When indicator X reaches Y, buy the stock”).
Our system uses machine learning to discover patterns from thousands of historical examples, finding complex relationships between multiple indicators that humans might miss.
Instead of hardcoding “when RSI drops below 30, buy,” our models learn: “When RSI is 28 AND moving averages are rising AND volume spikes AND volatility is moderate, the price goes up 78% of the time in the next 25 minutes.”
1. Strategy Index
Quick reference to all strategies discussed and how they relate to our system:
IMPLEMENTED Already in Our System
| Strategy | Status | Location |
|---|---|---|
| Machine Learning-Based | Core System | Stage 4: Training, Stage 5: Inference |
| Momentum | Feature | Stage 2: RSI, MACD, MACD Signal, MACD Histogram in bars |
| VWAP Trading | Feature | Stage 2: One of 21 indicators |
| Volatility Trading | Feature | Stage 2: ATR, Bollinger Bands |
| Pattern Recognition | Implicit | Models learn multi-indicator patterns |
| Candlestick Patterns | Implicit | ML sees raw O/H/L/C relationships; scalable to explicit features |
| Bollinger Band Breakout | Components | Stage 2: BB + EMAs; ML learns pattern |
| Supertrend | Components | Stage 2: ATR calculated; ML learns trend |
ENTRY/EXIT Trading Logic (Stage 6)
| Strategy | Status | Location |
|---|---|---|
| Scalping | Supported | H1 (5-min horizon) predictions |
| Adaptive | Tiered Strategy | Adjusts risk by confidence level |
| Sentiment Analysis | Phase 5 | Alpha Vantage News API |
| Deep Reinforcement Learning | Phase 7+ | Would replace RandomForest |
| Genetic Algorithms | Future | Optimize hyperparameters |
EXECUTION How Orders Execute (Different Layer)
| Strategy | Current Approach | Enhancement |
|---|---|---|
| TWAP | Market orders (instant) | Split large orders over time |
| VWAP Execution | Market orders | Execute only when price favorable vs VWAP |
| Smart Order Routing | Alpaca handles automatically | Multi-venue logic |
| Market-Making | The system is a taker | Different business model |
OTHER Algorithmic Strategies
| Strategy | Status | Notes |
|---|---|---|
| Mean Reversion | ML Learns | BB, RSI, EMAs already calculated |
| Breakout Strategies | ML Learns | Price, volume, ATR available |
| News-Based Trading | Phase 5 | Sentiment aggregation |
| Gap Trading | Easy Add | Just need gap_pct feature |
| Grid Trading | Could Add | Needs limit orders |
| Pre-Market/After-Hours | Could Extend | Infrastructure supports it |
| Arbitrage | N/A | Requires multi-asset, microsecond execution |
| High-Frequency Trading | N/A | Sub-second vs our 5-min bars |
| Dark Pool Trading | N/A | Institutional only |
| Options Strategies | N/A | Different asset class |
| Order Flow Imbalance | N/A | Needs Level 2 order book |
DOESN’T FIT Architecture Mismatch
| Strategy | Why It Doesn’t Fit |
|---|---|
| Pairs Trading | Requires trading 2 stocks simultaneously. Our system trades symbols independently. |
| Seasonality Trading | Calendar-based patterns. Could add as features but not primary strategy. |
2. Understanding Traditional Strategies
Let’s demystify the most common trading strategies people ask about. Each strategy is explained in business terms with clear examples.
Already Implemented Strategies (8 strategies)
Machine Learning-Based Strategy
What it is: Use algorithms that learn patterns from historical data to predict future price movements.
Example: “RandomForest model learns: When RSI=28 + Volume spike + EMA rising + ATR moderate → 78% chance price goes up in next 25 minutes.”
Momentum Strategy
What it is: Trade in the direction of strong price movement using indicators like RSI or MACD.
Traditional: “If RSI < 30, buy.” — Our ML: Learns when RSI matters and when it doesn’t.
rsi, macd, macd_signal, macd_histogram (momentum) plus ema_20, ema_50, ema_spread (trend)VWAP Trading Strategy
What it is: VWAP (Volume-Weighted Average Price) is the average price weighted by trading volume throughout the day. Traders believe if current price is below VWAP, the stock is “undervalued.”
Traditional: “When price drops 2% below VWAP, buy.” — Our ML: Discovers “price below VWAP + volume spike → 80% UP” vs “price below VWAP + low volume → 50% UP (don’t trade)”
bars table.Volatility Trading Strategy
What it is: Trade based on how much prices are moving. Uses Bollinger Bands or ATR (Average True Range).
Our ML advantage: Learns when volatility means opportunity vs. danger. Fixed rules can’t distinguish.
atr, bb_upper, bb_lower, bb_width columns already in Stage 2.Pattern Recognition
What it is: Identify chart patterns (head and shoulders, triangles, flags) that historically precede price moves.
Limitation: Subjective — what looks like a pattern to one trader looks different to another.
🕯️ Candlestick Patterns
What they are: Candlestick patterns (Hammer, Doji, Engulfing, Shooting Star, Marubozu, Tweezer, etc.) are visual formations in price charts that traders use to predict reversals or continuations. They’re among the most popular topics in trading education.
How they work: Each pattern is a specific relationship between Open, High, Low, and Close within one or two consecutive bars:
| Pattern | What It Means in Data | Signal |
|---|---|---|
| Hammer | Long lower wick, small body near high | Bullish reversal |
| Shooting Star | Long upper wick, small body near low | Bearish reversal |
| Doji | Open ≈ Close (tiny body, any wick length) | Indecision / reversal |
| Bullish Engulfing | Current bar’s body fully covers previous bar’s bearish body | Bullish reversal |
| Bearish Engulfing | Current bar’s body fully covers previous bar’s bullish body | Bearish reversal |
| Marubozu | No wicks — open = low & close = high (bullish) or vice versa | Strong momentum |
| Tweezer Top/Bottom | Two bars with matching highs (top) or lows (bottom) | Reversal at support/resistance |
| Morning/Evening Star | Three-bar pattern: trend bar → small body → reversal bar | Strong reversal |
open, high, low, and close. The RandomForest model sees all four values on every bar and learns which price geometries are predictive.Why the system already captures this: Through thousands of training examples, the model can learn:
- “When close is near high AND low is far below open (= Hammer) AND RSI < 35 → 76% chance UP”
- “When open ≈ close (= Doji) AND ATR is high AND volume spikes → trend reversal likely”
ML advantage over traditional candlestick trading:
Traditional approach says: “Hammer at support = ALWAYS buy.” The RandomForest learns from data:
- “Hammer + high volume + RSI oversold → 78% UP” — Trade!
- “Hammer + low volume + downtrend accelerating → 51% UP” — Skip!
- “Hammer works better on AAPL at 10am than at 3:30pm” (time-aware)
- “Engulfing patterns are more reliable after 3+ red bars than after 1” (context-aware)
Scalable by design: The system’s feature engineering pipeline is modular — adding explicit candlestick pattern features (body ratios, wick ratios, pattern flags) is a straightforward extension that further sharpens the model’s pattern recognition without changing the existing architecture.
📊 Bollinger Band Breakout Strategy (Case Study)
What it is: Combines Bollinger Bands with EMA alignment to catch volatility breakouts.
How it works:
- Setup: Price consolidates inside narrow BBs for 5–8 days (low volatility)
- EMA Alignment: Moving averages in bullish order (8 > 21 > 34 > 55)
- Entry: Fast EMA crosses above slower EMA — confirms momentum
- Exit: Trail for 5–7 candles or price closes below 8 EMA
| BB Breakout Component | System Implementation |
|---|---|
| Bollinger Bands | bb_upper, bb_lower, bb_width in bars |
| EMA indicators | ema_20, ema_50 calculated (EMA8 could be added) |
| Price consolidation | bb_width measures band compression |
| Volume confirmation | volume, volume_sma available |
Three implementation options:
- Implicit Learning (Current) — ML already sees all components. No action needed.
- Hybrid Strategy (Future) — ML predictions + BB breakout filter.
- Pure BB Breakout (Baseline) — Standalone for A/B testing vs ML.
Supertrend Strategy (Case Study)
What it is: A popular trend-following indicator combining ATR with price action. Widely used on TradingView with Pine Script.
How it works:
- Calculate baseline from (High + Low) / 2
- Add volatility buffer: ATR × Multiplier (typically 3)
- Price above Supertrend line → Bullish (green); below → Bearish (red)
- BUY: When Supertrend flips red → green; SELL: green → red
| Supertrend Component | System Implementation |
|---|---|
| ATR (Average True Range) | atr column — already calculated! |
| High/Low/Close prices | high, low, close in bars |
| Trend detection | ML learns trend patterns from price/ATR |
| Volatility adaptation | ATR inherently measures changes |
| Aspect | Traditional Supertrend | The ML System |
|---|---|---|
| Signal Type | Fixed: Flip = Trade | Learned: Considers multiple factors |
| Parameter Tuning | Manual (test multipliers) | Automatic (ML learns optimal) |
| Market Regime | Doesn’t distinguish | ML learns trending vs. choppy |
| Confirmation | None (just line flip) | Multi-indicator consensus (H1–H60) |
| Stock-Specific | Same parameters for all | ML learns per-stock patterns |
Entry/Exit Strategy Types (5 strategies)
Scalping Strategy
What it is: Very short-term trading (1–5 minutes) aiming for small, quick profits.
Adaptive Strategy
What it is: Changes behavior based on market conditions (trending vs. choppy, high vs. low volatility).
- Tier 1 (4 horizons agree, 65%+ each): High conviction → 2x position size
- Tier 2 (3 horizons, 70%+ each): Medium conviction → 1x position
- Tier 3 (2 horizons, 75%+ each): Low conviction → 1x position
Sentiment Analysis Trading
What it is: Trade based on news sentiment and social media mood.
Deep Reinforcement Learning
What it is: Advanced ML where an agent learns by trial and error, receiving rewards for profitable trades.
Phase 7+ Start with RandomForest (simpler, proven) before moving to complex deep learning. Requires extensive simulation infrastructure.
Genetic Algorithms
What it is: Optimization technique — automatically test thousands of parameter combinations to find the best settings.
Future Use cases: Optimize tier thresholds (65/70/75%), stop-loss %, position sizing multipliers, confidence thresholds.
Order Execution Strategies (4 strategies)
These are about HOW to execute orders, not WHEN to trade. They’re execution mechanics.
| Strategy | Description | Current Approach |
|---|---|---|
| TWAP | Split large orders over time to reduce market impact | Market orders (instant). Enhancement when position sizes grow large. |
| VWAP Execution | Execute only when price is favorable vs. VWAP | Market orders. Trade-off: might miss trades. |
| Smart Order Routing | Route orders to different exchanges for best price | Alpaca handles automatically. Low priority. |
| Market-Making | Post buy/sell orders simultaneously, profit from spread | The system is a taker (directional), not a maker. Completely different business model. |
Other Algorithmic Strategies (12 strategies)
Mean Reversion ML Learns
Bet that extreme price movements will “revert to the mean.” Uses BB, RSI, moving averages — all already calculated.
Breakout Strategies ML Learns
Trade when price breaks above resistance or below support. Price, BB, volume, and ATR are all available — ML discovers true breakouts vs. false breakouts.
Gap Trading Easy Add
Trade stocks that open significantly higher/lower than previous close. Would need a gap_pct feature added to Stage 2 feature engineering.
News-Based Trading Phase 5
Trade immediately after news releases. The current approach uses news sentiment as one of many features (aggregated over time), not instant reaction — avoiding false signals from market overreaction.
Grid Trading Could Add
Place buy/sell orders at regular price intervals. Requires limit orders and works best in ranging/sideways markets. Different from the directional prediction approach.
Pre-Market / After-Hours Could Extend
The infrastructure supports any hours. Just need data during extended hours and separate ML models (extended hours behave differently).
Arbitrage N/A
Exploit price differences across markets. Requires simultaneous multi-asset positions, direct market access, microsecond execution. Fundamentally different architecture.
High-Frequency Trading N/A
Thousands of trades per second. Requires co-located servers, specialized hardware, multi-million dollar infrastructure. System timeframe: 5 minutes to 5 hours. HFT: sub-second.
Dark Pool Trading N/A
Execute large orders in private exchanges. Institutional only — not accessible to retail traders.
Options Strategies N/A
Trade options contracts (delta neutral, covered calls, iron condors). Different asset class requiring pricing models (Black-Scholes), Greeks. Future phase after stocks prove profitable.
Index Rebalancing N/A
Trade stocks being added/removed from S&P 500. Infrequent quarterly events, institutionally dominated.
Order Flow Imbalance N/A
Trade based on buy/sell order imbalance in the order book. Requires Level 2 market data (expensive, high-frequency). The system uses aggregated OHLCV bars.
Strategies That Don’t Fit Our Architecture
Pairs Trading Architecture Mismatch
Trade two related stocks simultaneously (long A, short B). Requires combined P&L tracking and correlation analysis. The system trades symbols independently. Could add but requires significant refactoring.
Seasonality Trading Feature Only
Trade based on calendar patterns (“stocks rise on Fridays”). Too simple as standalone strategy. Could add day_of_week, time_of_day, days_until_earnings as features to Stage 2.
3. How Traditional Strategies Map to Our System
The key insight: Most traditional strategies are components of our system, not competitors to it.
Our System Architecture
Where Traditional Strategies Fit
| Traditional Strategy | Where It Lives in Our System |
|---|---|
| Momentum Strategy | Stage 2: We calculate RSI, MACD, MACD Signal, MACD Histogram as features. ML learns when momentum matters. |
| VWAP Strategy | Stage 2: VWAP is one of 21 indicators. ML learns when price-vs-VWAP predicts moves. |
| Volatility Strategy | Stage 2: ATR and Bollinger Bands quantify volatility. ML learns profitable vs. risky volatility. |
| Scalping | Stage 5: 5-minute predictions (H1) = scalping timeframe. |
| Pattern Recognition | Stage 4: ML implicitly learns patterns from indicator combinations. |
| Adaptive Strategy | Stage 6: Tiered Strategy adapts position size to signal strength. |
| Sentiment Analysis | Phase 5: Planned addition as new features alongside technical indicators. |
| Machine Learning | This IS our entire system! Stages 4–6 are ML-driven. |
The Key Difference
Our approach: RandomForest learns from 10,000 examples and discovers:
- RSI=28 + Volume spike + EMA rising + Low volatility → 85% UP (TRADE!)
- RSI=28 + Volume low + EMA falling + High volatility → 48% UP (DON’T TRADE!)
We use the same indicators, but we let machines discover complex patterns instead of using fixed rules.
4. What Makes Our Approach Superior
Advantages Over Traditional Strategies
| Advantage | Traditional | Our System |
|---|---|---|
| 1. Multi-Indicator Intelligence | Most strategies use 1–2 indicators | 21 indicators analyzed simultaneously. ML finds combinations humans would never discover. |
| 2. Adaptive to Market Conditions | Fixed rules work until markets change | Models retrained 2–3x daily with fresh data. Adapts to changing market dynamics. |
| 3. Time Horizon Diversification | Most target one timeframe | 4 simultaneous horizons (5m, 25m, 75m, 5h). Multi-horizon consensus reduces noise. |
| 4. Stock-Specific Learning | Same rules applied to all stocks | ML learns stock-specific behaviors (Apple responds to momentum; Microsoft to volatility). |
| 5. Objective, Data-Driven | Based on human intuition and rules of thumb | Purely data-driven. No emotional bias. Every trade linked to its prediction (audit trail). |
| 6. Handles Complexity | Humans track 3–5 indicators mentally | 21 indicators + interactions + historical patterns. With 21 indicators, millions of possible combinations. |
Limitations We’re Honest About
| Limitation | Our Solution |
|---|---|
| Data Quality Dependency Models are only as good as the data |
Multiple data providers (Alpaca, Alpha Vantage, Yahoo, Polygon) with automatic failover. 97% availability. |
| Model Overfitting Risk ML can “memorize” training data |
Ensemble methods (100 trees), regular retraining, walk-forward validation (Phase 4) before real money. |
| Black Box Perception Stakeholders worry about transparency |
Every trade linked to predictions. Feature importance visible. Transparent Telegram messages: “AAPL BUY: 3/4 horizons UP at 74% avg” |
| Technical Infrastructure Required Traditional strategies can be run manually |
The price of automation. Once built, runs 24/7 without human intervention. |
5. Common Questions from Stakeholders
Q1: “Why not just use a simple moving average crossover strategy?”
Simple strategies are easy to understand, but markets are complex.
Data shows: Basic moving average crossovers have ~50–55% win rates (barely better than a coin flip). Our ML models achieve 60–70% accuracy on 3-class predictions (UP/DOWN/FLAT).
The problem with simple: When everyone knows a pattern, it stops working. MA crossovers have been public knowledge for 40+ years. Our ML discovers fresh patterns from recent data.
Q2: “Couldn’t a human trader with experience do better?”
Possibly, but it doesn’t scale and has human limitations.
| Aspect | Human Trader | Our System |
|---|---|---|
| Symbols | 10–15 actively | 15+ simultaneous (expandable to hundreds) |
| Emotional Bias | Stress, fear, greed | Zero emotional bias |
| Indicators | 3–5 mentally | 21 + interactions instantly |
| Availability | Needs sleep | Runs 24/7 |
| Consistency | Varies day to day | Perfect execution consistency |
Best case: Use both! Human oversight with ML execution.
Q3: “What about pairs trading?”
Pairs trading requires simultaneously holding two positions (long A, short B) and tracking combined P&L. Works best in market-neutral hedge funds.
Our approach: Directional trading on individual stocks. We predict if Stock A will go up or down, not if it will outperform Stock B.
Could we add it? Yes, but it requires significant architecture changes. We’d prioritize after validating the current approach.
Q4: “Why isn’t the system using Twitter/Reddit sentiment?”
We are! It’s Phase 5 of the roadmap. News sentiment from professional financial media (Alpha Vantage News API).
Why not social media? Twitter/Reddit sentiment is noisy and easily manipulated. Professional financial news provides higher signal quality.
When useful: Earnings announcements, major news events, market-moving headlines.
Q5: “Can people copy the strategy?”
The strategy is just one component. The infrastructure, data quality, and continuous improvement create sustainable competitive advantage:
- Model training process: Retrain 2–3x daily with fresh data
- Feature engineering: Specific combination of 21 indicators
- Multi-horizon consensus: How we combine 4 time horizons
- Infrastructure: Automated data pipelines, error handling, failover
- Continuous improvement: By the time someone copies v1.0, we’ve moved to v2.0
Q6: “Why paper trading first?”
Risk management and system validation. Paper trading proves:
- Technical execution works: Orders execute, positions track, errors handled
- Models perform out-of-sample: Lab accuracy translates to live market accuracy
- Operational reliability: System runs 10+ hours daily without intervention
- Financial viability: Positive returns after slippage and fees
Timeline: Move to real money when paper trading demonstrates consistent profitability over 3+ months.
Q7: “What’s the expected win rate / return?”
| Metric | Projection |
|---|---|
| Model Accuracy | 60–70% on UP/DOWN/FLAT |
| Expected Win Rate | 55–65% of trades profitable |
| Risk/Reward Target | 2:1 or better (avg win is 2x avg loss) |
| Expected Monthly ROI | 5–12% (conservative estimate) |
Q8: “How is this different from investment bank algo trading?”
| Aspect | Investment Bank | Our System |
|---|---|---|
| Speed | Microseconds (HFT) | 5-minute to 5-hour horizons |
| Capital | Hundreds of millions | $50K–$250K starting |
| Infrastructure | Co-located servers, direct exchange | Retail broker API (Alpaca) |
| Team | Hundreds of PhDs | Small team, lean operations |
| Data | Proprietary sources | Free/low-cost public data |
Our advantage: We’re nimble. Banks can’t trade small-cap stocks (not enough liquidity for their size). We can trade anything.
6. Future Enhancements
| Phase | Enhancement | Description |
|---|---|---|
| Phase 5 | Sentiment Analysis | Integrate financial news sentiment (Alpha Vantage News API) as additional ML features. Improves predictions during earnings, major news, market-moving headlines. |
| Phase 6 | Fundamental Analysis | Add company financial metrics (earnings, revenue, P/E ratio). “Is this price move justified by earnings surprise?” |
| Phase 7 | Multi-Model Framework | Train multiple algorithms (RandomForest, XGBoost, LightGBM, LSTM, Transformer) and ensemble predictions. “2 out of 3 models must agree.” |
| Phase 8–10 | Production Readiness | CI/CD pipeline, real-time dashboard, automated anomaly alerts, comprehensive testing. |
| Phase 11+ | Advanced ML | Deep Reinforcement Learning (learns optimal trading through simulation), Genetic Algorithm optimization, multi-market expansion (India NSE, Japan TSE, UK LSE), options trading. |
7. Conclusion & Quick Reference
What We Are
- ML-driven directional trading system for US equity markets
- Learns patterns automatically from 21 technical indicators across 4 time horizons
- Adapts continuously through daily retraining on fresh market data
- Built for scale: Currently 15 symbols, expandable to hundreds
What Makes Us Different
- Not rule-based: We don’t use fixed “if RSI < 30, buy” logic
- Multi-indicator intelligence: 21 indicators + interactions analyzed simultaneously
- Time horizon diversification: 5-minute to 5-hour predictions combined
- Transparent and auditable: Every trade links to the prediction that triggered it
How We Compare
Competitive Advantage
- Infrastructure: Automated data pipelines with multi-provider failover
- Process: Daily retraining keeps models fresh
- Roadmap: Sentiment, fundamentals, advanced ML coming
- Risk management: Paper trading first, comprehensive validation before real money
Realistic Expectations
| Metric | Target |
|---|---|
| Win Rate | 55–65% |
| Monthly ROI | 5–12% (conservative) |
| Paper Trading Validation | 3–6 months before real money |
Strategy Categories Quick Reference
| Category | Traditional Examples | Our Implementation |
|---|---|---|
| Indicator-Based | RSI, MACD, Moving Averages | All calculated as features for ML |
| Execution Methods | TWAP, VWAP execution, SOR | Market orders; TWAP is future enhancement |
| Risk Management | Stop-loss, position sizing | 5% stop-loss, max 10 positions, 20% concentration limit |
| Advanced ML | Deep RL, Genetic Algorithms | Phase 7+ after validating RandomForest baseline |
| Alternative Data | Sentiment, Fundamentals | Sentiment in Phase 5, Fundamentals in Phase 6 |
| Market Structure | Pairs, Market Making | Doesn’t fit directional trading architecture |
