The cornerstone of the financial theory says that the higher the interest rates, the less attractive it is to own risky assets like stocks, gold, and Bitcoin. In this article, we do a backtest to look at what happens to stocks when interest rates go up. .
What happens to stocks when interest rates go up? Our backtest reveals that when rates go up, stocks don’t perform well, just as the financial theory says they would.
The relationship between bonds and stocks
Financial theory says that when interest rates go up, stocks go down. This is a general assumption.
But the logic is simple: The higher the interest rates, the less appealing it is to own risky assets like stocks.
Why is it like this?
Stocks are riskier than bonds:
Stocks are more risky than bonds
In bankruptcy proceedings, the company needs to be winded down in an orderly fashion, and bond owners are paid before equity owners (stock owners). Because of this, stocks are riskier than bonds.
And when interest rates go up, it gets less appealing to own high-risk assets like stocks.
What happens to stocks when interest rates go up?
To find out if the financial theory is correct, we do a backtest to look at what happens to stocks when interest rates go up. This is what we backtest:
We are long stocks (SPY) when bonds (TLT) are below the N-day moving average, and we sell when it’s above the moving average.
For example, when TLT closes below its 20-day moving average, we buy SPY at the close. When the close of TLT closes above its 20-day moving average, we sell SPY at the close.
SPY is the ETF of the S&P 500 and TLT is the ETF of the US 20-year Treasury bonds.
Why backtest this way? Because when TLT goes down, it means that the interest rate is going up. The relationship between bonds and the yield is inverse, please read what happens to stocks when bonds go up.
Our backtest uses an optimization where we test the N-day moving average from 5 days up to 100 with 5-day intervals (in total 20 backtests). The results look like this:
The first column is the 5-day moving average (being invested in SPY when TLT is below its 5-day moving average), column 2 shows a 10-day moving average, etc.
The fourth column, which contains the profit factor, shows that this strategy is pretty poor, except for the longest averages. The longest averages are good because we get to ride the long-term positive upward trend in stocks.
If we backtest the 15-day moving average, the equity curve looks like this from 2003:
What happens if we flip the strategy? Please read this article:
What happens to stocks when interest rates go up? Conclusions
The financial theory seems to be pretty correct in its assumptions:
Our backtest shows what happens to stocks when interest rates go up: stocks perform much worse when interest rates are up compared to when interest rates are down.