Feeding market news to your AI agent

Part 2 of 5 in Trade with AI agent

Contents

⚠️ Everything here runs on a demo account. This is engineering content, not financial advice. Trading CFDs is high-risk. Most retail accounts lose money. An agent reading the news does not change that. Read the disclaimer before you do anything with real funds.

🚀 Just here to build? Skip straight to the build →

Part 2 of 5 in the Trade with AI agent series.

The number with no story

It’s currently 10:31pm. Within the last 2 minutes, Gold is dropping like a brick by 80 dollars. Your agent, the one you connected with MetaTrader 5 in Part 1, can see the bid price going down and read your position loss to the cent. Ask it why, and it has nothing, or even worse, it will hallucinate an answer. But as a human you know that a news headline crossed ninety seconds ago that explains the move, but your agent never saw it. It can act on price, but it is blind to the thing that is impacting that price.

That is what we want to address today. You provide the agent a watchlist for a few instruments, then ask what’s moving, and it will utilise a new local skill that pulls important market update headlines, and filters out everything else that’s not related to your watchlist, and hands back a short, ranked briefing: which symbols are affected, which direction, how hard, over what horizon, and why. Sight, not action. You can then ask your agent to correlate this ranked news with price changes from your watchlist so that you can analyse for a trading opportunity or a heads up to exit a position early.

The difficult task is not collecting news; anyone can point an agent at an RSS feed or ask your agent to browse the news out there. There is effectively infinite financial news and updates out there, but for any trader 99% of it is irrelevant: a Tesla earnings beat means nothing if you trade EURUSD, gold, or the German index. This is what we’re going to build today: a news aggregator skill for your agent that matches your watchlist.

Use whichever agent you already run; Hermes is the worked example and maps cleanly to OpenClaw, Codex, or Claude Code. The news-impact skill we build today is highlighted.

The one new piece, which we build over the course of this post:

  • news-impact: a small, portable skill, a SKILL.md plus a scripts/ folder holding the Python ranker (rank.py) and source adapters. We’ve built it with the help of a coding agent: finished code lives on GitHub so you can grab it whole, fork it, or improve it. It follows the open agentskills.io SKILL.md layout over a plain Python CLI, so it installs into any of those agents and runs standalone from a shell or cron. It needs no MetaTrader 5 and no Part 1 server; its only inputs are a watchlist and free news feeds.

Why a skill and not an MCP server like Part 1? Nothing here crosses a boundary that needs governing or policy. MT5 trading utilises an MCP server for: real orders, an approval gate, notional caps, and remove VPS setup ability (if required). News ranking does not need all of those, it runs on the same box, touches no money, and mutates nothing. The interaction is simply running a script and reading its content, so a SKILL.md over a local Python CLI is a better fit and more lightweight.

Free first, paid when you mean it

The current skill only ships one source, Yahoo Finance — free, no key, and enough to be useful. Yahoo publishes per-symbol RSS feeds with decent coverage of indices, commodities like gold and oil, and broad macro; pure FX-pair coverage is thinner, so treat it as a baseline, not a complete picture. The one challenge that we have is symbol mapping, canonical EURUSD is Yahoo’s EURUSD=X, gold is GC=F, the S&P is ^GSPC — which the adapter hides so the rest of the system speaks plain instrument symbols.

There are of course better and more reliable news sources out there like: Finnhub, ForexNewsAPI, AlphaVantage, MarketAux. Several even already have market sentiments for you, which lets the ranker spend its budget on impact rather than re-deriving mood. You can check each provider’s free-tier terms first. We will look into the premium news offerings at the end of the series to demo what a fully kitted up agent is capable of.

From firehose to a briefing

The ranker script, rank.py, is where a stream of headlines becomes a short, scored briefing about your pairs. It runs in two stages, cheap then smart, and that ordering is the whole cost-control story.

Stage one: a cheap pre-filter. Before spending a single LLM token, a plain keyword and entity match runs against the watchlist and a small alias map (Lagarde/ECB/euro → EUR, Powell/Fed/CPI → USD, bullion → gold). Anything that does not plausibly touch your watchlist never reaches the model on a normal day, most of the stream, discarded for the cost of string matching.

Stage two: a lightweight LLM ranks what survives. Each surviving item goes to a small, cheap LLM model — any cheap hosted one like DeepSeek or Haiku, or a local 7–8B model through Ollama to pay nothing and stay private — with the headline, its summary, and your watchlist, and the model returns structured output only. Its instruction, trimmed:

You are an impact-ranking function, not a news writer.
Given one news item and a trader's watchlist, decide which symbols it
plausibly affects, the likely direction, severity, horizon, and confidence.

Rules:
- Reason only from the text. Never invent prices, figures, or events.
- If it affects no watchlist symbol, return an empty impacts array.
- Prefer neutral direction and low confidence when unsure.
- Output JSON only, matching the schema. No prose.

The CLI prints a briefings array, one entry per surviving story:

json
{
  "headline": "US CPI comes in above forecast at 3.4% y/y",
  "source": "yahoo",
  "published": "2026-06-19T12:30:00+00:00",
  "impacts": [
    {
      "symbol": "XAUUSD",
      "direction": "bearish",
      "severity": "high",
      "horizon": "intraday",
      "confidence": 0.72,
      "why": "Hotter inflation pushes back rate-cut expectations, a headwind for gold."
    }
  ],
  "grounding": "Based only on the provided headline and summary."
}

