The Secret to Shorting Stocks

This post contains affiliate links. An affiliate link means Blackarbs may receive compensation if you make a purchase through the link, without any extra cost to you. Blackarbs strives to promote only products and services which provide value to my business and those which I believe could help you, the reader.

Misinformation is everywhere. Many people believe the key to successful short selling is simply the inversion of a successful long strategy. I also used to believe this, among other short selling myths before I took the Short Selling Course by Laurent Bernut (<—affiliate link, use discount code SHORT5 for an additional 5% off at checkout).

This article will demonstrate the impact, just one of the revealed secrets to short selling, can have on your algorithmic strategy development. I will also briefly mention how I found out about the course, and why I chose to pay for it. You can skip ahead by clicking the links in the outline or simply read it through. It’s a quick read.

Outline

Background

In my everlasting quest to get better in the business of quantitative trading, I came across an interesting individual by the name of Laurent Bernut. 

The first post I read by him was a blog post on Quora where he introduced a risk management concept called convex position sizing. This concept was unique in that it sized positions as a function of the PnL of the portfolio and the stop loss distance of the entry (which itself is a function of the volatility of the asset). Then I read the rest of his answers on Quora, before reading all the old articles on his blog, Alpha Secure Capital

With humor and sound logic the quality of the information he provided was high value. And, if you take a moment to review his resume you will see why. 

Regardless, I implemented a bastardized version of the aforementioned risk management module on some of my asset allocation strategies. In nearly all cases, my backtested risk-adjusted returns improved and the equity curve was smoothed. 

Needless to say, when I heard he was going to be releasing a course on Short Selling using PYTHON via the Quantra platform, I signed up immediately. 

The course was better than I anticipated as it covered far more than just the art of short selling.

Some of the key topics addressed:

  • Rebasing asset prices to your local currency

  • Bull/Bear regime classification

  • Pros and cons of different entry methods

  • Position sizing and stop loss

  • Strategy Creation

These topics build on each other in a logical fashion. At the end of the course, he provides you a conceptual framework (using Python code) to build real strategies by layering 3 critical concepts: regime classification, entry method, and stop loss. 

Now, with that said, we will put one of these concepts to the test via a backtesting experiment.

The Experiment

Hypothesis: The regime classification filter can improve the performance of a dumb market-neutral long short strategy.

To test this hypothesis, we will use the Quantconnect platform, to create a benchmark “dumb” strategy and custom “smart” strategy.

Benchmark Strategy:

This is a market neutral long-short strategy using a custom version of Quantconnect’s S&P 500 universe filter. This universe is set up to mimic the stock selection methodology of the S&P 500 Index without having to purchase the actual daily composition history from Standard and Poor’s or another data vendor. 

The only customization to this universe was that stocks must have had a price between $5 and $250. The maximum number of positions was limited to 50, split equally between long and short.

The strategy uses a 90 day momentum indicator to bin stocks into 5 quantile bins. Those with the highest momentum values within the top bin are bought and those with the smallest momentum values within the bottom bin are shorted.

The positions are weighted according to inverse volatility using a 60 day lookback and rebalanced monthly.

Regime Filtered (RF) Strategy:

This strategy adds the regime classification method to the aforementioned benchmark strategy.

It requires the long stocks to be in a bull regime, and the short stocks to be in a bear regime as determined by the regime classifier.

Results

Let’s review the results of the experiment below. Again, remember that we are implementing just one of the three core strategy creation components taught within the Short Selling course.

ALL RESULTS HYPOTHETICAL AND SIMULATED USING QUANTCONNECT PLATFORM.

The difference in results is remarkable.

The benchmark strategy has a clear negative drift over time finishing in the red while never escaping its endless drawdown. Meanwhile, the regime filtered strategy demonstrated a positive drift while finishing in profits over time.  The RF strategy also has multiple periods where it is able to beat its high water mark, again, unlike the benchmark.

What’s particularly interesting about the RF strategy is that it performs strongly during periods of market turmoil. For example look at the following crisis plots. Note that the benchmark in these plots is the SPY etf.

ALL RESULTS HYPOTHETICAL AND SIMULATED USING QUANTCONNECT PLATFORM.

I’ve highlighted the key periods in blue. Most of these crisis events resulted in increased volatility and drawdowns for trend following strategies. However these periods are where the RF strategy demonstrated some of its strongest performances. This suggests that it could make a good companion strategy to a strong trend following strategy.

Let’s look at some key stats that quantify the value added by the regime classification module.

ALL RESULTS HYPOTHETICAL AND SIMULATED USING QUANTCONNECT PLATFORM.

The size of the improvement over the benchmark is surprising. 

The RF strategy has 4 more winning years than the benchmark strategy which translates to a 57% improvement.

The RF strategy’s total return was 30% compared to -31% for the benchmark which is near a 200% improvement. The CAGR is +1.34% for the RF strategy versus -1.84% for the benchmark or an improvement of 173%. 

Looking at the risk-adjusted returns as measured by the annualized and daily Sharpe ratios, the RF strategy improves on the benchmark by 200% and 250% respectively.

Conclusion

One of the hidden keys to successfully shorting stocks is a potent market regime classifier. In this article we tested the value of the regime classifier by comparing the performance of a market-neutral long short strategy with the same strategy except the regime filter was added. With this addition, the regime filtered strategy was able to flip a terminal, money losing strategy into a profitable one. The RF strategy beat the benchmark by 200% on an absolute and risk-adjusted basis. This result exceeded my expectations.

If you want to test the regime classifier on your own strategies, you can access that information and much more by signing up to the Short Selling course. I recommend the course to all quantitative researchers and strategy developers looking to improve their algorithm’s edge.

Reference Links