← All ideas
#036Mean reversionSwing

A ladder of entries by standard deviations: scaling in and out in parts

A position against a stretch from the average is built in parts at 0.25, 0.5, 1 SD and beyond, and scaled out in parts on the way back. Alan Clement's variant: a pullback in a stock uptrend, buying into the decline, adding, no stops.

The Algorithmic Advantage · PJ Sutherland · Watch video

Markets

Stocks

Timeframe

D1

Data

OHLC, Instrument universe

Rules

Partly formalised

Difficulty

Hard

Status

Untested

Some rules were added by us and are marked in the text.

TradingView has pitfalls
EasyLanguage has pitfalls
MetaTrader 5 has pitfalls

Idea in brief

PJ Sutherland trades short-term mean reversion on large US stocks. A simple one-parameter model used to be enough: a moving average, a stretch measure (standard deviation, ATR or percent), an entry against the stretch, an exit at the average. Over time, live trading began to diverge from the backtest. The author's conclusion: nobody knows where a pullback will start and where it will end, and a model with a single entry level relies on luck.

Sutherland's solution is called the mean reversion curve. The position is built in parts as price moves away from the average: a little at 0.25 SD, more at 0.5 SD, at 1 SD and beyond. It is scaled out in parts too, as price returns. In one of the author's examples there are seven entries and seven exits, in another twenty. One strategy turns into a portfolio of entries along a single move.

Alan Clement describes a similar approach for stocks: a stock in a strong uptrend, a short-term pullback to an extreme of the recent range, buying right during the decline, adding as it deepens, and no stops. This is variant B.

Why it might work

Sutherland relies on the shape of the return distribution: it has a sharp peak and fat tails, and mean reversion occurs in the market more often than trend. A reversion trade captures a small move, so the win rate is high. The ladder removes the dependence on a single level. In a single-level system, the biggest trade may miss the level by a cent and never make it into the test.

Clement adds an argument for entering without confirmation. A reversal after a sell-off is usually fast and often starts with a gap in the morning. Whoever waits for confirmation misses most of the move.

Both name the main risk themselves: a trend against the position. In a calm regime, the bets are almost independent. In a crash, stock correlations go to one, and the whole portfolio becomes a single bet. Sutherland covers this risk with a separate portfolio of short-term trend strategies. That part is not in this card.

Rules

Stretch

MA = SMA(Close, 10)                  // Finetiq: the period is not named in the video
SD = StdDev(Close, 10)
Z  = (Close - MA) / SD               // author: stretch measure, ATR or percent of the average also work

Variant A. Sutherland's ladder on a single symbol

// levels 0.25, 0.5 and 1 SD from the author, the rest Finetiq
EntryZ = [-0.25, -0.5, -1.0, -1.5, -2.0, -2.5, -3.0]    // seven steps, as in the author's example
Unit   = PositionBudget / 7                              // Finetiq: equal units

// after the daily close, recalculate the level prices
FOR k IN 1..7
    IF unit k is not open
        BUY LIMIT Unit at MA + EntryZ[k] * SD            // Finetiq: the limit order lives one bar
// a gap below several levels fills all of them at the open
MaxNewUnitsPerDay = 3     // author: do not build everything in one day; number Finetiq

// exits: each unit at its own reversion level
ExitZ[k] = min(EntryZ[k] + 0.5, 0)                       // Finetiq: reversion step 0.5 SD
FOR each open unit k
    SELL LIMIT Unit at MA + ExitZ[k] * SD                // author: scaling out as price reverts
// author: some exits sit very close to the market, so that any fluctuation takes off exposure
// and holding stays short. The author did not specify which orders these are

IF Close >= MA THEN EXIT all units AT NEXT BAR OPEN      // author: base exit at the average
IF BarsSinceFirstEntry >= 5 THEN EXIT all units AT NEXT BAR OPEN   // Finetiq: the author's hold is 1.3 days

// short is mirrored, long and short with equal allocation (author)

Author's safeguards (Sutherland)

// universe: large stocks at the S&P 500 level; for a small account, country ETFs
// unit size by the stock's volatility, not a share of capital divided by price
// entries are spread over 2-3 days; large batches: 50 orders, 10 a day for 5 days
// lesson of 2022: start building a small unit already at the average or slightly below it

Variant B. Clement: a pullback in an uptrend, no stops

Trend    = Close > SMA(Close, 200)          // author: above a long-term average or ROC; length Finetiq
RangeHi  = Highest(High, 10)
RangeLo  = Lowest(Low, 10)
Oversold = (Close - RangeLo) / (RangeHi - RangeLo) <= 0.1   // author: extreme of the recent range; numbers Finetiq

