Skip to content

Releases: replacementAI/A-Backtest-A-Day

3.0

11 Sep 03:12
270f9f7

Choose a tag to compare

What's new?

Hi everyone! Ive backtested an agriculture basket of ETFs, consisting of wheat, corn, soybean, and sugar cane. Ive redone the cross validation code and redone sharpe calculation by weighing recent folds more.

Interesting things I've noticed after backtesting:
-The long only strategies have long periods of underperformance
-Short term reversal performs the best across all types

Best strat by sharpe: Time Series Long/Short Short-term Reversal
image

What's next?

I have a few ideas to test out next (in no specific order):

  • Metalabelling (applying ML to existing strategies)
  • Crypto

2.0

15 Aug 17:59
4ed5c31

Choose a tag to compare

2.0

What's new?

Hey everyone! After brain storming, ive decided to backtest a precious metals basket of ETFs, consisting of palladium, platinum, gold, and silver.

After backtesting, I've noticed some differences between the ranking of sector rotation strategies and the ranking of precious metals strategies. For example, low skew kept its spot near the top, but short-term reversal (aka mean-reversion) was dethroned from the top and fell all the way to the bottom, past momentum.

Best strat by sharpe: Cross Sectional Long/Short Low Skew
image

Lastly, I've also reformatted the repo a bit.

What's next?

I have a few ideas to test out next (in no specific order):

  • Metalabelling (applying ML to existing strategies)
  • Crypto
  • Commodities

v1.1

09 Aug 17:16
91d565e

Choose a tag to compare

Hey!
After rereading some literature, I realized that I calculated time-series and cross-sectional signals wrong. For example, it doesn't make sense to use ranked weighing with time series signals because at that point it no longer becomes time-series and becomes cross-sectional. Because of this, I was also doubling the amount of strategies I had to test.
I also sped up the calculations of each signal by using numpy more.
Lastly Ive added the 5 fold cross-validation scheme.
But if you want to view the previous version, its always available for you.
Thanks for reading!

v1

29 Jul 16:57
36d9984

Choose a tag to compare

v1

Overview

Hey everyone!
This release concludes v1 where I've explored simple strategies such as short-term reversal, skew, kurtosis, momentum, and low volatility, with different weighing schemes such as long-only or long/short and equal or ranked weight. We see that cross-sectional short-term reversal consistently outperformed all other strategies, regardless of weighing scheme. Its time-series alternative always close behind in 2nd place, regardless of weighing schemes.
Best performing strat by sharpe: Ranked Weight Long/Short Short-term Reversal
https://github.com/replacementAI/A-Backtest-A-Day/blob/main/Sector/RW%20XS%20L%5CS%20Short-term%20Reversal.ipynb
image

Whats next?

For the next type of strategies I will test, it will use the same sector ETFs, except this time they'll be adjusted for the market factor, while still being easy for anyone to implement if they want to trade it themselves.
But the repo doesn't look good right now, and needs reformatting to accommodate more strategies, so I am debating if I should kick the can down the road, or just bite the bullet and get it done with now.
Lastly, I'm going to add more cv folds from 3 to 5 for evaluating sharpe, as 3 isn't enough for the small amount of data I am working with.
Thanks for reading!