After reading many success and failure stories about vibe coding, I decided to try it myself. Though vibe coding doesn’t have a strict definition, vibe coding may refer to programming with AI tools. It is the type of coding where AI does the heavy lifting for building a program. You don’t program what you want by hand; instead, you prompt an AI tool and it gives you an answer, i.e., the code.
Typically, it takes me several days to code a trading strategy, to backtest and optimize it. So, I thought what if there’s a way to increase my efficiency? What if AI can do this much faster and more reliably than me?
The trading strategy I vibe coded is described in this article. Authors of the paper “Foreign Exchange Fixings and Returns Around the Clock” looked at intraday FX data of major currencies and found a pattern in currency returns. The hypothesis is that USD tends to appreciate before FX fixings and to depreciate following them.
A FX fix is a predefined time of day when bids and offers for currencies are aggregated and a reference price is published. The most popular fixes are the London, ECB, and Tokyo fixes. Below you can see the fixes in ET (Eastern Time) time.
The first major of fix of the day happens in Tokyo at 20:55 ET or 19:55 ET if Daylight Saving Time is in effect in the US. The next one comes from the continental Europe — ECB fix at 8:15 ET. And the last important FX fix occurs in London at 11:00 ET.
Why does the US dollar tend to appreciate in the run-up to fixes? Although there can be many reasons contributing to this intraday seasonality, the most important one is a structural demand for USD ahead of the fix. USD is accumulated before the fix and is sold to clients at a higher price at the fix.
Our strategy is simple – short EURUSD 15 minutes before Tokyo fix, close the short position at fix time and immediately go long EURUSD at that time, 20:55. Close the long 15 minutes later at 21:10. The same applies to other two fix times. Short EURUSD before ECB fix, close the position at fix time, long the pair at London fix time, and close the long at 11:15.
Code
I used Claude 3.7 Sonnet. I find it much better than Chatgpt or other AI models in programming tasks.
This is the code which AI produced:
Keep reading with a 7-day free trial
Subscribe to Actionable Trading Strategies to keep reading this post and get 7 days of free access to the full post archives.