IF Trend AND Oversold AND MarketPosition == 0
    BUY LIMIT at Close - 0.5 * ATR(10)       // author: you can catch it a little lower; offset Finetiq
IF MarketPosition > 0 AND no add yet
    BUY LIMIT at EntryPrice - 1.0 * ATR(10)  // author: add as the decline deepens; level Finetiq

IF Close > SMA(Close, 5)    THEN EXIT AT NEXT BAR OPEN   // Finetiq: bounce toward the mean
IF BarsSinceEntry >= 10     THEN EXIT AT NEXT BAR OPEN   // Finetiq: time exit, this is not a stop
// no stop-loss (author). Long only: on stocks the author sees the edge on the long side
// risk is split across 5-10 positions in different stocks (author)

Parameters

Parameter Value Source
Stretch measure standard deviation from the average author
Average and SD period 10 Finetiq
First entry levels −0.25, −0.5, −1 SD author
Remaining levels −1.5 … −3 SD Finetiq
Number of steps 7 author (example), choice: Finetiq
Exit step 0.5 SD from the entry level Finetiq
Base exit return to the average author
New units per day no more than 3 Finetiq (principle: author)
Time exit, variant A 5 bars Finetiq
Long and short equal allocation author
Universe large stocks, country ETFs author
Variant B: trend Close above SMA 200 Finetiq (principle: author)
Variant B: oversold close in the bottom 10% of the 10-day range Finetiq (principle: author)
Variant B: entry limit order 0.5 ATR(10) below the close author (idea), Finetiq (offset)
Variant B: add another 1 ATR(10) lower Finetiq (principle: author)
Variant B: stop none author
Variant B: number of positions 5–10 stocks author

What to test

  1. Ladder versus a single level. The whole position at −1 SD with an exit at the average versus seven steps of the same total size. The author promises stability above all, so compare the spread of results across years and the worst year, not only the total.
  2. Neighborhood. Average period 5, 10, 20. Exit step 0.25 and 0.5 SD. Three, five and seven steps. The ladder has many parameters: 7 entries times 7 exits give 49 combinations, as the author counts. If the result holds only in a narrow corner of this grid, it is overfitted.
  3. A level at the average and 2022. Add a half-size unit at Z <= 0 with an exit at +0.25 SD. Compare 2022 and the full history separately. The author says such a unit mostly does not work, but it saves years like 2022.
  4. Limit order realism. A fill when price touches the level versus a fill only when price trades through it. Seven limit orders on every move make the test very sensitive to this assumption.
  5. Stop versus no stop in variant B. A stop at 2, 4 and 8 ATR and no stop. Look at the worst trade, the worst month and, separately, at 2008, 2020 and 2022. Clement's claim "the wider the stop, the better" can only be checked on data that includes stocks removed from the index and bankrupt ones.
  6. Limit on new units. No limit versus three units a day. The author's rule should cut losses on crash days; check whether that holds on your data.
  7. Costs on small orders. The ladder splits the position, and a minimum commission per order hits it harder than a single entry. The author says directly that without a broker with no minimum commission, it is hard for a small account to trade this way.

Platform notes

TradingView (Pine Script)

  • Scaling in is enabled with pyramiding = 7 in strategy(). By default there are no additional entries, and the second step simply will not fill. Each step needs its own entry id.
  • The limit order strategy.entry("L3", strategy.long, limit = x) stays active until canceled. The level changes every day: a repeated call with the same id moves the order, and strategy.cancel is needed to remove it.
  • Exiting a unit: strategy.exit("X3", from_entry = "L3", limit = y). The closing order is set by close_entries_rule in strategy(), "FIFO" by default. For units to close independently, specify "ANY". The order does not affect final equity, but it does affect trade statistics.
  • Filling limit orders on a touch is optimistic. backtest_fill_limits_assumption in strategy() requires price to trade through the level by a given number of ticks.
  • A portfolio across the S&P 500 cannot be tested: a strategy trades only the chart symbol.

MultiCharts and TradeStation (EasyLanguage)

  • Multiple entries in the same direction are enabled in the strategy properties. Without this setting the second step is ignored. Name the steps: Buy ("L3") next bar at LevelPrice limit.
  • Exiting a specific unit: Sell ("X3") from entry ("L3") next bar at ExitPrice limit. Limit orders live one bar and have to be sent on every bar.
  • If both an entry level and an exit level are hit within the same daily bar, their order is unknown. You need Look-Inside-Bar Backtesting in TradeStation or Bar Magnifier in MultiCharts.
  • A ladder across a basket of stocks is built in Portfolio Maestro or Portfolio Trader; a single chart holds only one symbol.

