Book Image

Algorithmic Short Selling with Python

By : Laurent Bernut
Book Image

Algorithmic Short Selling with Python

By: Laurent Bernut

Overview of this book

If you are in the long/short business, learning how to sell short is not a choice. Short selling is the key to raising assets under management. This book will help you demystify and hone the short selling craft, providing Python source code to construct a robust long/short portfolio. It discusses fundamental and advanced trading concepts from the perspective of a veteran short seller. This book will take you on a journey from an idea (“buy bullish stocks, sell bearish ones”) to becoming part of the elite club of long/short hedge fund algorithmic traders. You’ll explore key concepts such as trading psychology, trading edge, regime definition, signal processing, position sizing, risk management, and asset allocation, one obstacle at a time. Along the way, you’ll will discover simple methods to consistently generate investment ideas, and consider variables that impact returns, volatility, and overall attractiveness of returns. By the end of this book, you’ll not only become familiar with some of the most sophisticated concepts in capital markets, but also have Python source code to construct a long/short product that investors are bound to find attractive.
Table of Contents (17 chapters)
14
Other Books You May Enjoy
15
Index

Myth #1: Short sellers destroy pensions

"Do you believe in God, Monsieur Le Chiffre?"

"I believe in a reasonable rate of return."

– James Bond, Casino Royale

During the Great Financial Crisis (GFC) of 2008, many influential figures encouraged market participants to buy stocks to "shore up the market." They claimed it was "the patriotic thing to do." I grew up in an era when patriots were altruistic individuals who put their lives at risk so that others may have a better future. Somewhere along Wall Street, a patriot became someone who put other people's money at risk in order to guarantee an end-of-year bonus and ego massage.

In the GFC, short sellers did not decimate anyone's pension for a simple reason: pension funds did not allocate to short sellers. Neither did they cause the GFC. Short sellers did not securitize toxic debt or cause the real estate market bubble, nor were they responsible for its collapse. Their crime was to do their homework, take the other side, and profit from the debacle.

Traders make one of two things. Either they make money, or they make excuses. When they make money, performance does the talking. When they don't, they scramble for excuses. Short sellers are the perfect scapegoats. The most vitriolic critics of short sellers are not exactly fund management nobility.

Besides, it might be counter-productive in the long term to blame short sellers for one's misfortunes. There are only two ways you can live your life: as a hero or as a victim. A hero takes responsibility, lives up to the challenges, and triumphs over adversity. A victim will blame others for their failures. The "patriots" who blame short sellers choose the path of the victim. Next time asset allocators decide on their allocation, who do you think they would rather allocate to: heroes or victims?

Now, do short sellers really decimate pensions? The single most important question about your own pension is: "do I want to retire on stories, or do I want to retire on numbers?" The day after your retirement, what will matter to you: all those buzz investment themes or the balance in your bank account?

If you think they are one and the same, then keep churning, and wait for either the handshake and the gold watch, or the tap on the shoulder from the line manager for a life-altering conversation. If you choose to retire on numbers, however, then let's have a look at them.

Nothing illustrates the "story versus numbers" dichotomy better than the active versus passive investing debate. Active management refers to fund managers taking bets away from the benchmark, a practice referred to as active money. Passive investing refers to minimizing the tracking error by mimicking the index. Active managers claim their stock-picking ability and portfolio management skills deliver superior returns. However, the numbers tell a different story. According to S&P's Index versus Active reports, the vast majority of active managers underperform the S&P 500 benchmark on 1, 3, and 5 year-horizons. This means that their cumulative compounded returns are lower than the benchmark. Exchange-Traded Funds, or ETFs, fared better than active managers every year on record, even during the most severe market downturns.

A more detailed report regarding active manager performance compared to the benchmarks can be accessed via S&P's SPIVA reports: https://www.spglobal.com/spdji/en/spiva/#/reports/regions.

The proof is in the pudding. The burden of proof is no longer on ETFs but on active managers to prove that they can deliver more than the index. The debate has gradually shifted from "which manager should we allocate to?" to "remind me again why we should be going with an expensive underperforming benchmark hugger when there is a liquid, better, cheaper alternative?"

Unfortunately, there is more. The penalty for deviating from the benchmark is severe. If managers deviate and outperform, they are knighted as "stock pickers." Yet, when they stray and underperform, they are dubbed as having "high tracking errors." This often leads to redemptions, the kiss of death for fund managers. When the choice is between becoming a hero or keeping your job, self-preservation compels active managers to mirror the benchmark, a practice referred to as closet indexing. This is the famous "no-one ever got fired for holding [insert big safe blue-chip stock here…]" line. If active managers end up mirroring their benchmark, then the "active versus passive" debate is a misnomer. It really comes down to a choice between low-cost indexing via an index fund versus expensive closet indexing via a self-preserving active manager. Either way, you get the same index, but with the latter, you also have to pay a middle-man, called an active manager. As John Boggle, founder of Vanguard, used to say: "in investing, you get what you don't pay for."

That does not mean active management should die an unceremonious death. There are exceptional active managers worth every penny of their management fees. It simply means that the average active mutual fund manager gives active management a bad name. Investors who go down the active management route not only take an equity risk premium. They also take an active management risk premium. The current crisis of active management is nothing but the time-honored routine of the middle man in every industry who realizes that they can no longer delay efficiency.

Next, let's look at what happens during bear markets. Markets have returned between 6.3% and 8% on average. Compounded returns over a century are astronomical. So, in theory, you should stay invested for the long run. Explain that again to the cohorts who retired in 2001 and 2009. Markets have gone down 50% twice in a decade. When the response to "too big to fail" and "too much leverage" was to make them bigger, hyper-leverage, and put the same people responsible for the GFC back in the driver's seat, rest assured that markets are bound to hit "soft patches" again. Long-only active managers may display heroic grace under fire during bear markets but, when your net worth has gone down by 50%, a 1 or 2% outperformance is a rounding error. Two double diamond black slopes in a decade and everyone wants bear market insurance: "What should I buy during a bear market?"

Let us reframe the question. Imagine someone walking up to you and asking: "There is a bull market going on. What should I be short selling?" Pause for a second and then consider your reaction. If selling a bull market does not make any sense, then why would you buy anything during a bear market? There is no safe harbor asset class that will magically rise. The only thing that goes up in a bear market is correlation. There will be ample time to buy at bargain-basement prices once the rain of falling knives stops.

During a bear market, the only market participants who can guarantee a reasonable rate of return are those whose mandate is inversely correlated with the index. These people are short sellers. You do not have to like them. You do not even have to stay invested with them during bull markets. More than any other market participants, they understand the cyclicality of inflows and redemptions. If you choose to retire on numbers, then you owe your pension to consider allocating to short sellers.

This brings us to a counter-intuitive conclusion. If you choose to retire on numbers instead of stories, then passive investing is the way to go on the long side. For capital protection and alpha generation during downturns, investors need to allocate to short sellers. In the active management space, the only market participants who will deliver a reasonable rate of return on your pension are short sellers.

Another counter-intuitive conclusion for practitioners is evolution. Active fund managers face an unprecedented existential crisis. If they want to survive, they need to evolve, adapt, and acquire new skills. Short selling might very well be a rare skill uniquely suited to market participants who are determined to stay relevant.