15 Comments
Aug 26Liked by Quantitativo

How exactly did you go about selecting the 15day SMA and 15% parameters? It would be interesting to see a 3D surface map for those 2 params against performance(sharpe,maxdd,annualreturn) across a range from 5%-25% to verify that 15 wasn't chosen from data snooping.

Expand full comment
author

Any range between 10-30% works. If my memory doesn't fail me, the best value would be close to 30%. However, the economic reason for 15% is explained in detail in the article. The short version:

- If we don't add anything, we would have a system that stays in a bull regime 60% of the time/bear in 40%, and this does not represent the reality accurately;

- Choosing 15% ensures the system stays in a bull regime 90% of the time/bear in 10%, and this better represents the reality observed in the market.

Expand full comment
Aug 26Liked by Quantitativo

"Choosing 15% ensures the system stays in a bull regime 90% of the time/bear in 10%, and this better represents the reality observed in the market." This part is what I mean about the data snooping, since we are choosing this based on the past knowledge that the US market has been mainly bullish. Even if the chance that this continues is extremely high it's not a guarantee. (eg. Nikkei, S&P Latin America etc. have not had majority bull market)

Expand full comment
author

I see your point. However, at least in my view, if there is such a structural change in the US stock market such that the long-term 90/10 proportion between bull & bear markets breaks down, my friend, I believe 99% of the models will break down.

That would be a pretty severe crisis.

I like the way you think, though... Bayesian :)

According to Bayesian stats, just because the sun has risen every day in the past doesn’t mean it’s guaranteed to rise tomorrow. Bayesian reasoning allows us to update our beliefs with new evidence, but we always acknowledge that there’s a probability, however small, that something unexpected could happen.

Expand full comment
Aug 26Liked by Quantitativo

And an unlucky name for your yacht.

Expand full comment
author

hahaha true :)

Expand full comment

Great article. I especially like the VIX-based regime filter. What I don't understand is how you can get 40% annual returns and have a profit factor of 1.23. I can be dense. Am I reading that right?

Expand full comment
author

A higher trading frequency and the use of leverage (both features of this strategy) explain that. If we weren't using leverage or had a low trading frequency, to get that, we would need a high profit factor. But that's not the case

Expand full comment

That VIX filter is what's up. I'm gonna experiment with that one 🤣

Expand full comment

Any piece of code for the algo?

Expand full comment
author

This algorithm has a lot of code. I just shared some live forward-test code in the latest article. Cheers!

Expand full comment
Aug 26·edited Aug 26

"Imagine the backtest is back in 2017, and it has all the symbols that have ever been a part of the Russell 3000 index at any point in time from 1998 to 2024"

I don't understand this. Wasn't the idea of having dataset such as Norgate Current & Past removing such bias? I mean with such data we know when a ticker enter/exit from an index, we know at each point which symbols are in tradable? Anyway to say it: point in time correctness? Does Norgate data provide that info?

Expand full comment
author

Yes, Norgate data provides all info. Then, we can use the info as we want. Depending on how we implement the rules, we might introduce subtle biases. It can get tricky :)

Expand full comment
Aug 26·edited Aug 26

Thanks for the great sharing. May I know if you had tried on shorting more and long less? How's the peroformance varies?

Expand full comment
author

Shorting more is bad. The account runs the risk of blowing up.

Longing less is also not good. It reduces the overall returns..

Cheers!

Expand full comment