Gold futures backtesting: specs, margin and trading hours
Set the right point value for GC or MGC, size from drawdown rather than margin, match your bars to the nearly 24-hour session with its daily break, roll before first notice day, and include commission and slippage on every trade.
By Soren Huang · Published · updated · Editorial policy
Contents
- What do you need to know before backtesting gold futures?
- What are the contract specs of GC and MGC?
- How should margin affect your position size?
- What are gold futures trading hours, and how do they affect your bars?
- How do you handle rolls between contract months?
- How much cost and slippage should a gold backtest include?
- In what order should you set up a gold futures backtest?
- Frequently asked questions
What do you need to know before backtesting gold futures?
Before you backtest gold futures, set five things. Pick the contract: COMEX GC is 100 troy ounces at $10 per tick, and micro MGC is 10 ounces at $1 per tick. Size positions from drawdown, not margin. Match bars to the nearly 24-hour session and its daily break. Choose a roll method. Then add commission and slippage.
When traders say "New York gold futures", they usually mean GC on COMEX. COMEX is the metals exchange of CME Group.
What are the contract specs of GC and MGC?
GC and MGC are quoted at the same price in the same units, so one set of strategy rules works on both. The dollar value of each price step is the only difference, and it is ten times larger on GC.
A tick is the smallest price step a contract can move. For both gold contracts it is $0.10 per troy ounce. The size of the contract decides what that step is worth in your account.
| Gold (GC) | Micro Gold (MGC) | |
|---|---|---|
| Exchange | COMEX (CME Group) | COMEX (CME Group) |
| Contract size | 100 troy ounces | 10 troy ounces |
| Price quoted in | US dollars per troy ounce | US dollars per troy ounce |
| Minimum tick | $0.10 per ounce | $0.10 per ounce |
| Tick value | $10 | $1 |
| Value of a $1.00 price move | $100 | $10 |
In most backtesting software you enter this as the point value. The point value is the dollar result of a one-unit price move for one contract. For GC that is 100, and for MGC it is 10. If you load MGC data with the GC point value, every profit, loss and drawdown comes out ten times too large. The trades themselves still look correct, so the mistake is easy to miss.
Measure stops and targets in ticks or in price units, not in dollars, and they carry over between the two contracts. To see how far gold usually moves in a bar of your chosen length, run the Average True Range (ATR) on your own data and read it in ticks.
How should margin affect your position size?
Size a gold futures position from the backtest drawdown, not from the margin. Margin only tells you the minimum deposit needed to open a trade. It does not tell you what a losing streak will cost.
Initial margin is the deposit required to open one futures contract. Maintenance margin is the lower level your account must stay above while the position is open. CME Clearing sets the exchange minimums for gold futures and changes them when volatility changes. Your broker can require more than the exchange minimum. Check the current figure with CME Group or your broker on the day you plan the trade. Old numbers from articles or forum posts are often out of date.
Margin changes do not appear in price data, so a backtest cannot see them. If the exchange raises margin during a fast market, an account sized to the old margin can be forced to cut positions at the worst moment. The fix is to size well below what margin allows. This simple rule helps:
Contracts = drawdown budget ÷ (backtest maximum drawdown per contract × safety factor)
The drawdown budget is the largest fall in account value, in dollars, that you are willing to accept. The backtest maximum drawdown per contract is the worst peak-to-trough loss of one contract in your test, including costs. The safety factor is a multiplier above 1 that allows for future drawdowns larger than the past ones. A common choice is 2.
Hypothetical example
An account holds $100,000, and the trader accepts a drawdown of $20,000. On one GC contract the backtest shows a maximum drawdown of $25,000, which is already above the budget. On MGC the same rules show $2,500 per contract. With a safety factor of 2: 20,000 ÷ (2,500 × 2) = 4 MGC contracts. If the margin per MGC were $1,000, those four contracts would tie up $4,000. That leaves room to absorb a margin increase without forced selling.
This is the practical reason MGC exists for many traders. It lets you trade gold rules in steps one tenth the size of GC, so your position can match the drawdown you can accept.
What are gold futures trading hours, and how do they affect your bars?
Gold futures trade on CME Globex almost 24 hours a day, from Sunday evening to Friday afternoon US Eastern time, with a 60-minute break every day. Your bar data and session settings must follow that schedule.
The session runs from 6:00 p.m. to 5:00 p.m. Eastern time (ET). The daily break is from 5:00 p.m. to 6:00 p.m. ET. The week opens on Sunday at 6:00 p.m. ET and closes on Friday at 5:00 p.m. ET. Trading that starts at 6:00 p.m. belongs to the next day's session. A Sunday evening open is therefore part of Monday's trading day.
| Event | US Eastern time | Taiwan time, US summer time | Taiwan time, US winter time |
|---|---|---|---|
| Daily break starts | 5:00 p.m. | 5:00 a.m. | 6:00 a.m. |
| Session reopens | 6:00 p.m. | 6:00 a.m. | 7:00 a.m. |
Taiwan does not change its clocks, but the US does. If your data is stamped in local time, the break moves by one hour twice a year. Bars built on fixed local hours then shift against the exchange session. Store and test data in exchange time, or check that your software handles the change. The futures market hours tool shows the CME Globex session and its daily break in your own time zone, so you can see where that one-hour shift lands against your bars.
Three effects of the session show up in backtests:
- Daily bars end at 5:00 p.m. ET. If your data vendor cuts daily bars at midnight, the open, high, low and close differ from exchange daily bars, and so do signals based on them.
- Liquidity is uneven. Activity is usually thinner in the hours after the daily reopen and heavier during European and US morning hours. US data such as the monthly employment report, released at 8:30 a.m. ET, can move gold sharply within one bar.
- Holidays shorten sessions. US holidays can bring early closes or skipped days. These produce short bars that can trigger time-based rules in odd ways.
Decide whether the strategy trades the full session or only part of it, and filter entries by time to match. The trade-offs are the same as in the guide to night sessions in futures backtests.
How do you handle rolls between contract months?
Use a continuous series that rolls before first notice day, and choose its adjustment method on purpose. The price gap at each roll can otherwise create profits and losses that never happened.
A roll is the switch from an expiring contract month to a later one. A continuous contract is a single price series built by joining successive contract months at their roll dates. Gold lists many months, but trading activity concentrates in February, April, June, August, October and December. Most continuous series follow those months.
GC is a physically delivered contract. First notice day is the first day the exchange can assign delivery to holders of long positions. It falls before the contract month begins. Traders who do not want delivery roll before that date, so a realistic continuous series rolls a few days ahead of it.
The later contract usually trades at a different price from the expiring one, often higher, because the price reflects interest and storage costs. Joining two contracts without adjustment leaves a jump at every roll. A strategy can read that jump as a breakout.
| Method | What it does | Effect on a backtest |
|---|---|---|
| Unadjusted | Joins contracts at their real prices | Real price levels, but false jumps at each roll |
| Back-adjusted (difference) | Shifts older prices by each roll gap | Moves measured in ticks are correct; old price levels no longer match history |
| Ratio-adjusted | Scales older prices by each roll ratio | Percentage moves are correct; dollar moves per tick are distorted |
For rules that work with ticks and dollar profit and loss, difference back adjustment is the usual choice. For rules that use percentage changes, ratio adjustment fits better. In live trading, every roll of an open position is an extra exit and entry. A position held across many rolls pays that cost each time, so count it.
How much cost and slippage should a gold backtest include?
Include commission, exchange fees and at least one tick of slippage per side on every trade. Then check that the average trade before costs is several times the round-trip cost.
Slippage is the gap between the fill a backtest assumes and the fill you actually receive. On GC, one tick of slippage per side costs $20 per round trip. On MGC it costs $2. Fees do not shrink by the same factor of ten, so read your broker's fee schedule for each contract instead of dividing GC costs by ten.
Hypothetical example
A strategy averages $40 per trade before costs on GC. Commission and fees are $5 per round trip, and slippage is one tick per side, $20. The round trip costs $25, which leaves $15. On MGC the same rules average $4 before costs. With $2 in fees and $2 in slippage, nothing is left. The rules are identical, but the cost share on the micro contract is much larger.
Run the test a second time with double slippage. If the result collapses, the strategy depends on fills you may not get, especially around the 8:30 a.m. ET data releases. Also make orders fill on the next bar after the signal, not on the close of the signal bar. The full method is in the guide to trading costs in backtests. In AlphaPrime (Valynox), GPU backtesting covers fees and slippage, next-bar execution and trading sessions, so costs are part of the search from the first run.
In what order should you set up a gold futures backtest?
Set the contract and data first and the strategy last, because every later number depends on the earlier settings.
- Choose GC or MGC and enter the matching point value: 100 for GC, 10 for MGC.
- Load a continuous series that rolls before first notice day, with an adjustment method that suits your rules.
- Set the session from 6:00 p.m. to 5:00 p.m. ET and confirm the time zone of your data.
- Add commission, fees and at least one tick of slippage per side. Use next-bar execution.
- Run the backtest and read the maximum drawdown per contract.
- Size positions from that drawdown with a safety factor, then compare the result with current margin.
- Repeat the test with double slippage and on data the strategy has not seen.
What this means if you use AlphaPrime: set the trading sessions, fees and slippage in GPU backtesting before you search, and check that your gold bar data matches the contract you trade, so every candidate is ranked on numbers you could actually trade. Then use strategy validation to test the finalists on data they were not built on.
Frequently asked questions
What are the trading hours for gold futures?
COMEX gold futures trade on CME Globex from Sunday 6:00 p.m. to Friday 5:00 p.m. US Eastern time. A 60-minute break runs from 5:00 p.m. to 6:00 p.m. ET each day. In Taiwan, that break starts at 5:00 a.m. during US summer time and at 6:00 a.m. during US winter time.
How much margin do gold futures require?
CME Clearing sets the exchange minimum for GC and MGC and changes it when volatility changes. Brokers may require more. Check the current figure with CME Group or your broker on the day you trade, and size positions from backtest drawdown rather than from margin.
What is the difference between GC and MGC gold futures?
GC covers 100 troy ounces, and MGC covers 10 troy ounces. Both move in ticks of $0.10 per ounce, so one tick is worth $10 on GC and $1 on MGC. Strategy rules carry over between them unchanged, but costs take a larger share of each trade on MGC.
Which months do traders roll gold futures into?
Trading activity concentrates in the February, April, June, August, October and December contracts. Traders who do not want delivery move to the next of these months before first notice day, which falls before the contract month begins.
Is New York gold futures the same as COMEX gold?
Usually, yes. "New York gold futures" normally refers to the GC contract on COMEX, the metals exchange of CME Group. Its micro version is MGC.

