9 Comments
Jul 18Liked by Quantitativo

hello, interesting strategy here. Assuming you're using python. Is that backtesting engine custom or some public library?

Expand full comment
author

Hi! Thanks! It's a custom engine...

Many, many, many years ago, I implemented a backtest engine in Python for my master’s degree… it’s an event-driven engine (they are slower than vector-based engines, but imho they are easier to write strategies for, understand, and debug) with all blows and whistles, similar to the late Zipline. In fact, I tried most of the Python backtest engines that exist, and that’s why I prefer to use what I built over the years: I have 100% understanding of what’s happening and 100% control.

There's so many people asking about it that I'm considering sharing it :)

Expand full comment

that would be cool because the main public backtesting engines are not suited to test a strategy for several assets at once, sure you can do a for loop and a df that sums up the returns from each asset but you lose all the extra info/indicators unless you do adapt the bt engine

Expand full comment
Jul 15Liked by Quantitativo

Interesting. Could you explain what you mean by the following, the formula?

"we sort them by volatility (Normalized Average True Range)"

Expand full comment
author

Thanks! In the article https://www.quantitativo.com/p/robustness-of-the-211-sharpe-mean

I did a whole section about it.

Basically, we see that the higher the volatility (measured as Normalized Average True Range), the higher the expected return. So, at the beginning of every day, we sort all opportunities by their NATR (it's trivial to compute) and prioritize the higher ones to fill all available slots

Expand full comment
Jul 14Liked by Quantitativo

What would happen if you allocated 20% to managed futures/trend following/liquid alts? You might also try adding some gold. I thunk the strategy would benefit from more non-correlated assets and strategies.

Expand full comment
author

These are great ideas, thanks!! I'll put in the backlog to test :)

Expand full comment

Improving the momo strategy... I'd try selecting from a "universe" of stocks that have broken out of a price channel. An extreme version of this is the all-time-high list. There are ways to keep this manageable, either subdivide by market cap and pick large, mid or small for the strategy, or apply a rank mechanism, either performance or 52w range or ??? Setting a stop on these breakout stocks tends to work. You should find that you don't swap the winners around too much (ideally the ranking method keeps long-term winners without getting in/out of them all the time).

Expand full comment

Do you usually share the code?

Expand full comment