← All ideas
#004BreakoutPosition

Always in the market: reversal on an N-day breakout

A position is always open: a long is held until a new N-day low, where it reverses into a short, and vice versa. Marc Malek tested N from 1 to 200 and got the best risk-adjusted result at about 70 days.

The Algorithmic Advantage · Marc Malek · Watch video

Markets

Futures, Forex, Bonds, Indices, Commodities

Timeframe

D1

Data

OHLC

Rules

Author's rules

Difficulty

Easy

Status

Untested

The author named entry, exit and parameters.

TradingView has pitfalls
EasyLanguage has pitfalls
MetaTrader 5 has pitfalls

Idea in brief

In the early 2000s Marc Malek (Conquest Capital Partners) built a low-cost substitute for trend-following CTAs for the Columbia University fund. For the entry rule Malek chose the simplest breakout. A position is always open. A long is held until price makes a new low of the last N days. At that moment the position reverses into a short, and the short lives until a new N-day high. There is no flat.

There is one parameter: N. Malek ran every value from 1 to 200 on a portfolio of about 55 futures markets. The best ratio of return to risk came out at about 70 days. By Malek's own rule, the average holding period is 1.5 × N, that is about 105 days. On a single market this means two or three reversals a year.

Why it might work

Malek explains the returns of trend-following funds by two things: which markets they trade and on which horizon they catch the trend. The specific technique (moving averages or breakouts) is secondary. The author chose the breakout for its mathematical simplicity. If this is true, a 70-day breakout on a broad set of markets replicates the beta of the whole CTA industry. The author's indirect argument: CTA indices and individual funds correlate most strongly with exactly this length. Since professionals sell this beta, they have at least picked the best risk-adjusted version of it.

The second point concerns crises. Malek wrote a paper arguing that long-term trend is not a bet on rising volatility, at best it is long gamma: gains appear once the trend is already under way. Trends happen both in calm markets and in panics, so CTAs are almost indifferent to the regime. Very short breakouts behave differently. Their returns resemble a long volatility position: on average they are worse on a risk-adjusted basis, but they help more in sharp crashes.

The video contains no result figures: no returns, no Sharpe, no test period. The ranking of lengths and the correlations are described verbally. We have not verified them.

Rules

Core system (author)

// daily bars, each market calculated separately
N = 70

Upper = highest High over the last N closed bars
Lower = lowest  Low  over the last N closed bars
// Finetiq: levels are recalculated at the bar close and apply to the next bar

IF position = LONG
    SELL SHORT STOP at Lower        // new N-day low: reverse into a short
IF position = SHORT
    BUY STOP at Upper               // new N-day high: reverse into a long

// start, while there is no position yet
IF position = FLAT
    BUY STOP at Upper
    SELL SHORT STOP at Lower        // Finetiq: whichever level breaks first sets the entry direction

// there is no separate stop-loss or target:
// the opposite level is both the stop and the reversal point (author)

Reversal timing: two readings

// Reading 1: stop order, reversal at the moment the level is touched inside the bar
SELL SHORT STOP at Lower

// Reading 2: on the close
LowerPrev = lowest Low over the N bars before the current one
IF position = LONG AND Close < LowerPrev
    SELL SHORT AT NEXT BAR OPEN

// Finetiq: the author says "made an N-day low" without specifying. Test both

Position size (Finetiq)

// the author did not name a sizing method in the episode. A starting variant for testing
ATR20 = ATR(20)                                   // Wilder
Units = Equity * 0.2% / (ATR20 * PointValue)      // Finetiq: 1 ATR of movement = 0.2% of capital
// 0.2% assumes a portfolio of 20–50 markets. On a single market you can use 0.5–1%
// size is recalculated only at the moment of reversal

Variant: ensemble of lengths (author, choice of lengths Finetiq)

// the author took 20 lengths out of 200 and did not disclose which ones
Lengths = 20 values of N spaced evenly on a log scale from 5 to 200   // Finetiq

FOR EACH N IN Lengths
    a separate system following the rules above, with size Units / 20

// resulting position in the market = sum of the 20 positions:
// from fully short to fully long, with intermediate values

Parameters

Parameter Value Source
N (channel length) 70 days author
Search range 1–200 author
Position always long or short author
Exit only the reversal on the opposite breakout author
Markets about 55 futures: commodities, currencies, bonds, indices author
Reversal timing touch of the level or close beyond it Finetiq, two readings
Position size 0.2% of capital per 1 ATR(20) Finetiq
Number of lengths in the ensemble 20 author
Which lengths in the ensemble from 5 to 200, log scale Finetiq

