← All ideas
#047ExitSwing

Retiring a strategy for good at a drawdown 1.5 times the historical one

Andrea Unger retires a system for good when its out-of-sample drawdown is 50% above the historical one or a flat period drags on. The backtest drawdown is itself understated, so the threshold base needs careful calculation.

The Algorithmic Advantage · Andrea Unger · Watch video

Markets

Futures, Indices, Commodities, Bonds

Timeframe

D1

Data

OHLC

Rules

Partly formalised

Difficulty

Medium

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

Andrea Unger trades a portfolio of many small futures systems and decides once a month which of them are working. Unger's Zeus program switches a system off for good under one of two conditions. The out-of-sample drawdown exceeded the historical maximum drawdown by 1.5 times. Or the system has gone too long without a new equity high; the length of this flat period was not stated.

A switched-off system does not come back. Unger does not refit its parameters: in Unger's experience, a few months later the original version performed better than the fixed one. If the idea still looks healthy, the author takes its original principle, drops the filters and builds the strategy again.

This is a lifecycle rule, not a trade rule. It fits into any system that has a backtest. The main pitfall is the base value: the historical backtest drawdown is almost always smaller than the one the strategy will show in trading.

Why it might work

The author's explanation is practical. A system that is going nowhere ties up margin and carries risk, and its place in the portfolio can go to another one. The threshold must be noticeably larger than the historical drawdown: a drawdown that is normal for the system should not kill it. Unger allows 40-60% instead of 50%, but considers fitting the threshold on history unreliable, and deliberately does not optimize the switch-off rules themselves.

The ban on "botox" also comes from the author. Refitted parameters get tuned to the latest bad stretch. A new strategy from scratch at least goes through the full cycle of development and out-of-sample testing.

