Hi Grant,
Thanks for sharing this! I’d be happy to share my thought process for how we'd evaluate this for Quantopian’s fund.
We evaluate strategies based solely on the exhaust data, so first I’ll run through what I’d look at just based on backtest results, then I’ll speak to the extra info you’ve shared by pointing us to the paper you referenced and by exposing the logic.
The first thing we do is to run the longest historical backtest we can get to complete. For contest algos we do this using a test harness that lets us dump in any algo by it’s identifier, along with any desired start/end dates, starting capital base and cost models. In this case however, I just cloned your algo and ran backtests by hand.
The longest backtest i could get to complete started 1/1/2011 (attached here). I didn’t dig into why it breaks earlier, but typically we prefer to have at least 5 - 10 year backtest to evaluate. Because I could access your leverage in the algo, I set that to 1.0 so I could evaluate the strategy separate from any leverage affects.
While results of this backtest would pass our beta filter, it would not pass our first level performance filters for the fund (Annl returns > 7%, Annl Sharpe > 0.60) - so this algo wouldn’t make it past this initial stage of evaluation for further analysis.
In this case however, you’ve shared the details of your strategy and your code directly, so I took a little more time poking around to try to see why this algo doesn’t look that hot.
As a rule, the idea of choosing an interesting academic paper to replicate and tweak is a great one - I definitely support that approach! In this case the paper describes a method for selecting a long-only portfolio of stocks based on looking at mean reversion — seems reasonable — but it’s not designed as a hedged strategy which is what we’re interested in for our fund. The authors specifically mention that the strategy is designed for ‘self financed’ portfolios, and they aren’t going to explore margin/short selling.
At this point I’m then curious to check, how does this algo do if you remove the hedge you’ve added in QQQ and just dial back to a pure replication of the paper. I checked that out and indeed it looks much more profitable ( see next backtest below, Sharpe of > 1.0 for the full backtest period), but alas, now you’re back to a Beta of just about 1.0. What that tells me is that this strategy derives the majority of it’s power from following the market and that it’s no longer consistently profitable when hedged, or at least when hedged the way you’ve implemented it here (50% allocation to shorting QQQ on a fixed basis).
So where would I go from here? Personally I’d probably choose a paper or template that starts off exploiting mean reversion from a long/short approach natively vs. bolting on the hedge after the fact. There’s a template of a long/short mean reversion algo that we’ve recently added to our Help pages. if I wanted to pursue the techniques outlined in this paper then I’d probably start with the short side, since that seems to where things are falling apart. Rather than allocating a static 50% of my portfolio value to QQQ I’d be interested in trying to allocate 50% long in stocks who are under-performing and 50% short to individual stocks that are out-performing.
I hope that's helpful and I'd be happy to look at any other interesting strategies you'd like to send our way!
Best regards,
Jess