What to test

  1. The curve across N. Run N = 10, 20, 40, 70, 100, 150, 200 on the same set of markets and plot return to drawdown against N. The author speaks of a peak around 70. The shape matters more: a wide plateau from 50 to 100 indicates robustness, a lone peak indicates chance.
  2. The 1.5 × N rule. Calculate the average trade duration for each N. If on your data it differs a lot from 1.5 × N, the markets or the period behave differently from the author's study.
  3. One market versus a portfolio. Compare the median result across individual markets with an equal-risk portfolio of 20–50 markets. The author's claims apply to the portfolio. On a single market the 70-day breakout will have years without a trend.
  4. Touch versus close. Reading 1 versus reading 2 on the same data. The difference shows what gaps, slippage and false touches of the level cost.
  5. Crisis months. Compare N = 5–10 with N = 70 during sharp crashes: autumn 2008, March 2020. The author claims that short breakouts behave like long volatility in such periods.
  6. Correlation with a CTA index. If you have monthly returns of a CTA index (the episode mentions the SocGen CTA index), calculate the correlation with the portfolio for different N. This tests the main replication thesis.
  7. Costs and rolls. For N below 20, account for commission and slippage on every reversal. For N = 70, account for futures rolls or CFD swaps: the position lives for months.

Platform notes

TradingView (Pine Script)

  • ta.highest(high, 70) calculated at the bar close already includes that bar. For a stop order on the next bar this is the right level. The [1] offset is needed in reading 2, where the close is compared with the channel before the current bar: close < ta.lowest(low, 70)[1].
  • strategy.entry in the opposite direction closes the current position and opens a new one by itself. The reversal takes a single command.
  • A strategy trades only the chart symbol. An equal-risk portfolio of dozens of markets cannot be built in Pine, and the author's claims apply precisely to the portfolio. Markets are tested one at a time, and results are combined outside TradingView.
  • N = 200 and trades lasting hundreds of days need long history, which is limited by the subscription plan. On continuous futures, check the roll adjustment: without it, the price jump at a contract change produces a false breakout.

MultiCharts and TradeStation (EasyLanguage)

  • Buy next bar at Highest(High, 70) stop lives for one bar. Send the order on every bar until the position changes. Buy with an open short reverses the position by itself.
  • Kevin Davey (The Algorithmic Advantage #036): for futures in TradeStation the daily bar close is the exchange settlement, while for a 1440-minute bar it is the last trade. A breakout may trigger on one bar type and not on the other. Test and trade on the same bar type.
  • Portfolio testing: Portfolio Trader in MultiCharts or Portfolio Maestro in TradeStation.
  • AvgTrueRange is a simple average of TrueRange. For sizing by Wilder's ATR, calculate it yourself: ATRw = ATRw[1] + (TrueRange - ATRw[1]) / 20.

MetaTrader 5 (MQL5)

  • The daily bar is built on the broker's server time. Short Sunday bars count as full bars, and 70 bars stop being 70 trading days. Compare the broker's daily chart with exchange data.
  • On a netting account a reversal is a single deal of double volume. On a hedging account the old position has to be closed explicitly, otherwise the account will hold a long and a short at the same time.
  • A position on the 70-day breakout lives for months. CFDs accrue a swap every night. Check that the tester applies the swap from the symbol specification, otherwise the result is inflated.
  • Take the levels from closed bars: iHighest(_Symbol, PERIOD_D1, MODE_HIGH, 70, 1) and iHigh at the index found. Recalculate the signal once, when a new daily bar appears.

Where the idea can break

  • The video contains not a single result figure. There is a verbal ranking of lengths and correlations, with no period, return or drawdown.
  • The length of 70 was chosen by searching 200 variants on the same history it was evaluated on. The study was done for a 2004 product, and the CTA industry's horizons may have shifted since then.
  • The idea is a portfolio idea. On a single market the system is always in a position and in a range it flips back and forth, giving up the channel width on every false breakout.
  • The short side is always on. On stock indices with a long uptrend, the short half can lose systematically.
  • The author did not name the position size. The portfolio outcome depends on sizing no less than on the exact N.

Sources

  • 005 - Marc Malek of Conquest Capital Partners

    The Algorithmic Advantage · Marc Malek · 2023-10-03

    • 44:51Long-term trend is not long volatility, at best long gamma
    • 1:07:52Two drivers of CTA returns: market set and timeframe
    • 1:08:18About 55 markets from the portfolios of the 20 largest CTAs
    • 1:09:03N-day breakout: always in the market, reversal
    • 1:09:43Testing N from 1 to 200, best around 70
    • 1:10:17Holding period about 1.5 × N
    • 1:10:37CTA indices correlate most strongly with the 70-day breakout
    • 1:11:03Short breakouts behave like long volatility
    • 1:12:18Ensemble: 20 lengths out of 200

Author's claims

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

  • By the author's estimate, two factors, the market set and the timeframe, explain 95–99% of the returns of long-term trend-following CTAs.
  • The author built the market set by averaging the portfolios of the 20 largest CTAs. The result was about 55 markets: commodities, currencies, bonds, indices.
  • The author ran the breakout for N from 1 to 200. The best risk-adjusted result came from a breakout of about 70 days. According to the author, both CTA indices and individual trend-following funds correlate most strongly with the 70-day breakout.
  • The average holding period is about 1.5 × N: about 90 days for a 60-day breakout.
  • For the Columbia University fund (2004), 20 lengths out of 200 were chosen as the most representative. Short breakouts worsen the product's returns but give it long volatility properties.

Related ideas

Updated: 2026-09-10