Skip to content

Volatility-targeted sizing for an opening range breakout

Micro E-mini S&P 500 (MES) · 5-minute bars · 2016 to 2026 · Volatility

Marginal: profit factor 1.08 out of sample, not clearly above break-even, t = 0.7.

Profit factor, out of sample
1.08
Average trade, out of sample
+0.03R
Win rate, out of sample
43%
Trades, 10 years
2,687
Max drawdown
$41,467
Pass odds, median plan
19.4%

Hypothetical results. These results are based on simulated or hypothetical performance results that have certain inherent limitations. Unlike the results shown in an actual performance record, these results do not represent actual trading. Also, because these trades have not actually been executed, these results may have under- or over-compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated or hypothetical trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profits or losses similar to these being shown.

Abstract

We backtested the volatility-targeted sizing rules on Micro E-mini S&P 500 (MES) 5-minute bars from 2016-01-11 to 2026-10-30: 2,687 trades, with commission and a tick of slippage on every market and stop fill. In sample (to 2023-08-03) it made −0.04R per trade with a profit factor of 0.94; out of sample (from 2023-08-04) +0.03R per trade and 1.08 over 812 trades. 16 of the 16 parameter settings we tried were profitable out of sample. Sized at $250 of risk a trade, simulated 50K evaluations passed 11% to 22% of the time across 36 tracked plans.

1Hypothesis

Keep the trades, change the size: risk more when recent volatility is low and less when it is high, and compare with a flat risk and a flat contract count.

If volatility forecasts risk better than it forecasts returns, sizing against recent volatility should smooth the equity curve without changing the edge per unit of risk.

2Data

Instrument
Micro E-mini S&P 500 (MES), traded on the ES price series (ES.c.0: front month, rolled on the calendar). CME Globex via Databento.
Period
2016-01-11 to 2026-10-30: 2,746 sessions, 1,056,820 one-minute bars, built into 210,816 5-minute bars of the regular session (09:30 to 16:00 ET).
Costs
$0.75 commission a contract each way and 1 tick ($1.25) of slippage on every market and stop fill. Limit orders fill when price touches them; market orders fill at the next bar's open and stops at their price, each with one tick of slippage; when a bar touches both the stop and the target, the stop counts.
Position size
About $250 of risk a trade: micro contracts, rounded down, at least one. R is a trade's net P&L divided by its risk at entry.
Out of sample
The last 30% of weekdays: 2023-08-04 on (846 days), after 1,974 in-sample days. The rules were fixed before either side was run.

3Method

Our reading of the publicly described rules; the creator may trade it differently. The rules, exactly as the code runs them:

  1. The trade is the 15-minute opening range breakout: the first 5-minute close outside the 09:30-09:45 ET range, until 12:00 ET, stop at the other side, target 2 times the risk, flat at 15:55 ET.
  2. Volatility is the standard deviation of the last vol_len (20) daily returns (regular-session closes); its long-run level is the average of that over the last 250 days.
  3. Size (sizing "vol"): risk risk_usd (250) dollars times long-run volatility over current volatility, between 0.25 and cap (2) times, in micro contracts, rounded down, at least 1. "risk" risks a flat 250 dollars a trade; "fixed" trades contracts (2) micros every time.
