In the same line of thoughts as last post, today we will look at a way to incorporate the GARCH volatility model we introduced yesterday to create a regime switching strategy.
It is often discussed on the blogosphere that high volatility is good for daily MR, see previous editions of the state of short-term mean-reversion report by Michael over at MarketSci here and the moderator of daily follow-through MR series by David at CSS Analytics here and here. Concurrently, a low volatility environment is usually a good environment for trend following strategies; see Jez Liberty’s state of trend following report here.
With this in mind, since we want to maximize our return we want to be trading the appropriate strategy based on the volatility environment. Using volatility we can switch between MR and TF strategies dynamically to better adapt to the current market paradigm. To do this we can classify current volatility by percentile using a 252 day lookback period. The resulting series oscillate between 0 and 1, and is smoothed using a 21 day percentrankSMA (developed by David Varadi) using a 252 day lookback period. We now have a back of the envelope smoothed volatility regime oscillator where reading greater than .5 indicate high volatility and smaller than .5 low volatility in place.
For the following example, the regime switching (RS) strategy will be as follows: if the oscilliator is greater than .5 we trade the MR strategy and we trade the TF strategy when the oscillator is below the .5 treshold. The MR strategy proxy is the RSI2, and the TF strategy proxy is the MA 50-200 crossover for this simple test. Results on the SPY are presented below with equity curves for MR only (red), TF only (blue), buy and hold (green) and RS (yellow). Note that for this test, the input for the volatility is the running 21 day standard deviation of returns (ie. historical volatility).
The RS strategy outperforms both MR and TF strategies over 10 years. But wait a minute, the post was about regime switching using volatility forecast, not historical volatility. Simple, to do so, we calculate the oscilliator using the results of the garch model introduced in the last post. We now have the RS strategy using volatility forecast, good news is: it performs better! Results below using GARCH forecast (gold) vs using historical volatility (grey).
As mentioned before on many other blogs, incorporating volatility forecast in a strategy seems to improve results in this regime switching strategy.
Continuing on the current series of post, I was at the point of forecasting volatility. There is several ways to just that; this very topic is the subject of a lot of research in finance. Different models to model volatility are available and they range from both ends of the complexity spectrum. I am going to be using what I think is one of the most popular: the GARCH(1,1). Just as a side note however, I don’t think it is the best model to use, but I do think that the simplicity of it makes it very attractive. For the more sophisticated quant crowd, in the GARCH family, the EGARCH seems to better forecast market volatility than its counterparts. I will not go into to much detail on the GARCH process (ie this is not meant to be an introduction post), if you would like to hear more about it, please let me know in the comment section.
For SPY since 2000, here is what a GARCH(1,1) model looks like, plotted vs the 21 day standard deviation with the residuals at the bottom. Results have been created using the tseries and quantmod libraries for R.
In terms of significance, the model significantly filtered the ARCH effect and the conditional normality assumption does not seem to be violated (using Jarque Bera and Box-Ljung tests). Regardless of the textbook testing, eyeballing the chart, we see that the model is fairly good at predicting SPY’s volatility. Now that we have the model in place, the next post should be on how to use a similar model on volatility of volatility once it has been stripped of its correlation with the actual volatility to see if we can improve our trading results and especially our regime switching strategies.
I was not happy with last post’s graph, it did not give a good perspective on the recent distribution of volatility. This quick post is to show the distribution of the last three years so it is easier to compare. Stay tuned this week for deeper analysis of volatility of volatility and applications to trading.
Volatility of volatility
As you can see, I changed the theme of the blog to answer the numerous complaints I received on the previous one. Size of the letters, font and dark color scheme and all. However, rest assured that the content and the blog itself remains the same ! Please let me know in the comment section if this theme is better.
It’s been a long time since the Quantum Financier blog saw any action but today I am back (not home yet but back on the blogosphere nonetheless!). Today’s post will focus on the distribution of volatility and of the volatility of volatility in an attempt to examine which one is more stable. The implication of results here can tie nicely into CSS’s recent post Random Regime Musing; I recommend you read it if you haven’t yet.
In the post David reach the following conclusion: “by using forward [volatility] estimates we can respond more quickly to changes in volatility and how they will impact our mean-reversion strategies”. Then a new very interesting blogging geek, The Quanting Dutchman commented suggesting that volatility of volatility is usually more predictable. The conversation grabbed my interest and I thought I would put the idea to the test. The following statistics are a comparison between the distribution of the volatility and of the volatility of volatility for different sample size and a visual comparison on the 500 bars time frame.
Volatility of volatility
The numbers seem to confirm the theory, the distribution of the volatility of volatility seems to be more stable than that of simple volatility overall. From here, one can wonder if the added predictability can transfer to improved regime identification. The idea is appealing and will be discussed in a future post, we will also look at how concretely use this information and incorporate it into a trading strategy. You may find that I keep my analysis very shallow. Rest assured, the subject will come back on the blog in the coming week, I want to dig deeper into the phenomenon; more on this to come…