Bear Markets in the News
The S&P 500 officially entered bear market territory earlier this week as it is down 20% from its highs in January. Additionally, guys like Michael Burry (the real Big Short fund manager) have been saying for a few weeks now this is going to be like 2008.
If he's right, fortunes are ready to lost and won in the upcoming market turbulence and most people will be on the losing side.
How can you protect yourself?
Trust the Algos
When the markets are crashing, it becomes harder and harder to keep your emotions in check and stick to your plan. That's why we advocate a systematic trading approach: it separates your money and your emotions (as much as possible).
The question remains, however. How do you know that your system will perform well in a bear market?
There are no guarantees, but you building a backtest - simulating your strategy during previous bear markets - can give you a feel for what it would do in a similar situation in the future. We don't have a time machine, so this is the best we can do.
The easiest way to backtest a system is with Raposa's Strategy Builder which allows you to design and test your system in just a few clicks!
Prefer a Video? You can Watch us Build this Strategy Here:
Getting a Baseline
The S&P 500 is the baseline for most investors, so we'll follow it for this period. We'll look at 2008-2012 after the market came down from its peak and cratered down 57% in March 2009. Most investors held through the crash bailed out near the bottom and missed the rebound - it's just how human psychology tends to work.
If you bought and held the SPY, you would have made 9.5% over these 5 years, that's 1.8% CAGR. Not a high hurdle to beat in normal times, but when all equities are crashing at the same time, it's going to be more challenging.
Building a Basic Strategy
Let's start simple with a moving average cross-over. We'll use the traditional Golden Cross and Death Cross which is just when a 50-day moving average moves above or below a 200-day moving average to get going. In the Strategy Builder app, just go to the When to Buy tab and select the SMA settings like this:
The sell signals are set the same way in the When to Sell tab.
We're just going to run this on the SPY ETF which mimics the S&P 500. So go back to the Settings tab and choose the SPY from the stock selection bar, set the dates from 2008-2012, and turn position sizing and management off by selecting "No Risk Management." These selections mean that the bot will put 100% of the available capital into the position and it won't do any rebalancing or adjustment of that position until it sells.
When you've done this, hit "Run Backtest" to see how this basic strategy performs!
It's that easy to run a backtest!
We can see that we outperformed the buy and hold baseline just by missing the big drawdowns. This simple strategy gave us 31.2%, easily beating the 9.5%.
If you look at the beginning of the equity curve, you'll notice that this strategy stayed out of the market until mid-2009. That's 1.5 years of sitting on the sidelines and waiting. Most people don't have the patience to do that. Moreover, it only bought the SPY three times over 5 years. These trades yielded an average of 9% returns each - nothing to sneeze at during a challenging time - but it is a small sample size and many traders would have abandoned their system after 18 months of waiting just to get started.
Let's see if we can do a bit better.
Adding a Short S&P 500 Position
This time we'll add another ETF to our instrument list: SH, an inverse S&P 500 ETF. This is designed to increase 1% for every 1% drop in the S&P 500.
Additionally, we'll update our risk management strategy by adding Volatility Allocation to both the Position Sizing and Position Management inputs. Under Position Sizing, this will scale our purchase according to the volatility of the instrument. The higher the volatility, the smaller our position and vice versa. It's a simple way to scale according to the risk of an instrument.
As a selection for Position Management, this will re-balance and update our positions to bring them inline with our settings because volatilities can change and drift over time as the market evolves.
Volatility period sets the number of days we use to calculate the volatility of a position. In this case, we're using 252 because there are 252 trading days in a year, so we're measuring our volatility over the past year of data. Max risk fraction determines the maximum amount of capital that we'll ever put into a position. Volatility can get rather small - not likely, but it does happen - which would force your system to take on a lot of leverage in order to maintain the same risk profile. Setting this to 1 caps it at 100% of our capital at any given time meaning we won't take leverage on to scale up our risk. Finally, the risk coefficient is just a multiplier we apply to the volatility in case we want to scale by 2x our volatility leading to smaller positions, or 0.5x our volatility leading to larger positions.
Once you've made those selections, click "Run Backtest" to see how it does!
This model gives us 34.3% total returns - beating our baseline and previous system. It also highlights some of the challenges with shorting equities and why many trend following traders shy away from taking short equity positions.
You can see in the equity curve that the model took a position in SH right out of the gate and made a nice, 19% profit on that trade. But, it peaked with a 67% profit before giving most of that back, then jumped back over 60% again before finally closing the position with a 19% gain. This kind of volatility to the upside can happen with equities - even large, liquid indices like the S&P 500 - causing slower models to be caught off-guard. This was a historic drawdown, but it just takes time for that slow moving SMA to catch up and close the position.
We can look at a few different ways to update this to address this by speeding up the exit signals.
Getting out at the Top with a Faster Exit
We have a lot of options for exit strategies.
Here, we'll choose a 2-day RSI and sell if it drops below 95.
The RSI is the relative strength index and oscillates between 0-100. The higher it is, the more upward momentum behind a stock move. The lower it drops, the more momentum to the downside with 50 being considered the neutral line.
95 is quite high and a 2-day RSI is very fast, so if the price doesn't keep moving up, it will get out of the trade very quickly. The idea is to try to get out of trades near the top and avoid returning those big gains.
Hit "Run Backtest" and see how it performs!
This strategy makes a LOT of trades, but made the most of it pulling in 90.7% in total returns!
We were looking at a trade or two per year in the previous strategies whereas this one completed nearly 110 per year. It did a much better job of avoiding large drawdowns, but with so many short-term trades, it may be racking up a significant amount of trading costs. If your account is large enough, or your broker cheap enough, maybe this wouldn't be a big deal, but with only 0.12% returns per trade, this doesn't provide a lot of cushion to pay commissions and that 90.7% total returns could get eaten away very quickly.
How are you going to trade in the next bear market?
I'm not recommending any of these trading strategies - this isn't financial advice, of course - but hopefully you've gathered some ideas about how you can build a trading system to thrive through difficult times.
Personally, I don't want to be making rash and emotional decisions when the markets are melting down; I'd rather have a well-tested system handle it for me.
If that sounds like something you're interested in, check out our Strategy Builder where you can design your own trading strategy, test it, and deploy it to get live alerts and let us know what you think!