Idea in brief
Pavel Kycek (Robuxio) runs algorithmic funds and reduces trading approaches to three moves: breakout, mean reversion and trend. For mean reversion Kycek draws a minimal setup on a whiteboard. The average is a 5-day MA. Every day you measure how far the close has moved from it. This distance has a usual size, about 2% in the author's example. If the distance becomes much larger in a single day, for example 6-7%, price tends to come back. Enter against the move, exit after a few days or at the average.
The second rule concerns the moment of entry. Retail traders wait for confirmation of a reversal. Kycek says that in mean reversion, the lower price has gone, the higher the probability of a win, so you should enter into the move itself.
The numbers 2% and 6-7% are a whiteboard illustration, not a test result. The author does not say how to calculate the usual deviation. Below it is defined with a bar-based formula and marked as ours.
Why it might work
Kycek refers to research without showing it: on daily bars, a strong one-day deviation from the average reverts more often than not, and such trades last from one to three or four days. In the same passage the author says that a trade moving against the position is part of how the approach normally works.
Kycek breaks down where to apply it by asset class. On stocks, especially large ones, and on broad indices, long-side mean reversion works: the stock market rises over the long run. Small caps are less efficient, and there mean reversion can also be traded on the short side. Forex, in the author's words, tends to revert to the mean on both short and long horizons. On commodities and crypto all approaches work.
A separate argument concerns costs. The higher the timeframe, the larger the average trade relative to commissions and slippage. On daily bars, according to the author, costs eat a noticeably smaller share of expectancy than on hourly bars.
Kycek states the "no confirmation" rule in the part about entering a pullback after a breakout, but phrases it as a property of mean reversion in general. It is worth testing separately for the pure version without a trend.
Rules
Deviation measure
MA5 = SMA(Close, 5) // author: 5-day average; Finetiq: simple
Dev = Close / MA5 - 1 // author: how far the close has moved from the average
// usual deviation: about 2% in the author's example, the calculation is not named
NormDev = SMA(Abs(Dev), 50)[1] // Finetiq: average absolute deviation over 50 days, excluding the current bar
Z = Dev / NormDev // how many times further than usual today
// Finetiq: the current close is part of MA5, so
// Close - MA5 = 0.8 * (Close - average of the four previous closes).
// The compression is the same in Dev and in NormDev, so it does not affect Z
// alternative reading of the author: the usual daily move
// NormDev2 = SMA(Abs(Close / Close[1] - 1), 50)[1]
// with it the 0.8 compression does matter, so the threshold has to be chosen again
Entry
// stocks and indices: long only (author)
IF Z <= -3 // author: 6-7% with a usual 2%; Finetiq: threshold 3
BUY AT NEXT BAR OPEN // author: do not wait for reversal confirmation
// Finetiq: while a position is open, new signals are not added
// forex, commodities, crypto, small caps: short as well (author)
IF Z >= +3
SELL SHORT AT NEXT BAR OPEN
Exit
The author lists three methods and does not say which one is primary. We use whichever triggers first.
IF BarsSinceEntry >= 3 THEN EXIT AT NEXT BAR OPEN // author: trades last 1-4 days; Finetiq: 3
IF Long AND Close >= MA5 THEN EXIT AT NEXT BAR OPEN // author: return to the average
IF Long AND RSI(Close, 2) >= 70 THEN EXIT AT NEXT BAR OPEN // author: short-period RSI; Finetiq: 2 and 70
// short is mirrored: Close <= MA5, RSI(2) <= 30
// stop: not named by the author
StopLoss = EntryPrice - 3 * ATR(20) // Finetiq: emergency stop for longs, test with and without it
Variant. Pullback in a trend (same author)
Kycek combines this module with a trend breakout. The market has broken its 100-day high and is pulling back. The pullback is measured with the same measure, and the entry happens during the pullback without confirmation that the trend resumes. The exit for this combination is not named in the video.
Breakout = High > Highest(High, 100)[1] // author: breakout of the 100-day high
Fresh = Breakout occurred within the last 20 bars // Finetiq: breakout freshness window
IF Fresh AND Z <= -2 // Finetiq: pullback in a trend, softer threshold
BUY AT NEXT BAR OPEN
IF Close < SMA(Close, 10) THEN EXIT AT NEXT BAR OPEN // Finetiq: trend exit from the same video
Parameters
| Parameter | Value | Source |
|---|---|---|
| Average | SMA 5 of closes | author (type: Finetiq) |
| Deviation measure | Close / MA5 − 1 | author |
| Usual deviation | average absolute value over 50 days, excluding the current bar | Finetiq |
| Entry threshold | 3 usual deviations | Finetiq (from the author's example: 6-7% with 2%) |
| Reversal confirmation | do not wait | author |
| Direction on stocks and indices | long only | author |
| Time exit | 3 days | Finetiq (author: 1-4 days) |
| Exit at the average | close beyond MA5 | author |
| RSI exit | RSI(2), 70 and 30 | Finetiq (author: short RSI) |
| Emergency stop | 3 × ATR(20) | Finetiq |
| Variant: breakout | 100-day high | author |
| Variant: freshness and threshold | 20 bars, Z ≤ −2 | Finetiq |
What to test
- Threshold. 2, 2.5, 3, 3.5, 4 usual deviations. As the threshold rises, the number of trades drops sharply. If the result holds only around one value, it is overfitting.
- Usual deviation window. 20, 50, 100, 250 days. A short window adapts quickly: after a crash the usual deviation grows and signals disappear. A long window produces a burst of signals in a row at the start of a crisis. Compare drawdowns, not only the average trade.
- Two readings of "usual". Average deviation from MA5 versus the average daily move. Choose the threshold for the second one separately.
- Confirmation. Immediate entry versus entry after the first close in the direction of reversion, and versus buying above the high of the signal bar. This is the author's main claim, and it should be tested on the version without a trend.
- Exits one by one. 1, 2, 3, 4 days, return to MA5, RSI(2). See which exit gives more profit and which one reduces the worst trade.
- Stop. No stop versus 3 and 5 ATR. With entries without confirmation a stop often makes the test worse, but without one a single trade in a crash can wipe out a year.
- Breakdown by market. Long and short separately on indices, large stocks, forex and crypto. The author claims that shorting large stocks works worse.
- Costs. On forex and CFDs, account for the spread and swap over 1-4 nights; on crypto, for commissions and perpetual futures funding.
Platform notes
TradingView (Pine Script)
- The measure in two lines:
dev = close / ta.sma(close, 5) - 1andz = dev / ta.sma(math.abs(dev), 50)[1]. - By default, entry happens at the open of the next bar (
process_orders_on_close = false), which matches the rules. - Time exit:
bar_index - strategy.opentrades.entry_bar_index(0) >= 3. - RSI is calculated with Wilder smoothing on all three platforms, so there is no discrepancy here. The first bars of history can differ: discard a warm-up of 150-200 bars for the 50-bar window.
MultiCharts and TradeStation (EasyLanguage)
Average(Close, 5)is a simple average. Store the deviation in a variable and average it:Average(AbsValue(Dev), 50)[1].- On continuous futures back-adjusted by subtraction, price can drift to zero and below.
Close / MA5 - 1loses its meaning on such a series. Measure the deviation in ATR units,(Close - MA5) / AvgTrueRange(20), or use an unadjusted series. - In TradeStation, the daily bar of a futures contract closes at settlement. The deviation by settlement and by last trade differ, so run the backtest and live trading on the same kind of bar.
- Exit:
If BarsSinceEntry >= 3 then Sell next bar at market.
MetaTrader 5 (MQL5)
- The daily bar is built on the broker's server time. Brokers whose server is not on GMT+2/+3 may have short Sunday bars. This is especially harmful for MA5: a Sunday bar takes one of the five slots in the average and creates a false deviation by itself.
- Take the average from
iMA(..., 5, 0, MODE_SMA, PRICE_CLOSE), and calculate the usual deviation in a loop over closed bars with shift 1. - Calculate the signal on the closed bar (index 1) and check for a new daily bar, otherwise the entry will repeat on every tick.
- With a holding period of 1-4 nights, swap on CFDs and forex becomes a noticeable part of the average trade.
Where the idea can break
- The video has no backtest. 2% and 6-7% are a whiteboard example; the threshold and the window here are ours.
- Entry without confirmation means buying into a falling market. In crashes, signals on stocks arrive in bursts and positions open one after another. Without a limit on the number of simultaneous positions, the portfolio turns into one big bet.
- The usual deviation depends on the window. When the volatility regime changes, signal frequency changes severalfold.
- The author states the "the lower, the better" rule about a pullback in a trend. In a market without a trend it may not hold.
- The phrase about a short RSI allows two readings: an oversold measure for entry, or an exit. We took the exit.
- On back-adjusted futures, percentages are distorted, so an ATR-based measure is needed.