Appearance

Personalize your experience

Mode
Accent Color
Direction
MarketplacestrategiesGARCH Sigma Breakout
QuaScript

GARCH Sigma Breakout

Admin's ChoiceFree

Trades GARCH sigma events in the trend direction

0.0(0)
0 installs 0 0 comments
Q
159 listings

The QuaTick team's QuaScript analyses, run by the native C++ engine.

View Profile
quascriptstrategyvolatilitygarchbreakout
Free
Backtest this strategy Open in QuaTick IDE Edit in IDE
Version
Updated
Compatible

Live engine preview

QuaScriptQuaScript

The QuaScript engine's own output on the chart the terminal uses. Change the settings or edit the code and press Run to recompute it.

GARCH Sigma Breakoutengine result
Loading the engine result…
quatick-charts · QuaScript engine on synthetic 1-minute bars · drag to pan · scroll to zoom · Run executes the script on the engine (⌘/Ctrl+Enter while editing)

About

Buys or sells genuine volatility events. A GARCH(1,1) forecast gives the expected one-bar move; a close beyond k forecast sigmas from the previous close, in the direction of the longer trend, is an event the model did not expect, and such events tend to start moves rather than end them. Entry: |close - previous close| above k GARCH sigmas, with the close on the trend side of the slow EMA. Exit: stop at the event bar's far side, target `reward` R, trailing after 1R. Risk: 1 % per trade. Method: Bollerslev (1986).


Settings

Alpha (shock weight): 0.06

Beta (persistence): 0.92

Event size (sigma): 2.5

Trend EMA: 200

Target (R): 2.5


Measured backtests

Run by the backtest engine on public candles, 2025-11-01 to 2026-11-01, with the script's own commission and slippage, on BTCUSDT 1h (Binance) and ETHUSDT 1h (Binance). The figures per market are in the Measured backtest panel below. Past results do not predict future returns.


Backtest it yourself

Open it on the backtesting page to run it on any symbol, interval and date range, then use Monte Carlo, optimisation, walk-forward and robustness tests.

Strategy Rules

Entry Conditions

  • ▸ |close - previous close| above k GARCH sigmas, with the close on the trend side of the slow EMA

Exit Conditions

  • ▸ stop at the event bar's far side, target `reward` R, trailing after 1R

Measured backtest

BTCUSDT 1h (Binance), 2025-11-01 to 2026-11-01 · backtest engine, script costs included

Backtest this strategy

-14.4%

Return

-0.88

Sharpe

-19.9%

Max DD

26.2%

Win Rate

103

Trades

MarketTradesReturnSharpeMax DDWin rateProfit factor
BTCUSDT 1h103-14.4%-0.88-19.9%26.2%0.81
ETHUSDT 1h8820.2%1.27-9.8%36.4%1.31

Past results on historical data do not predict future returns.

Source Code

Edit in IDE
quascript
1strategy "GARCH Sigma Breakout" {
2 overlay = true
3 capital = 100000
4 commission = 0.05
5 slippage = 1
6 sizing = risk_percent
7 max_leverage = 1
8 size = 1
9 pyramiding = 1
10}
11/// Buys or sells genuine volatility events. A GARCH(1,1) forecast gives the expected one-bar move;
12/// a close beyond k forecast sigmas from the previous close, in the direction of the longer trend,
13/// is an event the model did not expect, and such events tend to start moves rather than end them.
14/// Entry: |close - previous close| above k GARCH sigmas, with the close on the trend side of the
15/// slow EMA. Exit: stop at the event bar's far side, target `reward` R, trailing after 1R.
16/// Risk: 1 % per trade. Method: Bollerslev (1986).
17use "viz/premium" as pr
18alpha = param.float(0.06, title = "Alpha (shock weight)", min = 0.01, max = 0.3, step = 0.01, group = "GARCH")
19beta = param.float(0.92, title = "Beta (persistence)", min = 0.5, max = 0.99, step = 0.01, group = "GARCH")
20k = param.float(2.5, title = "Event size (sigma)", min = 1, max = 6, step = 0.1, group = "Entry")
21trend = param.int(200, title = "Trend EMA", min = 20, max = 1000, group = "Entry")
22reward = param.float(2.5, title = "Target (R)", min = 0.5, max = 10, step = 0.1, group = "Risk")
23(vol, _) = hft.garch(close, alpha, beta, 0)
24sig = vol / 100
25s_prev = sig[1]
26move = (close - close[1]) / math.max(close[1] * s_prev, 1e-12)
27t = ta.ema(close, trend)
28flat = position.size == 0
29up_ev = move > k and close > t
30dn_ev = move < -k and close < t
31if flat and up_ev {
32 stop = low
33 order.market("L", side.long)
34 exit.bracket("L exit", entry = "L", stop = stop, target = close + (close - stop) * reward, trail_offset = close - stop, trail_trigger = close + (close - stop))
35}
36if flat and dn_ev {
37 stop = high
38 order.market("S", side.short)
39 exit.bracket("S exit", entry = "S", stop = stop, target = close - (stop - close) * reward, trail_offset = stop - close, trail_trigger = close - (stop - close))
40}
41risk.max_drawdown(25)
42pu = render.line(close[1] * (1 + k * s_prev), "Event high", color = color.translucent(color.orange.300, 50), width = 1)
43pl = render.line(close[1] * (1 - k * s_prev), "Event low", color = color.translucent(color.sky.300, 50), width = 1)
44render.band(pu, pl, color = color.indigo.400, opacity = 0.05, title = "Expected range")
45render.line(t, "Trend EMA", color = color.amber.300, width = 1.5)
46render.mark(up_ev, shape = shape.diamond, at = anchor.below_bar, color = color.orange.300, size = 0.6, title = "Up event")
47render.mark(dn_ev, shape = shape.diamond, at = anchor.above_bar, color = color.sky.300, size = 0.6, title = "Down event")
48persist tb = draw.table.create(anchor.top_right, 4, 2)
49if bar.is_last {
50 pr.heading(tb, 2, "GARCH Sigma Breakout", "Strategy · volatility events")
51 pr.row(tb, 2, "Forecast sigma", str.format("{:.2%}", sig), color.white)
52 pr.row(tb, 3, "Last move", str.format("{:+.1f} sigma", move), math.abs(move) > k ? pr.WARN : color.white)
53}
54 
Read-only preview. Open in the QuaTick IDE to edit and deploy.

Reviews

No reviews yet. Be the first to review this listing.

Discussion

Sign in to join the discussion. Your posts and replies show up on your profile.