Member-only story
When the Fed Moves, Gold Follows: I Built a Trading Bot from a 2025 Academic Finance Paper
Javier Santiago Gastón de Iriarte Cabrera26 min read·1 hour ago--
A step-by-step breakdown of turning peer-reviewed interest rate math into a working MetaTrader 5 Expert Advisor
Estimated read time: 15 minutes | Quant finance · Algorithmic trading · Interest rates
The Federal Reserve raised rates 11 times between March 2022 and July 2023. In that same window, gold dropped from $2,050 to $1,620 — and then, as the hiking cycle paused and rate-cut expectations built, it surged to all-time highs above $2,700.
This is not a coincidence. Interest rates and gold are structurally linked. The question is whether that link is predictable enough to trade systematically.
In March 2026, Teemu Pennanen and Waleed Taoum from King’s College London published Statistical Modeling of SOFR Term Structure in Applied Mathematical Finance. The paper builds a rigorous probabilistic model of how interest rates evolve — one driven explicitly by macroeconomic forces like inflation and GDP growth. It was designed for pricing interest rate derivatives, but its architecture maps almost perfectly onto a macro trading signal for XAUUSD.
This article documents the full journey: from the academic model to a working Expert Advisor for MetaTrader 5, including every code snippet, every design decision, and an honest assessment of where it stands.