Forum Sign in Register

News and Event Filters for Trading Robots: When Your EA Should Stand Aside

Started by Support 2 weeks ago · 0 replies RSS

News and Event Filters for Trading Robots: When Your EA Should Stand Aside

A trading robot is only as smart as the situations it refuses to trade. Most automated strategies are built and optimized on clean historical bars, where a major economic release looks like just another candle. Live, that same release is a different animal: spreads blow out, liquidity vanishes for a few seconds, fills slip, and price can gap straight through your stop. A robot that keeps firing entries blind to the calendar will eventually hand back weeks of profit in a single thirty-second window. A news filter is the rule that stops that from happening.

What a news filter actually is

A news filter is a guard clause in your robot: around scheduled high-impact events, it suppresses new entries and decides what to do with open positions. It is not a signal generator and it will not make you money on its own — it is risk management. Its job is to keep the strategy out of the few minutes each week where the assumptions behind your edge temporarily stop being true.

Two different risks it protects against

It helps to separate the two problems a news event creates, because they call for different defenses:
  • Execution risk. Spreads widen, slippage spikes, and stops fill far from their level. Even a correct directional call can lose money because you paid a terrible price to get in or out.
  • Regime risk. A mean-reversion robot that fades small moves is structurally wrong-footed by a sharp, one-directional repricing. The logic that prints money in quiet markets is exactly the logic that gets run over by a surprise.


Where the event data comes from

A filter needs a clean list of upcoming events with three fields at minimum: timestamp, affected currency or market, and impact level. That feed can come from your broker's economic calendar, a third-party calendar API, or a CSV you maintain yourself. Two details matter more than the source: map each event to the symbols it actually moves (a US CPI print is a USD event, so it bears on EUR/USD and gold, not on an AUD/NZD cross), and normalize every timestamp to a single clock — almost always your broker's server time.

Building the rule

A robust filter is usually three checks stacked together, not one:
  • Time window. Block new entries from N minutes before an event to M minutes after, for the affected symbols only. Typical windows are a few minutes either side; widen them for the very highest-impact releases.
  • Spread guard. Refuse to enter when the current spread is more than, say, two to three times its normal value. This is the backstop that also catches unscheduled news, which no calendar will warn you about.
  • Volatility guard. An ATR or recent-range check gives you a model-free way to stand aside when the market is moving abnormally fast, independent of any calendar at all.


What about trades that are already open?

Deciding the policy for open positions is the part people skip, and it matters. You have three honest choices, each with a trade-off: leave the trade alone with its normal stop (simplest, but exposed to slippage), tighten the stop before the event (reduces risk but invites a premature exit on noise), or flatten entirely ahead of the release (safest, but you pay spread to exit and may miss a continuation). Pick one deliberately and test it — do not leave it as an accident of however you happened to code it.

Testing the filter honestly

To know whether a news filter helps, you have to backtest it against tick data with realistic spreads and a historical list of event timestamps aligned to your bars. On idealized end-of-day data the filter looks pointless, because the disaster it prevents never appears in the sample. Two warnings: do not tune the window so tightly to past events that you are simply fitting history, and remember that one avoided blow-up in a backtest is an anecdote, not proof of robustness.

The bugs that bite

  • Timezone and DST drift. The calendar is in one timezone, your broker server in another, and daylight-saving shifts move the boundary twice a year. A one-hour error means your filter protects the wrong minute.
  • Over-filtering. Stack enough windows and your robot sits out so much of the session that whatever edge it had disappears.
  • Forgetting the unscheduled. Central-bank surprises and headlines do not appear on any calendar. That is why the spread and volatility guards are not optional extras.


Bottom line

A news filter will not improve a strategy that has no edge, and it is not a source of alpha. It is insurance: it keeps a working robot out of the handful of moments each week where execution and regime risk are at their worst. Build it from a properly mapped event feed plus spread and volatility backstops, decide your open-trade policy on purpose, and validate it on realistic data — then measure whether it genuinely improves your risk-adjusted return, not just your peace of mind.
clean by ai-agent

Sign in to reply.