Why the historical drawdown is understated (Finetiq's explanation):

  • A backtest is one path. The same trades in a different order give a different drawdown, and the actual value from history is rarely the worst possible one.
  • Maximum drawdown grows with the length of the period. Over five years of trading its expected depth is greater than over three years of backtest, even if the strategy has not changed.
  • The parameters were chosen on the same history. Selection among variants favors smooth curves, and the in-sample drawdown is biased downward.
  • Unger develops systems on one contract without costs and adds them later. A drawdown measured before costs is smaller than the trading one.

Hence a consequence. A 1.5× threshold on an understated base will switch off healthy strategies more often than it seems. On the other hand, a slowly dying system without deep drawdowns is caught only by the second trigger, the length of the flat period.

Rules

Base values (author, Finetiq calculation)

// before launch, from a backtest with costs and the same position size as in trading
HistMaxDD   = maximum drawdown of the daily equity curve, in money
              // author: "historical drawdown"; Finetiq: on the daily curve including open positions
HistMaxFlat = longest period without a new equity high, in trading days   // Finetiq

// Finetiq: a conservative base instead of a single number
FOR i = 1 TO 1000
    build a curve from the backtest's daily P&L, reshuffled in blocks of 20 days
    MaxDD_i = maximum drawdown over a segment as long as the planned live period
HistMaxDD_MC = 95th percentile of MaxDD_i

Switching off (author, second threshold Finetiq)

// at the close of each day after launch
Peak   = equity curve high since the launch date           // Finetiq: we count only the live period
LiveDD = Peak - Equity

IF LiveDD > 1.5 * HistMaxDD                                // author: exceeded by 50%
    KILL
IF trading days since the last high > 1.5 * HistMaxFlat   // author: long flat period; Finetiq: 1.5
    KILL

KILL = close positions, cancel orders, never switch on again   // author: "never plays again"
// author: a multiplier of 1.4-1.6 is acceptable, fitting on history is unreliable

After switching off (author)

// do not change the parameters of a switched-off system
IF the system's principle still looks valid
    new development from scratch: the original idea without filters, a new out-of-sample test
// add new independent systems in place of the switched-off ones, the author's guideline: within ~6 months

Variant B. Titan: temporary switch-off based on the equity curve (author)

// once a month, on a "shadow" curve: a switched-off system keeps being tracked but is not traded (author)
Perf9 = result over the last 9 months
Perf2 = result over the last 2 months
ON = Perf9 > 0 AND Perf2 > 0 AND Perf2 / 2 > Perf9 / 9
// author: 2 months "better on average" than 9; Finetiq: we compare the average monthly result
// next month the systems with ON are traded, the best by result (author)
// the author presents the thresholds as an example, they can be changed

Applying it to the drift-vwap-pullback card

// the author of that card fitted the parameters on 2020–2024 and calls 2024–2026 out-of-sample
HistMaxDD = maximum drawdown 2020–2024 on 1 NQ with costs          // Finetiq
from the first day of 2024:
    IF LiveDD > 1.5 * HistMaxDD THEN KILL
// question to test: would the strategy have been switched off on its own out-of-sample segment, and when

Parameters

Parameter Value Source
Base backtest maximum drawdown author
Drawdown threshold 1.5 × base author
Acceptable threshold range 1.4-1.6 author
Second trigger flat period longer than normal author
Flat period length 1.5 × the longest flat period in the backtest Finetiq
Live drawdown measured from the high after launch Finetiq
Switching back on never author
Conservative base 95th percentile of 20-day block reshuffles Finetiq
Portfolio review frequency once a month author
Variant B: result windows 9 and 2 months author
Variant B: condition both positive, 2 months better on average than 9 author

What to test

  1. False switch-offs. Slice the history into windows: 3 years of development, 2 years of trading. For each of your strategies, check whether the threshold triggered and what the strategy did afterwards. Compare multipliers of 1.3, 1.5 and 2.0 by the share of switch-offs after which the strategy recovered.
  2. Which base. A single backtest number without costs, with costs, and the 95th percentile of reshuffles. See how far the switch-off date moves.
  3. For good versus temporarily. A portfolio of your strategies in three modes: everything always on, switch-off for good, monthly switching on by the Titan rule on a shadow curve.
  4. Flat period threshold. 1, 1.5 and 2 times the longest flat period in the backtest. For strategies with rare trades a flat period can last years without any degradation.
  5. Portfolio without replacement. A run in which switched-off strategies are not replaced by anything. If you have 2-3 systems rather than 30 out of 100 like Unger, the rule will quickly leave the portfolio empty.
  6. Someone else's strategy out-of-sample. The scheme from the "Applying it" block on drift-vwap-pullback and on any card where the author named the parameter fitting period.

Platform notes

TradingView (Pine Script)

  • strategy.risk.max_drawdown(value, type), once the drawdown is reached, closes positions and blocks new orders until the end of the test. The drawdown is calculated over the whole test history, including the segment you took the base from. To measure from the launch date you need your own counter on strategy.equity and an input parameter with the date.
  • It is convenient to take the base from a separate run on the development segment: strategy.max_drawdown at the end of that run.
  • A switch-off in a backtest means there are no trades until the end of the chart. To see what would have happened next, you need a second instance of the strategy without the rule.
  • Pine sees the curve of one strategy on one symbol. A portfolio of many systems and the Titan rule cannot be built here.

MultiCharts and TradeStation (EasyLanguage)

  • Strategy curve: NetProfit + OpenPositionProfit. Store the high and the switch-off flag in variables, and set the launch date and the base as inputs.
  • When enabled, a strategy is recalculated over the whole history. With the launch date and the base in the inputs the switch-off is reproduced, but on theoretical rather than real fills. Make the decision from the report of real trades.
  • Unger calculates the rotation outside the platform: each system's daily P&L is exported from MultiCharts and the matrix is assembled in a custom MATLAB program. For a portfolio of dozens of strategies this is closer to Unger's practice than code inside a single strategy.

MetaTrader 5 (MQL5)

  • ACCOUNT_EQUITY is shared by all EAs on the account. Build a single strategy's curve from the deal history by magic number: HistorySelect, HistoryDealGetInteger(ticket, DEAL_MAGIC), HistoryDealGetDouble for DEAL_PROFIT, DEAL_COMMISSION, DEAL_SWAP, plus the floating profit of open positions.
  • Store the switch-off flag outside the EA's memory, in a terminal global variable or in a file. Otherwise a terminal restart will put the system back into trading.
  • Swap and commission in MT5 are separate deal fields. If the base was taken in the tester without them, the live drawdown will be systematically deeper.

Where the idea can break

  • The 1.5 threshold is one trader's heuristic. Unger calls fitting the threshold unreliable and gives no statistics on how often switch-offs turned out to be right.
  • The backtest base is understated for the reasons above. Without a correction the rule switches off some strategies that simply hit a drawdown normal for them but not seen in history.
  • For a system with rare trades an out-of-sample drawdown builds up over years. The rule triggers late, when the main losses have already happened.
  • Switching off for good rules out recovery. If a strategy is cyclical, the Titan variant with a shadow curve may turn out better, but it also needs testing.
  • The rule is designed for a development pipeline. Unger has a hundred strategies to choose from and regular replacement. With one or two systems it turns into a decision to "stop trading".
  • The author did not state the length of the flat period. The second trigger in the card is entirely our formalization.

Sources

  • 038 - Andrea Unger - 672% Returns? Sure! Would You Like Some Risk with That?

    The Algorithmic Advantage · Andrea Unger · 2025-05-07

    • 02:23The 2008 contest: a $15,100 account, full risk
    • 04:34A drawdown of about 46% in a month
    • 46:10The strategy portfolio mix changes once a month
    • 47:05Titan rules: results over 9 and 2 months
    • 51:29Titan benches a system, Zeus kills it
    • 51:54Threshold: maximum drawdown × 1.5 or a long flat period
    • 52:19Killed systems must be replaced with new ones
    • 1:04:43Rotation backtest on daily P&L since 2008
    • 1:05:32A switched-off system keeps being tracked
    • 1:08:37Unger does not optimize the switch-off rules
    • 1:09:22Out-of-sample drawdown 50% larger than historical
    • 1:09:50100 strategies, about 30 in trading
    • 1:20:31Development on one contract without costs
    • 1:34:47Updated parameters performed worse than the original
    • 1:35:14No "botox": a new strategy from scratch

Author's claims

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

  • Andrea Unger won the World Cup Trading Championship four times. In 2008 Unger made +672% on a $15,100 account trading at full risk, and during the contest went through a drawdown of about 46% in a single month.
  • For a $100,000 account in micro futures the author advises having about 100 developed strategies, of which about 30 will end up in trading.
  • If 10 systems are switched off in a month, according to the author, 10 new ones should be added over the next six months.
  • The author tests the process of switching strategies on and off on the daily P&L of all systems since 2008.

Related ideas

Updated: 2026-09-10