Two things to make this honest and cheap. The pre-filter plus a content-hash cache mean the model sees only a fraction of the stream and pays for each story once, even when it arrives from three sources. And the ranker is told, firmly, to reason only from the text and never invent a number or event, a confident-sounding hallucination is far more dangerous here than an honest “not sure”. Now, unfortunately, there is no sure way to remove hallucinations, so always review the news ranker result.

Wiring it into your agent

I’ve created the implementation of the skill based on the idea above so rather than paste it together by hand, especially if you want to just quickly try it, simply hand the agent the finished repo and let it set itself up, similar to the first article. It ships an AGENTS.md with deterministic installation and verification instructions. I’ll use Hermes for the following demo but the same skill loads into OpenClaw, Codex, or Claude Code.

🎬 The payoff, end to end — about 45 seconds: Part 1 gave the agent hands; here it gets eyes. You tell Hermes your book in plain English — “set my news watchlist to EURUSD, XAUUSD, GBPUSD” — and it writes config.yaml for you. Then you just ask “what’s moving on my watchlist?”; the agent shells out to the skill’s CLI and reads back a ranked, watchlist-scoped briefing — per affected symbol the direction, severity, horizon, and a one-line why, grounded only in the headline text. Advisory only: it reads and reports, it never trades.

Hermes sets a EURUSD/XAUUSD/GBPUSD news watchlist from a plain-English request, then runs the news-impact skill and reads back a ranked briefing of what is moving each pair — advisory only, no trades

📝 One new prerequisite versus Part 1: the ranker needs a model. The default is any cheap hosted model that takes a single API key; point it at a local Ollama model instead to pay nothing and stay private. Yahoo needs no keys; paid adapters take their own only if you enable them.

1. Have the agent install the skill. Point it at the repo and tell it to follow AGENTS.md:

Clone https://github.com/vincentwongso/news-impact-skill, read its AGENTS.md, and
follow the install steps.  Report what the verify steps printed. Do NOT fetch any news yet.

It installs the package, confirms --help lists the expected flags, and runs the offline test suite green, all with no API key and no network. That is your “wired up” moment, before a single headline is fetched.

2. Set your watchlist. It is your pairs watchlist, similar to the watchlist in your MT5 platform, tell the agent:

Add EURUSD, XAUUSD, and GBPUSD to my news-impact watchlist. Use canonical
instrument symbols with no broker suffix. Set lookback to 4 hours and minimum
severity to medium.

The agent edits config.yaml (copied from config.example.yaml on first run, read on every run) to match. Canonical symbols, no broker suffix matters because news is about the instrument, not your broker’s ticker. The result it writes looks like this:

yaml
watchlist:
  - EURUSD
  - XAUUSD
  - GBPUSD

model: your-cheap-model    # any hosted model, or ollama:llama3.1:8b to run local + free
lookback_hours: 4
min_severity: medium

Then export the API key for your chosen model, or nothing at all if you went with Ollama. If you’re not familiar with this step, ask your agent to guide you.

3. Ask what is moving. Now just ask in plain English; the agent runs the skill’s CLI under the hood and narrates the JSON:

Give me a briefing on anything that has moved my watchlist in the last 4 hours.
Only show me items rated medium severity or higher. For each one: the symbol,
direction, how hard, the time horizon, and the one-line reason. Keep it tight.

Observe the results, it should only return with news that’s relevant to your watchlist.

Better still, put it on a schedule. A one-off question is useful, but the real payoff is a periodic watch: a periodic market update scoped to your pairs, that only speaks up when something actually moved. Ask for exactly that:

Every 4 hours, run that same briefing over my watchlist. If anything rates
medium severity or higher, message me with the tight version. If nothing moved
my pairs, stay silent.

Now you’re not asking anymore; the agent is watching for you. This beats manually checking multiple news source websites.

🔗 Optional: chain it with Part 1. Because Part 1 is still wired in, you can combine the two: “Gold just got a bearish headline, analyse my EURUSD and XAUUSD positions and live quotes.” The agent runs the news skill and the MT5 tools in one turn for the full picture.

What comes next

Your agent transitions from blind to seeing. It can now tell you not just that gold price dropped but a credible why, based on your watchlist pairs, the tedious job of scanning a dozen market news sources for the signal just moved off your plate. That is the second capability: hands from Part 1, eyes from today.

Now that being said, I want to temper the expectation a bit with this demo, since we’re only using free news sources for this demo, the result won’t be as good as paid news source providers. By the end of this series I will share the performance of the agent that is equipped with good news source, strict risk management rule, and reliable day trading strategy that has edge.

Try it tonight

Set a watchlist of three pairs you actually trade, ask your agent what moved them today, and ask it to analyse the move.

Disclaimer

This is educational and experimental engineering content, not financial advice. Everything shown runs on a demo account. CFDs are complex, leveraged instruments and the large majority of retail accounts lose money. An AI agent that can read the news does not change that. It can misjudge impact, act on noise, surface a headline that is already priced in, or be handed something that is simply false. Run it locally, understand how it works, keep it advisory, and never point it at real capital you cannot afford to lose.

Full disclosure: the author works at Fintrix Markets, a CFD broker, and the demo account used throughout this series is a Fintrix Markets demo account. Nothing here depends on it. The entire setup is broker-agnostic and works on any CFD broker that supports the MetaTrader 5 platform. This is an experimental side project, not a Fintrix Markets product.