Studio notes
Your Trading Bot on Fed Decision Night: Build an Event Mode Before December 9
The Fed statement lands Dec 9 at 19:00 UTC. Prepare your bot: time-zone-safe event calendar, slippage-aware sizing, pre-news freeze and spread-based cooldown.
The next Federal Reserve statement comes out at 2:00 p.m. New York time on Wednesday, December 9, 2026. Eight days later, on Thursday, December 17, it is the European Central Bank's turn. If you run a bot on EURUSD, gold, or any pair with a dollar or euro leg, the bot itself needs to know about these two dates, not just you.
This article does not try to guess whether the Fed will hike. Trading that guess is a different job. The point here is narrower and, I think, more useful: a bot built for ordinary days meets a different market in the minutes around a rate decision. Spreads widen, stops fill somewhere you did not plan for, and sometimes a one-hour mistake in the calendar quietly disables the whole safeguard. The fix is an "event mode": a short set of explicit rules the bot enters and leaves on its own, driven by the official calendar and by live market conditions.
Why this December deserves attention
At its September 16, 2026 meeting the Fed raised the target range for the federal funds rate by a quarter point to 3¾–4 percent. On October 28 it held, but the vote was 10–2, and both dissenters preferred another quarter-point hike that day. The statement says inflation "remains elevated." The December 8–9 meeting is also one that comes with a Summary of Economic Projections (SEP), so markets get the decision and the participants' projections on the same afternoon.
The euro side is not quiet either. On October 29 the ECB kept its three key rates unchanged, leaving the deposit facility rate at 2.50%. Its statement pointed to rising energy prices and upside risks to inflation, and said the Governing Council is not pre-committing to a particular rate path. The next meeting is December 16–17.
For a bot owner, the takeaway is that both events are genuinely open. When the market is not sure in advance, the reaction at the moment of release is not predictable either, and that is exactly where ordinary backtest assumptions break.
A rate decision is a sequence of events, not one timestamp
The tempting shortcut is a single calendar line: "FOMC, 2 p.m." In practice there are several separate events:
- The statement, released at 2:00 p.m. Eastern. At SEP meetings the projection materials come out the same day.
- The Chair's press conference, after the statement. The Q&A can move markets as much as the statement. In October, Chairman Warsh said the information arriving "over the coming period" would help the Committee determine where policy should be. That is the kind of sentence markets weigh in the minutes after the release.
- The minutes, which the Fed says are released three weeks after the decision. October's came out on November 18.
- The blackout period. Under the FOMC's external communications policy, participants stop public comment on monetary policy from 12:00 a.m. Eastern on the second Saturday before a meeting until 11:59 p.m. Eastern on the day after it. For this meeting that is November 28 through December 10.
I mention the blackout because it shows an event calendar is more than "danger time." During those days policymakers' comments on policy stop and the news load concentrates on decision day itself. If your bot also reacts to headlines, it should know that.
The ECB follows the same pattern. Its press-conference page says the conference can be watched live at 14:45 CET, and the bank's own schedule announcements put the decision release at 14:15. Two separate moments, half an hour apart: first the numbers, then the explanation and questions.
Take the time from a time zone, not from a fixed offset
This looks trivial, but the failure is silent: the bot's logic is right and only its clock is off by an hour. Nothing gives it away until event night.
US daylight saving time ended on November 1. The October 28 statement went out at 18:00 UTC. The December 9 statement, at the same "2 p.m.", is 19:00 UTC. If someone computed the offset once in the autumn and hard-coded it, the bot's protective window in December closes an hour early, exactly when it matters most. Europe changes clocks on different dates from the US, and the gap between the two shifts for a few weeks each year.
The second layer is the broker's server clock. The MQL5 documentation states plainly that all MetaTrader 5 economic-calendar functions use trade server time (TimeTradeServer), not the user's local time, and the broker chooses the server's time zone. So you have three clocks: the issuer's (New York or Frankfurt), the server's, and your own. The simple rule that fixes this: store the official time with the issuer's time zone, convert everything to UTC, and convert back to local time only for display.
I wrote and ran a small Python example of this. The core is:
NY = ZoneInfo("America/New_York")
FRANKFURT = ZoneInfo("Europe/Berlin")
EVENTS = [
Event("FOMC statement (Dec 2026, with SEP)",
datetime(2026, 12, 9, 14, 0, tzinfo=NY),
timedelta(minutes=60), timedelta(minutes=90), ("USD",)),
Event("ECB monetary policy decision",
datetime(2026, 12, 17, 14, 15, tzinfo=FRANKFURT),
timedelta(minutes=60), timedelta(minutes=30), ("EUR",)),
Event("ECB press conference",
datetime(2026, 12, 17, 14, 45, tzinfo=FRANKFURT),
timedelta(minutes=0), timedelta(minutes=60), ("EUR",)),
]
Running it gives the figures above: October's statement at 18:00 UTC, December's at 19:00 UTC, and the ECB decision at 13:15 UTC. A unit test sits next to it so that anyone who later "fixes" these times by hand gets a failing build.
One more reason not to guess calendar facts in code: at the October press conference the Fed announced that in 2027 one of its eight meetings will focus only on monetary policy strategy, with neither a rate vote nor a statement anticipated. On the official 2027 calendar, October 26–27 carries that label. A bot that assumes "every meeting means a statement" will pause trading next year for an announcement that never comes. It is a cheap mistake, but it shows that calendar assumptions should come from the source, not from habit.
A stop is not a guaranteed price
The SEC's investor bulletin is explicit: the stop price is not a guaranteed execution price. Once it is reached, the stop becomes a market order, and the fill can deviate significantly from the stop because of the liquidity available at that moment. The bulletin is written for stocks, but the logic carries over to forex and CFDs. OANDA's help page says volatility and changes in liquidity can cause large spread increases following news announcements, that prices can gap, and that because take-profit and stop-loss orders trigger on bid and ask prices, a wider spread alone can trigger them.
Let's turn that into numbers. A $10,000 account, 1% risk per trade ($100), a 20-pip stop on EURUSD, and $10 per pip for one standard lot. Assuming a normal 1-pip spread, the size comes out at 0.47 lots. Now run that same size through a few scenarios (the slippage and spread figures are assumptions, not market statistics):
| Slippage on the stop fill | Spread | Computed loss | Share of equity |
|---|---|---|---|
| none | 1 pip | $98.70 | 0.99% |
| 5 pips | 3 pips | $131.60 | 1.32% |
| 15 pips | 5 pips | $188.00 | 1.88% |
| 30 pips | 8 pips | $272.60 | 2.73% |
In these hypothetical cases "1% risk" turns into nearly 2%, even close to 3%, and a bigger gap than this is possible. If the bot intends to hold a position through the event, it should size on the stressed loss, not the nominal one:
def lots_for_budget(budget, stop_pips, slippage_pips, spread_pips, pip_value_per_lot, step=0.01):
raw = budget / ((stop_pips + slippage_pips + spread_pips) * pip_value_per_lot)
return int(raw / step) * step # round down to the broker's volume step
Assuming 15 pips of slippage and a 5-pip spread, size drops to 0.25 lots and the stressed loss stays at $100. Where should the slippage figure come from? Not from a blog, this one included. It should come from your own execution logs from past events. If you do not have those logs, building them is step one; more on that below. The basic sizing logic is covered in detail in "Risk Management and Position Sizing: Know What You Can Lose Before You Enter a Trade" on this site; here slippage and spread are simply added to the denominator.
A stop-limit order is not a complete answer either. The same SEC bulletin notes that it controls price but may not execute at all if the market moves past your limit. On rate-decision night, not executing means staying in a position you meant to close. You have to choose between those two risks deliberately.
Designing event mode: four states, explicit rules
The event mode I suggest has four states and is evaluated per symbol: a dollar event should not freeze an EURJPY bot the way it freezes EURUSD, but a euro event should.
- Normal: the strategy runs as usual.
- Pre-event: for example, from one hour before. No new entries, pending orders cancelled, open positions only managed. A pending order triggered through a gap at the moment of release is one of the worst ways to enter.
- Frozen: from the release until the end of a window you define. For the Fed, make the window cover the press conference too.
- Cooldown: the timed window is over, but the spread has not returned to normal. No new entries until it drops below the threshold.
Cooldown is the state simple designs leave out. A fixed window assumes the market calms down on schedule; the market never promised that. The exit condition should combine time with actual market state:
def mode_at(t_utc, pair, spread_pts, normal_spread_pts, events=EVENTS, spread_mult_ok=1.5):
relevant = [e for e in events if any(c in pair for c in e.currencies)]
for e in relevant:
if e.utc - e.pre <= t_utc < e.utc:
return "PRE_EVENT"
if e.utc <= t_utc < e.utc + e.post:
return "FROZEN"
for e in relevant:
if e.utc + e.post <= t_utc < e.utc + e.post + timedelta(hours=4):
if spread_pts > spread_mult_ok * normal_spread_pts:
return "COOLDOWN"
return "NORMAL"
In the sample run, with a normal spread of 10 points, the bot moves to pre-event one hour before the statement, stays frozen from the release until 90 minutes after, remains in cooldown at minute 95 because the spread is still 25 points, and returns to normal at minute 120 with the spread at 14 points. The spreads in this example are made up; build the real threshold from your own broker's data.
A few decisions should be made in advance and in writing, not in the moment:
- Do you hold open positions through the event, cut them, or close them? All three are legitimate, as long as the choice is made beforehand and the backtest simulates the same behaviour.
- Do you touch stop distances while frozen? Tightening a stop right before the release, with a wide spread, may simply let the spread take you out.
- If the broker or data connection drops, what does the bot default to? The safer default is frozen, not carrying on with the last known data.
Execution notes for MetaTrader 5
If your bot is an Expert Advisor, three points from the official MQL5 documentation bear directly on this.
First, MetaTrader's built-in economic calendar is available through functions such as CalendarValueHistory and is a good tool for building event windows, as long as you remember its times are in trade server time. I would still cross-check the key events against the central bank's own calendar and log any mismatch; a bot should not rely on a single data source.
Second, the deviation field in MqlTradeRequest, the maximum allowed deviation from the requested price, in points. According to the same documentation it is among the required fields for Instant Execution, but it is not in the list of required fields for Market Execution. If your symbol uses market execution, having set deviation in your code is not proof that you are protected from slippage. Read the symbol's execution mode in code and ask your broker how it behaves.
Third, after every fill, compare the actual fill price with the requested price and log it. It is the simplest and most valuable data you can have for tuning event mode.
Backtests and logs: if you don't record it, you can't tune it
Event mode has to be applied in the backtest too. If you skip rate-decision nights live but not in the backtest, you are comparing two different strategies. The reverse is just as dangerous: if a fixed-spread backtest shows profit on those nights, it is probably showing profit that spreads and slippage would have erased in reality. "The Deceptive Backtest: Why a Trading Bot That Wins on History Loses in Live Markets" on this site goes deeper into how backtests mislead.
For logging, record at least the following from a few hours before to a few hours after each event: UTC timestamp, best bid and ask, spread, and for every order the requested price, filled price and latency. After two or three events you will have the actual distribution of spreads and slippage on your own account instead of a guess, and the cooldown threshold and the slippage assumption in the sizing formula can come straight from that data. If you summarise this data automatically, "AI-Written Daily Reports: Let Code Compute the Numbers and the Model Tell the Story" covers the reporting side of the same problem.
Before December 8
- Put the December 9 statement and the December 17 decision and press conference into the bot's calendar with the issuer's time zone, and test the conversion to your local time and server time automatically.
- Map which events apply to which symbol.
- Decide in writing how open positions are handled through the event, and size on stressed loss.
- Implement cooldown based on the live spread, not just the clock.
- Turn on spread and fill-price logging this week so December's data is not lost.
- Apply the same rules in the backtest.
The code snippets here come from a fuller example that was run together with its tests. The slippage and spread figures in it are assumptions and do not replace your own account data. None of this is advice to buy or sell; the aim is that on the night the market changes its rules, your bot follows yours.
Sources
- FOMC meeting calendars, Federal Reserve
- FOMC statement, October 28, 2026 and September 16, 2026
- Transcript of the Chair's press conference, October 28, 2026 (PDF)
- FOMC Policy on External Communications of Committee Participants (PDF)
- ECB monetary policy decisions, October 29, 2026 and Governing Council meeting calendar
- ECB press conference page and the ECB's own note on the 14:15 and 14:45 times
- SEC Investor Bulletin: Stop, Stop-Limit, and Trailing Stop Orders
- OANDA: Impact of market conditions on spreads
- MQL5 documentation: economic calendar functions and MqlTradeRequest
Comments
No comments yet. Be the first to write one.