Days 11–17 moved from RSI divergence to candlestick patterns, volume, and VWAP. Every strategy went through a nine-phase backtest. The clearest result was that exit rules can affect performance more than entry signals, while every added filter also reduces signal frequency.
The Seven-Day Learning Map
| Day | Core Topic | Indicator / Tool | Key Insight |
|---|---|---|---|
| Day 11 | RSI Bullish Divergence | RSI Divergence | Price-momentum disagreement signals reversal |
| Day 12 | RSI Bearish Divergence | RSI Divergence (Bearish) | Short-side logic to capture bull exhaustion |
| Day 13 | Hammer + RSI | Hammer + RSI | Quantitative candlestick detection, triple-condition entry |
| Day 14 | Bullish Engulfing + SMA Filter | Bullish Engulfing + SMA(50) | Pattern + trend filter reduces false signals |
| Day 15 | Volume Spike Reversal | Volume Spike + Reversal Candle | Volume is the real driver behind every breakout |
| Day 16 | VWAP Pullback Strategy | VWAP + SMA | Trading alongside institutions' "fair value" |
| Day 17 | Quant Trading Mindset | — | Risk management, parameter simplicity, second-order derivatives |
Day-by-Day Notes
Days 11–12: Turning RSI Divergence into Detectable Conditions
RSI (Relative Strength Index), introduced by J. Welles Wilder in 1978, measures the relative strength of recent gains versus losses.
Where (typically calculated over 14 periods).
RSI is commonly used for overbought (>70) and oversold (<30) readings. These two days tested divergence: price and RSI move in different directions.
When price makes a new high and RSI does not, price and recent momentum are separating. That is a possible reversal condition, not proof that a reversal is inevitable.
The Four Types of Divergence
| Divergence Type | Price Action | RSI Action | Signal | Trend Nature |
|---|---|---|---|---|
| Classic Bullish | Lower Low (LL) | Higher Low (HL) | Buy | Reversal |
| Classic Bearish | Higher High (HH) | Lower High (LH) | Sell | Reversal |
| Hidden Bullish | Higher Low (HL) | Lower Low (LL) | Buy | Continuation |
| Hidden Bearish | Lower High (LH) | Higher High (HH) | Sell | Continuation |
For bullish signals, only compare lows (both price and RSI). For bearish signals, only compare highs. Mixing these up is the most common divergence analysis mistake.
Day 11: Bullish Divergence in Practice
The strategy logic: use scipy.signal.argrelextrema to identify swing lows. When price prints a Lower Low but RSI prints a Higher Low, a bullish divergence signal fires, and we enter at the next bar's open.
The core experiment was comparing three exit rules:
- RSI Overbought Take-Profit: Exit when RSI ≥ 70
- Fixed Percentage Stop-Loss: Exit when close drops below entry × (1 − 5%)
- Time Stop: Forced exit after 20 trading days
The same entry signal produced very different risk-return profiles under the three exit rules. That comparison became the main thread for the rest of the week.
Day 12: Bearish Divergence — Catching Bull Exhaustion
Day 12 flipped the perspective: detecting bearish divergence (price making higher highs while RSI prints lower highs) and entering with short-side logic.
The key technical difference was swing high detection using argrelextrema(order=5), with constraints on the distance between the two highs to filter out too-close false signals and too-distant stale signals.
RSI divergence is a condition, not a guarantee. Divergence signals often show a 40–50% win rate; whether the strategy reaches positive expectancy still depends on average gains, average losses, and the exit mechanism.
The consensus from both academic research and the trading community: RSI divergence is most reliable on daily timeframes and above. On 5-minute or 1-minute charts, the false positive rate rises significantly.
Day 13: Defining a Hammer with Math
Candlestick analysis can be traced to 18th-century Japanese rice markets, but “eyeballing” a Hammer does not work in a programmatic backtest. The shape needs explicit conditions.
Quantitative Hammer Conditions
For a bar to qualify as a Hammer, it must satisfy all of the following:
body = abs(close - open)
lower_shadow = min(open, close) - low
upper_shadow = high - max(open, close)
Condition 1: lower_shadow >= body × 2 (lower shadow at least 2× the body)
Condition 2: upper_shadow <= body × 0.3 (minimal upper shadow)
Condition 3: body > 0 (exclude doji candles)
During a decline, price trades sharply lower within the bar and closes back near the open, leaving a long lower shadow. That is the price path encoded by a Hammer.
But entering on a single candle pattern alone is too risky. Day 13's strategy added two layers of confirmation:
- RSI Oversold Confirmation: RSI ≤ 40 (a relaxed threshold balancing signal frequency with quality)
- Downtrend Confirmation: Close < SMA(20), ensuring the reversal signal appears within an actual downtrend
All three conditions must fire together. That reduces signal count in exchange for stricter confirmation.
According to Thomas Bulkowski's classic Encyclopedia of Candlestick Charts and recent quantitative backtest studies, single candlestick patterns have modest reliability (roughly 50–60%). However, when combined with volume confirmation, trend filters, or momentum indicators, accuracy improves significantly. This is exactly why we insist on multi-condition entries.
Day 14: Quantifying Bullish Engulfing
A Bullish Engulfing pattern consists of two bars: the second bullish body fully covers the first bearish body.
Quantitative Detection Conditions
Condition 1: prev_close < prev_open (prior bar is bearish)
Condition 2: curr_close > curr_open (current bar is bullish)
Condition 3: curr_open <= prev_close (current open ≤ prior close)
Condition 4: curr_close >= prev_open (current close ≥ prior open)
Condition 5: body > 0 (exclude doji candles)
Visually, the second candle "swallows" the first entirely, representing buyers overpowering sellers within a single session. In backtest research, the Bullish Engulfing near support levels with high volume confirmation ranks among the most reliable candlestick patterns.
The SMA(50) Trend Filter
Day 14 introduced SMA(50) as a trend filter: long signals are only allowed when close > SMA(50). The underlying logic:
We only want to catch short-term pullback rebounds within a medium-term uptrend, not "catch falling knives" in a downtrend.
Parameter optimization tested 36 combinations (SMA period × stop-loss percentage × holding days), which led us to a crucial lesson:
In many strategies, the holding period has a far greater impact on performance than you'd expect. Day 14's backtests showed that 3-day vs. 20-day holding periods could produce Sharpe Ratio differences of 2× or more. Exit timing often matters more than entry conditions.
Day 15: Adding Volume to the Reversal Conditions
From Day 4 through Day 14, every entry condition came from price: SMA, RSI, or candlestick patterns. Day 15 added volume for the first time.
Price tells you what the market is doing. Volume tells you how serious the market is about it.
Defining a Volume Spike
The quantitative definition is straightforward:
Where is the spike multiplier (default , meaning today's volume exceeds the 20-day average by at least 2×).
This signals an abnormally high level of trading activity — potentially institutional accumulation, panic selling, or a collective reaction to major news.
Triple Entry Conditions
Day 15's strategy required all three conditions simultaneously:
- Volume Spike: Volume > 20-day average volume × 2
- Reversal Candlestick: Hammer or Bullish Engulfing (integrating the detection logic from Days 13 and 14)
- Trend Filter: Close > SMA(50)
This was the first strategy to combine the prior days' pattern detection, trend filter, and a volume condition.
Parameter Optimization Observations
Testing 48 parameter combinations (spike multiplier × SMA period × holding days):
- Spike multiplier had the largest impact on strategy quality. Too low (1.5×) included too many "non-event" days; too high (3.0×) generated almost no signals
- In this test, the more robust zone was 2.0–2.5×. That is a result for the tested tickers and period, not a universal threshold
A volume spike shows that participation has changed, but volume alone cannot identify who traded. It does not prove that institutions, hedge funds, or market makers entered or exited. Price structure and trend still need separate confirmation.
Day 16: Using VWAP as an Intraday Execution Benchmark
VWAP (Volume Weighted Average Price) weights intraday prices by volume and is widely used as an execution benchmark.
The Formula
A critical property: VWAP resets automatically at the start of each trading day, accumulating from zero. Early in the session the denominator is small, making VWAP highly sensitive to price changes; as the day progresses, the growing cumulative volume makes it increasingly stable.
VWAP is commonly used to evaluate intraday execution quality. An average buy price below VWAP is below that day's volume-weighted average. Whether VWAP behaves as support or resistance still has to be tested in the actual intraday data.
The VWAP Pullback Strategy
The idea: in an uptrend (close > SMA(20)), when price pulls back from above VWAP to VWAP, treat it as a buying opportunity.
Entry Conditions:
- Previous bar close > VWAP, current bar close ≤ VWAP (pullback detected)
- Close > SMA(20) (trend filter)
- Exclude the first 30 minutes after open (09:30–10:00, excessive volatility)
Exit Rule Comparison (three approaches):
- Exit A: Hold for a fixed number of bars (e.g., 12 bars × 5 min = 1 hour)
- Exit B: Fixed percentage take-profit (+2%)
- Exit C: Exit when SMA(20) is breached
Backtest Performance and Key Findings
| Ticker | Parameters | IS Sharpe | OOS Sharpe | Key Observation |
|---|---|---|---|---|
| AAPL | SMA=50, Hold=36 | -3.81 | 0.39 | Drawdown control superior to Buy-and-Hold |
| SPY | SMA=10, Hold=36 | 2.44 | 1.30 | Achieved excess returns; IS→OOS decay but remained positive |
In extremely strong uptrends, price can stay above VWAP for multiple consecutive days without a single pullback. If you insist on waiting to "buy below VWAP," you'll completely miss the rally. VWAP is an intraday tool — it should not be used for cross-day trend analysis.
The professional approach: pair VWAP with higher-timeframe trend analysis. VWAP tells you "where today's fair value is," but the trend direction needs daily or weekly indicators to determine.
Day 17: Pausing the Code to Revisit Risk and Parameters
Day 17 had no coding. We read QFX Research's “1 Year in Quant Trading — 24 Lessons I've Learned” and selected three lessons that connected directly to the first 16 days.
Lesson #9: Make Risk Management Your Top Priority
Your strategy should be able to handle waking up one morning to find the market has crashed 50%.
Losing 40% of your capital requires a 66.7% gain just to break even — the math is fundamentally asymmetric. Over the first 16 days of training, we'd generated impressive backtest numbers but never seriously asked: if the worst-case scenario hit, would the account survive?
A Risk Management Framework:
| Level | Principle | Quantitative Standard |
|---|---|---|
| Per Trade | Maximum risk per trade | ≤ 1% of total capital |
| Daily | Maximum daily loss | ≤ 3% of total capital |
| Strategy | Maximum drawdown tolerance | ≤ 20%, pause if exceeded |
| Account | Reserve fund isolation | 20% of capital never deployed |
The primary goal isn't "to make money" — it's "to not go bankrupt." Survival comes first; compounding follows.
Lesson #10: Use Fewer Parameters, but Understand Them Deeply
My best-performing strategy had only 3 parameters. The worst mistake was probably letting an optimization script auto-generate parameter combinations.
During training, we often ran grid searches across SMA periods, RSI thresholds, and holding durations, finding the "best-looking" combination — without knowing why those parameters worked. This is essentially overfitting to historical data, not discovering genuine market structure.
Before adding any parameter, answer three questions:
- What market behavior does this parameter represent? (e.g., SMA 200 = long-term trend direction)
- Why should it affect strategy performance? (logic-driven, not data-driven)
- Does the strategy collapse if you change this value slightly? (robustness test)
Only when all three answers are clear does a parameter deserve a place in your strategy.
Lesson #20: The Derivative of the Derivative Is Where the Value Lies
If you strategically transform an indicator into a second-order derivative, strategy performance often improves significantly.
Don't rush to learn a new indicator. First ask: what is the second-order behavior of the indicator I already have?
- RSI → Rate of change of RSI (momentum acceleration) → Consecutive positive slopes (trend confirmation)
- MACD → Cumulative histogram area → Rate of area sign change
- VWAP deviation → Standard deviation of deviation (intraday volatility rhythm) → Deviation mean-reversion speed
Understand → Simplify → Survive → Derive
- Understand the market meaning of every parameter and indicator
- Simplify to the core logic you truly command
- Survive — it's the precondition for all compounding
- On top of understanding, derive more insightful features
Going deep on one indicator you understand beats spreading thin across ten you don't.
Findings That Recurred Across Seven Days
Exits Matter More Than Entries
The most consistent result this week was that exit rules may affect strategy performance more than entry signals.
Day 11's three exit rule comparisons, Day 14's holding period sensitivity analysis, Day 16's three exit logic comparisons — each validated the same truth: the same entry signal paired with different exit mechanisms can produce Sharpe Ratio differences of 2× or more.
That is why a backtest cannot tune only entry conditions. Stop-losses, take-profits, and holding periods need their own sensitivity analysis.
More Conditions Mean Fewer False Signals and Fewer Trades
From Day 11's pure RSI divergence, to Day 13's triple conditions (pattern + RSI + trend), to Day 15's triple conditions (volume + pattern + trend), the design trajectory is clear:
A meaningful filter can remove some false signals, but it also lowers signal frequency.
This is an eternal trade-off: confirmation vs. trading frequency. There's no right answer — only the answer that fits your capital size and risk tolerance.
From Daily Bars to Minute Bars
Day 16's VWAP strategy took us from daily charts into the 5-minute bar world for the first time. Intraday trading presents entirely different challenges:
- Data volume explodes (78 five-minute bars per day)
- Must account for "opening volatility periods" and "end-of-day forced liquidation"
- VWAP resets daily — indicator logic is fundamentally different from daily indicators
- Transaction costs consume a larger share (because expected profit per trade is smaller)
Strategy Toolbox Quick Reference
| Tool | Type | Best Use Case | Core Limitation |
|---|---|---|---|
| RSI Divergence | Momentum Reversal | Swing high/low turning point detection | Low win rate, requires exit discipline |
| Hammer | Candlestick Pattern | Reversal signal in downtrends | Low reliability when used alone |
| Bullish Engulfing | Candlestick Pattern | Strong reversal confirmation | Requires trend filter |
| Volume Spike | Volume | Locating abnormal trading activity | Multiplier threshold varies by ticker |
| VWAP | Intraday Benchmark | Fair value anchor for day trading | Intraday only, resets daily |
| SMA Filter | Trend Confirmation | Filtering counter-trend false signals | Lagging by nature |
Six Rules from the Week
- Exits determine survival. Entry is just the beginning of the story; exit is the ending. Time spent designing exit rules should at least match time spent on entry conditions.
- Multiple confirmations are your seatbelt. Single indicators are rarely reliable, but meaningful multi-condition combinations significantly reduce false signals.
- Risk management isn't optional — it's foundational. Losing 40% requires gaining 66.7% to recover. That math never changes.
- Less is more. Three parameters you understand beat ten parameters you've merely optimized.
- Go deep, not wide. Understanding one indicator's second-order behavior is worth more than learning ten new ones.
- Volume is confirmation, not identity. A spike deserves investigation, but it cannot identify the participants or guarantee a reversal by itself.
Day 18 begins more advanced strategy combinations and portfolio-level questions, using the same out-of-sample checks and risk limits.