MetaTrader 5 (MQL5)

  • A netting account has one position per symbol. Each step increases the volume and shifts the average price, and a unit has no TP of its own. Laddered exits are done with pending SellLimit orders for part of the volume, and you track the units yourself.
  • On a hedging account each step is a separate position with its own TP. A pending SellLimit there opens a new short position instead of closing part of the long one. The account type depends on the broker, and logic built for one type does not work on the other.
  • Seven units require a position of at least seven minimum lots, taking SYMBOL_VOLUME_MIN and SYMBOL_VOLUME_STEP into account. On a large contract with a small account the ladder may not fit.
  • Place one-day limit orders with an expiration, otherwise yesterday's level will fill today. A basket of stocks in an EA is possible, but the broker must offer the full list of stocks.

Where the idea can break

  • Variant B without a stop. The loss on a single trade is limited only by position size. A stock after bankruptcy, fraud or a disastrous earnings report will not return to the average. The ladder and adding make this worse: the deeper the decline, the larger the position, and the maximum size is reached exactly in the worst scenario. Clement's only protection is 5–10 different stocks. Trading variant B on a single instrument removes that as well, which means trading with no protection at all.
  • The thesis "the wider the stop, the better" comes from a backtest. If the data lacks stocks that dropped out of the index, a test without stops will show a better result than reality. Clement uses historical index constituents without survivorship bias; retail traders often do not have such data.
  • In crashes, stock correlations go to one, and 5–10 positions become one. Sutherland says directly that trend kills mean reversion, and covers this with a trend portfolio that is not in this card.
  • Sutherland's figures (Sharpe above 3, 90% profitable months) refer to good periods. In Sutherland's words, it is almost impossible to take an MR model through 1987 without a drawdown of about 50% in a short time, and there are only about twenty tail events in history. A model that avoided them in a backtest is most likely a lucky survivor of a search over many variants.
  • Shorts: the author walks through an example where a stock rose 400% with a position of 5% of the account, which is minus 20%, and there can be several such stocks at once. A short ladder needs volatility sizing and large stocks.
  • The author did not name the average period, the number of steps, the exit step or the levels beyond 1 SD. This is our formalization, and a wide parameter grid is easy to overfit.
  • On daily bars some steps fill on a gap at the open. The actual price is below the calculated one, and with low liquidity, limit orders near the extreme may not fill at all.

Sources

  • 031 - PJ Sutherland - The Complementary Dynamics of Mean Reversion and Trend-Following Strategies

    The Algorithmic Advantage · PJ Sutherland · 2024-12-13

    • 09:52A simple model: an average and a stretch measure
    • 10:50A mean reversion curve instead of a single parameter
    • 11:07Scaling in at 0.25, 0.5 and 1 SD
    • 13:06Seven entries and seven exits, 49 combinations
    • 13:47The order is split down to a single share
    • 15:13Good periods: Sharpe above 3, 90% of months
    • 22:221987 and survivorship bias in model selection
    • 25:10Universe: country ETFs and large stocks
    • 27:37Twenty entries and twenty exits
    • 28:26Order batches: 10 a day for 5 days
    • 30:26Equal allocation to long and short
    • 32:37Entries over 2–3 days, a 1.3-day hold, exits close to the market
    • 33:55Volatility sizing versus static sizing
    • 34:36Short example: the stock rose 400%
    • 37:41From 1 SD to 2–3 SD: fewer trades, higher win rate
    • 38:022022: the edge shifted to 0.2 SD below the average
  • 010 - Alan Clement - Fortified & Diversified Quantitative Equities Strategies

    The Algorithmic Advantage · Alan Clement · 2023-12-05

    • 18:09Historical index constituents without survivorship bias
    • 42:19Two conditions: trend direction and a pullback against it
    • 43:03Trend: above a long-term average or by ROC
    • 43:35An extreme of the recent range and a volatility spike
    • 44:32Buying during the decline without confirmation
    • 44:43Adding as the stock gets more oversold
    • 45:54Stops work poorly in mean reversion
    • 46:37The wider the stop, the better the result
    • 47:00Risk is split across 5–10 positions

Author's claims

These figures and statements are the author's. We have not verified them.

  • Sutherland: in good periods MR models deliver a Sharpe above 3, about 90% profitable months and 70% winning trades. This refers to a stable regime, not to the whole history.
  • Sutherland: the average holding period across all the author's models is about 1.3 days.
  • Sutherland: if the entry moves from 1 SD to 2–3 SD, there are fewer trades and the win rate is higher. In 2022, in Sutherland's words, the entire edge shifted to a level about 0.2 SD below the average.
  • Sutherland: in a backtest of about 40 years, including 1987, volatility sizing beat static risk-based sizing in every comparison.
  • Clement: for mean reversion on index stocks, capital is split across 5–10 positions, so that one stock falling to zero costs a small share of the account.

Related ideas

Updated: 2026-09-10