Update content & design (#75)
All checks were successful
Deploy to Pages / build (push) Successful in 2m58s
All checks were successful
Deploy to Pages / build (push) Successful in 2m58s
Reviewed-on: https://home.schmelczer.dev/git/git/andras/schmelczer-dev/pulls/75
This commit is contained in:
parent
0be50b6c24
commit
b554e92e9f
83 changed files with 2995 additions and 723 deletions
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: A Frequency-Domain Foreign Exchange Prediction Experiment
|
||||
description: An older EUR/USD prediction experiment built from smoothing, short-time Fourier transforms, extrapolation, and a Python prediction server.
|
||||
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
|
||||
projectPeriod: 'Autumn 2019'
|
||||
thumbnail:
|
||||
|
|
@ -9,15 +9,21 @@ thumbnail:
|
|||
tags: ['systems', 'tools']
|
||||
role: Experiment author
|
||||
stack: ['Python', 'NumPy', 'SciPy', 'Flask', 'MQL4']
|
||||
outcome: A working prediction server connected to an MQL4 client for trading experiments
|
||||
outcome: A prediction server, an MQL4 trading client, and a clearer view of how far my edge wasn't
|
||||
audience: technical
|
||||
links: []
|
||||
---
|
||||
|
||||
This was an experiment in predicting EUR/USD rates. The animation from the old portfolio showed the implementation doing a passable job: the prediction was the blue graph and the actual values were the green one. I would not have trusted it with my money.
|
||||
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 algorithm was a fancy linear regression in the frequency domain. The steps were: smoothing the input values, differentiating, applying a short-time Fourier transformation with overlapped and Hanning-windowed windows, extrapolating, and then applying the inverse of these transformations to the resulting values.
|
||||
The pipeline:
|
||||
|
||||
The prediction server was written in Python using NumPy, SciPy, and Flask. It communicated with an MQL4 client that was responsible for handling financial transactions based on the generated data.
|
||||
- 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.
|
||||
|
||||
There was still plenty of room for improvement, but even with this simple algorithm, a sometimes profitable strategy was viable. The project was mostly a look into trading algorithms, their complexity, and the competition around them.
|
||||
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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue