This commit is contained in:
Andras Schmelczer 2026-06-06 21:03:26 +01:00
parent fcb0e25ebd
commit 3441a7e4af
108 changed files with 641 additions and 869 deletions

View file

@ -0,0 +1,34 @@
---
title: Predicting EUR/USD With Hanning Windows
description: A weekend frequency-domain experiment that did a passable job on EUR/USD. I would not have trusted it with my money, and I didn't.
date: 2026-05-03
period: 'Autumn 2019'
thumbnail:
src: ./_assets/forex.jpg
alt: Chart comparing predicted and actual EUR/USD exchange rates.
article:
tags: ['systems', 'tools']
role: Experiment author
stack: ['Python', 'NumPy', 'SciPy', 'Flask', 'MQL4']
outcome: A prediction server, an MQL4 trading client, and a clearer view of how far my edge wasn't
audience: technical
project:
title: Foreign Exchange Prediction Experiment
description: A Hanning-windowed STFT experiment on EUR/USD. Passable backtest, sober conclusions, no real money risked.
thumbnail:
alt: Chart from a foreign exchange prediction experiment.
---
In the autumn of 2019 I was an undergrad with a few weekends free and the quiet conviction that I could find a small edge on EUR/USD. The screenshots were flattering: the prediction (blue) hugged the actual rate (green) in a way that looked like skill. A linear regression in the frequency domain, dressed up. I did not trade real money with it, and that restraint is the only thing about the project that aged well.
The pipeline:
- Smooth the input series.
- Differentiate.
- Short-time Fourier transform with overlapped, Hanning-windowed frames.
- Extrapolate the frequency-domain coefficients.
- Invert everything back to a predicted price series.
A Python server (NumPy, SciPy, Flask) ran the model. An MQL4 client on a broker terminal called the server and would have placed trades if I'd dared.
What I actually learned: even a naive model can show a sometimes-profitable backtest, and that's the trap. The real game is built by people with co-located servers, microsecond ticks, and millions in infrastructure. This project taught me how far my edge wasn't.