bot.py, the file the engine ran
"""Volatility-targeted sizing for a 15-minute opening range breakout, on Micro E-mini S&P 500 (MES). The entries and exits stay the same; only the size changes. The paper compares three ways to size it. Rules:  1. The trade is the 15-minute opening range breakout: the first 5-minute close outside the 09:30-09:45     ET range, until 12:00 ET, stop at the other side, target 2 times the risk, flat at 15:55 ET.  2. Volatility is the standard deviation of the last `vol_len` (20) daily returns (regular-session     closes); its long-run level is the average of that over the last 250 days.  3. Size (`sizing` "vol"): risk `risk_usd` (250) dollars times long-run volatility over current     volatility, between 0.25 and `cap` (2) times, in micro contracts, rounded down, at least 1.     "risk" risks a flat 250 dollars a trade; "fixed" trades `contracts` (2) micros every time."""import math import qy  def ready(*values):    """True when every value is a number (indicators have no value until they have enough data)."""    return all(v is not None and v == v for v in values)  class Bot(qy.Strategy):    """The opening range breakout, sized to volatility."""     symbol = "MES"    timeframe = "5m"    session = "rth"    params = {"sizing": "vol", "vol_len": 20, "cap": 2.0, "contracts": 2, "risk_usd": 250, "max_contracts": 50}    max_position = 50    entry_window = ("09:45", "12:00")    flatten_time = "15:55"    overnight = False     def setup(self):        self.or_high, self.or_low = self.opening_range(minutes=15)        self.day = None        self.last = None        self.closes, self.vols = [], []        self.done_day = None     def _scale(self):        n = self.p.vol_len        if len(self.closes) <= n or not self.vols:            return 1.0        rets = [math.log(b / a) for a, b in zip(self.closes[-n - 1:-1], self.closes[-n:])]        m = sum(rets) / n        vol = math.sqrt(sum((r - m) ** 2 for r in rets) / (n - 1))        long_run = sum(self.vols) / len(self.vols)        return max(0.25, min(self.p.cap, long_run / vol)) if vol > 0 else 1.0     def _size(self, risk_points):        if self.p.sizing == "fixed":            return self.p.contracts        budget = self.p.risk_usd * (self._scale() if self.p.sizing == "vol" else 1.0)        per_contract = risk_points * self.point_value        n = int(budget // per_contract) if per_contract > 0 else 1        return max(1, min(self.p.max_contracts, n))     def _end_of_day(self):        self.closes = (self.closes + [self.last])[-300:]        n = self.p.vol_len        if len(self.closes) > n:            rets = [math.log(b / a) for a, b in zip(self.closes[-n - 1:-1], self.closes[-n:])]            m = sum(rets) / n            self.vols = (self.vols + [math.sqrt(sum((r - m) ** 2 for r in rets) / (n - 1))])[-250:]     def on_bar(self, bar):        if bar.date != self.day:            if self.day is not None:                self._end_of_day()            self.day = bar.date        self.last = bar.close        high, low = self.or_high[0], self.or_low[0]        if not ready(high, low) or self.done_day == bar.date or not self.position.is_flat:            return        close = bar.close        if low <= close <= high:            return        self.done_day = bar.date        if bar.dt.hour * 60 + bar.dt.minute + 5 > 720:            return        f = self._scale()        if close > high:            self.buy(self._size(close - low), stop_price=low, target_r=2.0, tag=f"ORB long | f={f:.4f}")        else:            self.sell(self._size(high - close), stop_price=high, target_r=2.0, tag=f"ORB short | f={f:.4f}")

4Results

Table 1. In sample (2016-01-11 to 2023-08-03) against out of sample (2023-08-04 to 2026-10-30), after costs.
StatisticIn sampleOut of sampleAll
Trades1,8758122,687
Net P&L−$19,552+$8,487−$11,065
Profit factor0.941.080.97
Average trade−0.04R+0.03R−0.02R
95% interval of the average−0.09 to 0.02−0.06 to 0.11−0.06 to 0.03
t-statistic of trade R−1.330.66−0.74
Win rate41%43%42%
Average win / average loss1.331.441.36
Max drawdown$41,467$9,487$41,467
Sharpe ratio (daily, annualized)−0.430.49−0.17
Longest losing streak16916
Long / short profit factor1.05 / 0.821.06 / 1.091.05 / 0.89
Average holding time207 min195 min203 min
Commission paid$21,770$4,304$26,073
Cumulative P&LDrawdown from the highOut of sample from 2023-08-04

Drag across the chart to zoom into a period, double-click to reset.

Figure 1. Cumulative P&L after costs and its drawdown from the running high, 2016-01-11 to 2026-10-30, at about $250 of risk a trade. The shaded part is out of sample.
In sample (1,875 trades)Out of sample (812)Averages

Averages: −0.04R in sample, +0.03R out of sample.

Figure 2. The distribution of trade results in R, as a share of each side's trades. Bars are in sample; the line is out of sample.
In sampleOut of sampleQuintile mean, 95% intervalOLS fitDensity contours

1,600 of 2,687 points drawn; the fit and the means use all of them. Drag a box to zoom, double-click to reset.

Figure 3. Trade R against the size multiple volatility targeting chose; the dashed line is the OLS fit (r = 0.02, p = 0.37, n = 2,687; Spearman ρ = −0.08). Out of sample alone: r = 0.02, p = 0.53. Squares are the means of five equal-count bins, with 95% intervals.
Table 2. The same rule with one change at a time, after costs.
VersionTradesPF in samplePF out of sampleAvg R outSharpe outMax drawdown
Volatility-targeted (as tested)2,6870.941.08+0.03R0.49$41,467
$250 of risk every trade2,6870.921.06+0.03R0.41$32,451
2 micros every trade2,6870.961.05+0.03R0.32$14,194

5Robustness

We reran the strategy on a grid of 16 settings of its two main parameters, each on the full history with the same split. 0 were profitable in sample and 16 out of sample.

4
1.08
1.08
1.10
1.07
3
1.08
1.08
1.10
1.07
2
1.07
1.08
1.10
1.07
1.5
1.07
1.07
1.09
1.07
10
20
40
60

Volatility window (days) across, largest size multiple up. Solid outline: the defaults we tested; dashed: the in-sample best.

Hover a cell for both sides of the split.

Volatility window (days) 10.0 to 60.0 across · Largest size multiple 1.50 to 4.00 in depth · Profit factor, out of sample 1.07 to 1.10 as height and shade. Drag or use the arrow keys to turn it.

Drag to rotate; ctrl or ⌘ and scroll to zoom.

Figure 4. Profit factor across volatility window (days) and largest size multiple, as a map and as a surface of the same grid. Values above 4 are drawn at 4.

What would change it

Nothing on the grid helps. Its in-sample best, volatility window (days) 40 and largest size multiple 3, had profit factor 0.94 in sample but 1.10 out of sample, against 1.08 for the defaults.

In-sample yearOut-of-sample year95% interval
Figure 5. Average trade by calendar year with its 95% interval: a year-by-year walk through the history. Lighter bars are in-sample years.
Figure 6. Average trade in three volatility regimes: terciles of the 20-session average of the daily range (% of the open), up to the day before the trade (regular session). The cut-offs use the whole period, so this describes, it doesn't forecast.
Figure 7. Average trade by weekday and by the hour of entry (New York time), with 95% intervals.
Median25th to 75th percentile5th and 95thRuin: down $2,000
Figure 8. 2,000 simulated years of 252 sessions, drawn session by session from the whole backtest (days without trades included), with 48 paths drawn; red paths lost $2,000 at some point. Risk of ruin 75.0% [73.1%, 76.8%]; 45% of years ended up; median ending P&L −$773, 5th to 95th percentile −$10,490 to +$9,069.

6Prop-firm implications

The backtest's sessions run through the rules of 36 tracked 50K evaluations: 2,000 runs of up to 60 sessions each, with the drawdown and daily limits checked against each trade's intraday low. Intervals are Wilson 95% intervals of the simulation. A simulation of the past, not the chance that anyone passes.

PlanPass odds, 95% intervalPassFailOut of timeMedian sessions
AquaFutures Beginner 50K Evaluation21.5%62%16%29
Bulenox 50K Qualification Account (Legacy, Option 2, EOD drawdown)21.5%63%16%29
FundedNext Futures Flex Challenge 50K21.0%78%1%21
Bulenox 50K Qualification Account (Legacy, Option 1, trailing drawdown)20.9%68%11%29
Alpha Futures Standard 50K Evaluation19.4%73%7%27
Alpha Futures Zero 50K Evaluation19.4%73%7%27
Apex Trader Funding 50K EOD Evaluation19.4%73%7%27
FTMO Futures Growth 50K Evaluation19.4%73%7%27
Funded Futures Family 50K Evaluation (standard plan)19.4%73%7%27
Funded Futures Network Standard MAX 50K Evaluation19.4%73%7%27
Scale 0 to 25%.
Figure 9. Simulated pass odds by plan, best first, with each plan's fail and out-of-time shares and the median sessions to a pass.

7Limitations

  • Sizing can't create an edge: if the trades lose, every version loses.
  • One rule and one market (MES).
  • A backtest on the past, with fills simulated from one-minute bars; live fills, queues and outages differ.

8Conclusion

Marginal: profit factor 1.08 out of sample, not clearly above break-even, t = 0.7. Nothing on the grid helps. Its in-sample best, volatility window (days) 40 and largest size multiple 3, had profit factor 0.94 in sample but 1.10 out of sample, against 1.08 for the defaults. The result is too close to break-even to tell apart from noise after costs.

9References

  1. Moreira, A., and Muir, T. (2017). Volatility-Managed Portfolios. Journal of Finance, 72(4), 1611-1644.

Every number on this page comes from the MES bot above, run by our backtest engine on our own data. We publish what doesn't work as well as what does, and we don't tune rules to look good.

Hypothetical results. These results are based on simulated or hypothetical performance results that have certain inherent limitations. Unlike the results shown in an actual performance record, these results do not represent actual trading. Also, because these trades have not actually been executed, these results may have under- or over-compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated or hypothetical trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profits or losses similar to these being shown.