FX European-Commodities Mean Reversion Strategy
FX European-Commodities Mean Reversion Strategy
FX European-Commodities Mean
Reversion Strategy
End-to-end process on how I developed a mean reversion
strategy, and thought process behind it
Setup
I was reading this book; Finding Alphas: A Quantitative Approach to Building Trading
Strategies and got an idea to explore mean reversion in FX. I already have a few
mean-reversion ish type of alphas in my overall FX strat, but it wouldn’t hurt to
explore a new one.
Subscribe
In plain English it means to go long assets which has posted negative 5 day returns,
and vice versa. Note: this is not the alpha that I used for the strategy below, but it is
influenced by the above.
Subscribe
https://www.quantymacro.com/fx-european-commodities-mean-reversion/ 1/14
2/18/24, 9:04 PM FX European-Commodities Mean Reversion Strategy
cephalopod
@macrocephalopod · Follow
14 Reply Share
Read 1 reply
I still remember when I first read that tweet, it made me rethink my approach to stat
arb. And hopefully this post will show that you can run a stat arb strategy without
any cointegration/ADF test(?)
Anyways, as usual practice I split the dataset to training set and test set. Training
set is 2000-2015 and test set is 2016-2022. I only give myself one attempt on the
test set; it means that any adjustment I want to make with regards to the strategy
has to be done using the training set.
https://www.quantymacro.com/fx-european-commodities-mean-reversion/ 2/14
2/18/24, 9:04 PM FX European-Commodities Mean Reversion Strategy
When the orange line is above the red dashed line (0), our alpha score is positive
means that we are long, and vice versa. As we can see that our alpha score seems
to move inversely with the price level, which is consistent with a mean reversion
behavior (buy the dip sell the rip).
Now let’s approximate the turnover. We can calculate the average days it take for
our position to flip signs.
https://www.quantymacro.com/fx-european-commodities-mean-reversion/ 3/14
2/18/24, 9:04 PM FX European-Commodities Mean Reversion Strategy
It looks like it takes around ~20 days for us to flip from long to short and vice versa,
that seems quite reasonable for mid-frequency mean reversion.
Our position will just be the alpha score divided by the rolling 1 month volatility.
Performance
Let’s look at the performance of the strategy.
https://www.quantymacro.com/fx-european-commodities-mean-reversion/ 4/14
2/18/24, 9:04 PM FX European-Commodities Mean Reversion Strategy
Sharpe = -0.288
https://www.quantymacro.com/fx-european-commodities-mean-reversion/ 5/14
2/18/24, 9:04 PM FX European-Commodities Mean Reversion Strategy
Sharpe = -0.399
Still not encouraging. I could just flip the sign and treat it as a momentum strategy
but I’m not gonna do that here. I still have some ideas to test for a mean reversion
strategy.
For this experiment I wanted to try Commodity vs European. Why you might ask? To
be honest it is purely a discretionary call. Long story short in the past I worked with
building an intraday mean-reversion FX using clustering/PCA techniques, and some
of the clusters can be interpreted as Commods and Euro. Rob Carver calls this
implicit fitting, and I pretty much agree with it. But it would be quite ridiculous to not
https://www.quantymacro.com/fx-european-commodities-mean-reversion/ 6/14
2/18/24, 9:04 PM FX European-Commodities Mean Reversion Strategy
utilise domain knowledge here; if not we might as well use random groupings of the
currencies.
Some might argue NOK should go into the commodity basket, again it is my
discretion here to put in the European basket. I mean people might argue whether it
is a commods currency or not but no one will argue whether Norway is in Europe or
not.
Updated Rule
Using the mean reversion alpha score for each individual currency above, I will
calculate the alpha score for each group taking the mean of the scores of its
members. And then I will take the difference of the group alpha scores to determine
which group will be longed/shorted. If alpha score of commods > euro, we go long
commods short euro (vol-weighting each member) and vice versa. Note: Also since
we have more european ccys than commods ccys, we need to remember to adjust
for that in the position size to make it pseudo-USD neutral.
Now let’s look at the performance. The portfolio performance is the thick black line.
https://www.quantymacro.com/fx-european-commodities-mean-reversion/ 7/14
2/18/24, 9:04 PM FX European-Commodities Mean Reversion Strategy
Sharpe: 0.48
Looks like we might be onto something here! All currencies seem to generate
positive returns, except for CAD. Some might argue CAD is kinda an outlier and
doesn’t really belong in the same basket as AUD and NZD. So let’s remove CAD from
the basket and see what happens.
https://www.quantymacro.com/fx-european-commodities-mean-reversion/ 8/14
2/18/24, 9:04 PM FX European-Commodities Mean Reversion Strategy
Sharpe = 0.538
That’s quite a significant improvement in Sharpe. Going forward I will not include
CAD in the commodity basket.
Thoughts on overfitting
Some might accuse me of overfitting since I made changes after seeing the
performance. To those my arguments would be: 1) The changes I made have
economical backing (to certain extent) that I'm personally comfortable with, 2) All
the changes are made in the training set, I have not touched the test set yet.
Final Performance
The moment of truth is finally here. I’ve finalized all my rules and instrument choices,
after this I don’t allow myself to make any changes anymore. Let’s look at the out-of-
sample performance of the strategy.
https://www.quantymacro.com/fx-european-commodities-mean-reversion/ 9/14
2/18/24, 9:04 PM FX European-Commodities Mean Reversion Strategy
Now let’s look at a very crude attribution method (Tilting vs Timing over 1y horizon,
stolen from the tweet below)
https://www.quantymacro.com/fx-european-commodities-mean-reversion/ 10/14
2/18/24, 9:04 PM FX European-Commodities Mean Reversion Strategy
cephalopod
@macrocephalopod · Follow
13 Reply Share
Read 1 reply
https://www.quantymacro.com/fx-european-commodities-mean-reversion/ 11/14
2/18/24, 9:04 PM FX European-Commodities Mean Reversion Strategy
I’m pretty much happy to see that the OOS performance holds up. Next steps is to
look closely at the return profile, drawdown, skew, more attribution etc. I’m not so
concerned about the strategy’s cost in isolation since I control for the turnover/cost
in my portfolio construction workflow. But for now that should conclude the post.
Thanks for reading, any feedback and comments are welcomed!
Sharpe = 0.388
https://www.quantymacro.com/fx-european-commodities-mean-reversion/ 12/14
2/18/24, 9:04 PM FX European-Commodities Mean Reversion Strategy
@macrocephalopod’s tweet
cephalopod
@macrocephalopod · Follow
31 Reply Share
Read 3 replies
https://qoppac.blogspot.com/2020/07/do-non-binary-forecasts-work.html
Subscribe
NEXT ISSUE
FX Euro-Dollar Dominance Strategy
https://www.quantymacro.com/fx-european-commodities-mean-reversion/ 13/14
2/18/24, 9:04 PM FX European-Commodities Mean Reversion Strategy
subscribe to quantymacro
sometimes I write cool stuffs
email SUBSCRIBE
quantymacro © 2024
Sign up
Powered by Ghost
https://www.quantymacro.com/fx-european-commodities-mean-reversion/ 14/14