SPY Strategies For Volatile Markets: Utilizing The VIX Indicator (Rules, Backtest, Python)

Traders love to use technical indicators to generate signals and try to earn superior returns. One of those indicators is the VIX, which we will be using today. Let’s look at SPY strategies for volatile markets utilizing the VIX threshold.

Our backtest reveals that it’s most profitable to hold and own SPY when the VIX is high (above 29) based on risk-adjusted returns. 

At the bottom of the article, you also find the complete Python code for this backtest. 

Let’s explain the logic, trading rules, backtest, and results:

SPY Strategies for Volatile Markets: Utilizing the VIX Threshold – The Strategy’s Logic

The idea of the strategy we are going backtest is simple: holding onto SPY depending on what the VIX is up to.

More specifically, we will be looking at how the SPY performs when the VIX level is above or below a certain value.

Why might holding the SPY when the VIX is low work? Holding SPY when the VIX is below a certain level can be a good strategy since it indicates that the volatility is very low and the market is stable, contrary to a high VIX level, where there is a lot of volatility and uncertainty. 

Moreover, in theory, it should eliminate the possibility of experiencing a large drawdown or a sharp decline.

However, a low VIX level is also associated with a stock market top, which could mean that stocks are overextended and due to a correction. The only way to discover which is which is to do a backtest and check the results.

SPY Strategies for Volatile Markets: Utilizing the VIX Threshold – trading rules 

The trading strategy we are going to backtest is pretty simple:

Trading Rules

THIS SECTION IS FOR MEMBERS ONLY. _________________ Click Here To Get A Trial Access Click Here To Get Access To Trading Rules

We divide our backtest into two: hold and own SPY when VIX is below a certain level and when VIX is above a certain (threshold) level. 

VIX Thresholds And Returns – Backtest

In the tables below we look at risk-adjusted returns, which is simply the CAGR (annual return) divided by the time spent in the market. The logic is simple: The most return in the shortest period of time is the most desirable.

Here is the table showing the results by VIX being below certain thresholds:

Here is the equity curve of the best and worst strategies:

As you can see, none of the strategies generate super profitable results. It seems like a low VIX level has to do more with a market top than a continuation of an upside trend in the market.

Let’s go to backtest number two:

We also decided to test the inverse strategy: we buy and hold SPY when the VIX is above a certain level and threshold and sell it when it falls under that level. Here is the optimization table:

Holding SPY when the VIX is above 29 proved to be the most profitable strategy while holding SPY when the VIX is above 13 is the least profitable.

By looking at the table it is evident that the returns of this strategy outperform the first one, and is much more interesting to trade.

Here is the compounded returns of the best and worst strategy:

Although the strategy where we hold SPY when the VIX > 13 has a higher CAGR, it spends a lot more time in the market. The risk-adjusted return of the strategy when the VIX > 29 is much higher.

SPY in the Face of Volatility: A Guide to VIX-Driven Strategies – conclusion

In conclusion, today we showed you two strategies involving the VIX. The results? Holding SPY when the VIX is below a certain value did not prove as profitable as holding the SPY when the VIX was above a certain value.

This makes sense: you get a risk premium for taking that risk.

Harnessing VIX Signals to Optimize SPY Holdings Python code

The backtests done in this article were done using Python. The code for the strategy reads like this:

Disclaimer

Quantified Strategies (SIA Lofjord) is not an investment advisor. The content and information provided are educational and should not be treated as financial advisory services or investment advice. Trading and investment in securities involve substantial risk of loss and is not recommended for anyone that is not a trained trader or investor – it shall be conducted at your own risk. It is recommended that you never risk more than you are willing to lose. Leverage can lead to substantial losses. Any use of leverage, margin, or shorting is at your discretion. Quantified Strategies (SIA Lofjord) is not responsible for any losses that occur as a result of its content and information. Always use a demo account for many months before you do live trading. Trading requires hard and systematic work – there is no easy money, and markets change all the time. And remember: always trade smaller position sizes than you’d like to.

We assume no responsibility or liability for your trading and investment results. The indicators, strategies, programming code, Trading Edges, columns, articles, and all other features of the website QuantifiedStrategies.com are provided for informational and educational purposes only and should not be construed as investment advice. We don’t provide investment advice.

Hypothetical or simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Commissions and slippage are not included, and most trading signals are triggered at the close. Also, since the trades have not been executed, the results may have under or overcompensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs, in general, are also subject to the fact that they are designed with the benefit of hindsight. No representations are made that any account will or is likely to achieve profit or losses similar to those shown.

Similar Posts