4.2 Swing-trading frameworks as testable rule sets
Motivation
Swing trading holds positions for days to weeks to capture one leg of a trend. Its best-known methods come from practitioners' books, not from peer-reviewed tests. They are worth studying because they encode a coherent hypothesis (buy strength in leaders when the market is healthy, cut losses fast), and because they are almost fully codable. The research task is to code them exactly, test them on point-in-time data with Indian costs, and see what survives.
A caution on sources. The frameworks come from four books: Weinstein (1988), Minervini (2013), O'Neil (4th ed., 2009) and Darvas (1960). The chapter locations below were checked against the publishers' tables of contents (McGraw-Hill product pages, accessed 6 Nov 2026), and chapters are cited by title because numbering differs between printings. The printed pages themselves were not available to the course. Every number therefore carries one of two labels in the table below:
- restated: the figure is attributed to the author consistently by independent secondary sources, but it has not been checked against the page;
- course adaptation: the author states the idea qualitatively, or gives no number, and the course chose one to make the rule codable.
Check the restated numbers against your own copy before you rely on them. Authors also restate their rules across editions. Treat each number as a default parameter, record it, and count it as a trial when you vary it.
| Rule | Source (book, chapter) | Number used here | Label |
|---|---|---|---|
| Four stages, 30-week moving average, buy only in Stage 2 | Weinstein (1988), opening chapters on chart reading and the stages | 30 weeks | restated |
| Breakout volume about twice the weekly average; Mansfield RS | Weinstein (1988), chapters on buying | , RS | restated |
| Slope lag of four weeks, flatness tolerance , 26-week Donchian breakout | none (Weinstein judges these by eye) | , 4 weeks, 26 weeks | course adaptation |
| Trend Template criteria 1–5 (price and the 50/150/200-day averages) | Minervini (2013), "Trading with the Trend" | as listed | restated |
| 200-day average rising for at least one month | Minervini (2013), "Trading with the Trend" | 21 trading days | restated (one month); the 21-day lag is a course adaptation |
| Price at least 30% above the 52-week low and within 25% of the 52-week high | Minervini (2013), "Trading with the Trend" | 1.30, 0.75 | restated |
| RS ranking at least 70 | Minervini (2013), "Trading with the Trend" (IBD's RS rating) | 70 | restated; the 12-month-return percentile proxy is a course adaptation |
| VCP: successively smaller contractions, volume dry-up, pivot breakout | Minervini (2013), "A Picture Is Worth a Million Dollars" | base days, , 10- vs 50-day volume, , stop within 10% | course adaptation (the pattern is the book's; the numbers are the course's) |
| C: current quarterly EPS growth | O'Neil (2009), "C = Current Quarterly Earnings per Share" | about 25% year on year | restated |
| A: annual EPS growth over three years; ROE | O'Neil (2009), "A = Annual Earnings Increases" | about 25%; ROE about 17% | restated |
| S: breakout volume above average | O'Neil (2009), "S = Supply and Demand" | 40–50% above average | restated |
| L: relative strength | O'Neil (2009), "L = Leader or Laggard" | RS rating at least 80 | restated |
| M: confirmed uptrend, distribution days, follow-through day | O'Neil (2009), "M = Market Direction" | Definition 4.8 (200-day SMA) | course adaptation (O'Neil's own test is the distribution-day count) |
| Cut losses at 7–8% below the buy point | O'Neil (2009), "When to Sell and Cut Your Losses" | 7–8% | restated |
| Take profits at 20–25%; hold a 20%-in-three-weeks gainer for eight weeks | O'Neil (2009), "When to Sell and Take Your Profit" | 20–25%, 3 and 8 weeks | restated |
| Buy at the pivot of a proper base, not more than 5% above it | O'Neil (2009), "How to Read Charts Like an Expert" | 5% | restated |
| Darvas box: new high, top and bottom confirmed by later bars | Darvas (1960) | three-day confirmations | course adaptation (Darvas describes the box in narrative, not as a fixed count) |
4.2.1Weinstein stage analysis#
Stan Weinstein, Secrets for Profiting in Bull and Bear Markets (1988), uses weekly bars and a 30-week moving average. He describes four stages: 1 (basing: the average is flat and price oscillates around it), 2 (advancing: price breaks above resistance and above a rising average, on volume of about twice the weekly average), 3 (topping: the average flattens), and 4 (declining: price below a falling average). He buys only in Stage 2 and trails stops under the average and successive swing lows. He also requires positive Mansfield relative strength and a supportive market and sector (top-down).
Definition 4.5codable stages
Let be weekly closes, and slope , with tolerance (say 0.5% over four weeks). Then
- Stage 2 if and ;
- Stage 4 if and ;
- otherwise the average is flat: Stage 3 if the most recent non-flat stage was 2, else Stage 1.
An entry rule is then: buy at the next weekly open after the first week with Stage 2, a 26-week Donchian breakout, and Mansfield RS . (The market filter is Definition 4.8 in 4.2.3.) Note what the definition forces you to decide: the slope lag, the flatness tolerance, and what "resistance" means. Weinstein makes these calls by eye.
4.2.2Minervini's Trend Template, SEPA and VCP#
Mark Minervini (Trade Like a Stock Market Wizard, 2013) screens with a "Trend Template" before looking at any setup.
Definition 4.6Trend Template, daily bars
All of:
- and ;
- ;
- rising for at least one month: ;
- and ;
- ;
- the 52-week low;
- the 52-week high;
- RS rank (IBD rating; approximate by the percentile of 12-month return in the universe).
By Proposition 4.1, criteria 1–5 are all positive-weight filters on past returns. The template is a multi-horizon momentum screen with a 52-week-high proximity condition (criterion 7), which links it to the 52-week-high effect of George and Hwang (2004).
SEPA ("Specific Entry Point Analysis") adds fundamentals (accelerating earnings and sales), a catalyst, and an entry from a volatility contraction pattern.
Definition 4.7VCP, one codable version
Within a base of length days following a Trend-Template uptrend, find successive swing highs and the following swing lows (pivots confirmed days later). Let the pullback depths be with . Require for all (for example 25%, 15%, 8%, 3%), and the 10-day average volume in the last contraction below its 50-day average ("volume dry-up"). Entry: a close above the last swing high (the pivot) with . Stop: below the last contraction's low, typically within 10%.
4.2.3O'Neil's CAN SLIM#
William O'Neil (How to Make Money in Stocks, 4th ed., 2009) combines fundamentals and price:
| Letter | Rule (thresholds as restated; see the source table above) | Codable from prices? | Data needed for a backtest |
|---|---|---|---|
| C | Current quarterly EPS up ≥ ~25% year on year | No | Point-in-time quarterly EPS with announcement dates |
| A | Annual EPS growth ≥ ~25% for 3 years, ROE ≥ ~17% | No | Point-in-time annual statements |
| N | New product/management/high; breakout from a proper base | Partly (new high, base) | Prices |
| S | Volume ≥ 40–50% above average on breakout | Yes: – | Volume |
| L | Leader: RS rating ≥ 80 | Yes (RS percentile) | Universe returns |
| I | Rising institutional sponsorship | No | Quarterly shareholding pattern (in India, filed with the exchanges) |
| M | Market in a confirmed uptrend | Yes, as a regime filter | Index prices |
Definition 4.8market regime filter
Exits: cut every loss at 7–8% below the buy point with no averaging down; take most profits at 20–25%, except hold a stock that rises 20% within three weeks for at least eight weeks. Entry: at the pivot of a base such as a cup-with-handle, not more than 5% above the pivot.
4.2.4Darvas boxes#
Nicolas Darvas (How I Made $2,000,000 in the Stock Market, 1960) bought stocks making new highs on unusual volume.
Definition 4.9Darvas box, codable
After a new 52-week high at day , the box top is if no later high exceeds it for three days (confirmed at ). The box bottom is the lowest low after that holds for three days (confirmed three days after it is set). Buy when the close breaks above the confirmed top. Place the stop just below the box bottom, and trail it up as new boxes form above. Sell when price closes below the current box bottom.
Both confirmations are lags. A backtest that draws the box using days and then "buys" at is using the future.
4.2.5The common archetype and its arithmetic#
All four methods reduce to one archetype: trade only uptrending leaders in a healthy market; enter on a breakout from a low-volatility base with volume; set the initial stop at the base low or about 7–8% below entry, which defines one unit of risk (M03); and let winners run, so the average win is a multiple of while the win rate is often 35–50%.
Proposition 4.5breakeven win rate with costs
Let each trade lose exactly or win , with win probability , and let round-trip costs be (in units of ). The expectancy is , and it is positive iff
Proof
.∎
Worked example 4.3Indian delivery costs on a 7% stop
Buy and sell ₹1,00,000 of a stock on delivery at a discount broker charging no delivery brokerage (statutory and exchange rates as of 6 Nov 2026, sources in M01 · 1.7 and Facts that change; set your own brokerage and DP charge): STT 0.1% on each side = ₹200; NSE transaction charges 0.00307% each side = ₹6.14; SEBI fee ₹10 per crore = ₹0.20; GST 18% of (transaction + SEBI) = ₹1.14; stamp duty 0.015% on the buy = ₹15; DP charge ₹15.34 on the sell. Total ₹237.82, or 0.238% round trip (11.9 bp per side). With a 7% stop, and . Add slippage: a mid-cap breakout bought "at the pivot" is often filled 0.2–0.5% higher, which adds roughly another 0.03–0.07R. With : before slippage. At , expectancy is per trade. Costs are small for a swing trader with a 7% stop. They become decisive with a 1% stop (intraday, M05), where the same ₹238 is .
The danger is not costs. It is that and are estimated from a few dozen trades chosen by the author. Proposition 4.4 and 4.5 tell you how wide the error bars are.
4.2.6Caveats specific to swing frameworks#
- Selection by the author. Books show the trades that worked. A chart gallery of winners says nothing about . Only a mechanical screen run on a full point-in-time universe can estimate it.
- Discretion. "Proper base", "tight", "constructive" are judgements. Code one version, then treat alternative codings as additional trials (4.6).
- Universe and survivorship. Testing on today's Nifty 500 constituents over the last ten years includes only firms that survived and grew into the index. 4.4.3 quantifies the bias.
- Gaps and price bands. Many Indian stocks without derivatives trade with daily price bands of 2%, 5%, 10% or 20% (stocks with F&O have dynamic bands instead). A stock that opens at its lower band may not trade at all, and a 7% stop then fills far below 7% or not at all. A backtest must fill stops at and should model no-fill days.
- Liquidity. Breakout rules drift toward small, illiquid stocks, where the quoted price is not the price you get (M05).
- Regime dependence. All four methods are long momentum strategies. They inherit momentum's crash risk (4.3.4). The "M" filter is an attempt to time that risk.