Skip to content

Adaptive VIX Moving Average with Ehlers Alpha Formula

December 4, 2019

In the last post I described a relatively simply method to incorporate the VIX into the well-known AMA or Adaptive Moving Average framework. The alpha formula requires two separate parameters- a short and a long-term constant which requires greater specification by the user. Ideally the fewer parameters you have to specify the better (although it is important to note that logical requirements for maximum lag and minimum responsiveness often tends to dicate the bounds).

Ehlers suggests in his paper on the “Fractal Adaptive Moving Average” using the following formula to compute the alpha in the exponential average:

alpha= exp(- 4.6*(D -1))

where D is analogous to the “VI” or trend factor in the previous post. Note that this formula was adapted in a different way for creating an adaptive volatility measure in this post. I find it to be quite useful and intuitive so it represents a viable alternative to the AMA framework in the last post.

Based on reader feedback I will simplify the percentrank function to be a rolling lookback of 2000 days to make it easier to avoid confusion in replication (the previous used an anchored lookback or “expanding time window”). We can substitute the percentrank of 1/(10-day sma of VIX) for “D” in the formula and calculate the EMA/Exponential moving average of SPY using the alpha output. Here is what the adaptive alpha should look like going back to 1996:

Note that a higher alpha means a faster moving average (less smoothing and lag) while a lower alpha means a slower moving average (more smoothing and lag). We can see in the above chart that the alpha is higher most of the time in bull markets and lower in bear markets (with the 90’s being an exception). No doubt there is a relationship between the VIX and mean-reversion which tended to work well on SPY in periods when the alpha was low. My research in fact shows that profitability was 4x higher buying on down days when this alpha measure was low versus high. What this implies is that you are smoothing more when price is noisy or mean-reverting and smoothing less when price is a decent estimate of tomorrow’s price. Obviously this is exactly what we are looking for when creating an adaptive filter.

Let’s now take a look at how this new transition calculation performs in the adaptive moving average framework. Once again we will compare the strategy of buying when the close of SPY is > 200sma versus the AMA> 200sma.

Consistent with the previous post the AMA strategy is superior to the basic 200sma strategy with fewer trades. The Ehlers alpha method in this case leads to very similar results as using the classic AMA framework for calculating alpha but with even fewer trades. Note that a “D” of 4 vs 4.6 produced a near identical match to the performance and number of trades as the classic AMA framework. In either case I hope this shows the robustness of using the VIX (or you could use historical volatility or GARCH) in an adaptive moving average as a substitute for using the price. In my opinion it is logical to use an adaptive method for smoothing rather than using static smoothing methods or worse yet the actual price in a trend-following strategy.

Adaptive VIX Moving Average

November 26, 2019

One of the challenges with technical or quantitative analysis is to identify strategies that can adapt to different market regimes. The most obvious is a change in the forecast or implied volatility as proxied by the VIX. During more volatile periods we would expect more signal noise and during less volatile periods we would expect less signal noise. But how do we capture this in a strategy? One method is to use the VIX to standardize returns as presented on this blog used “VIX-Adjusted Momentum” in this post. An excellent recent follow-up analysis was done by Justin Czyszczewski which showed that VIX-adjusted trend-following has been recently very successful during these fast moving markets (Tip: using the median or average of O,H,L,C of VIX versus closing data will make the edge of the original strategy more consistent across history). I will show a new variation using this framework very soon in a follow-up post.

Another way to tackle this issue is to vary the lookback length as a function of the VIX. So how would we do that? Enter the basic adaptive moving average framework which seeks to vary the speed or lookback of the moving average as a function of some volatility or trend-strength function.

We can easily substitute the VIX within the “VI” by looking at a standardized measure of how high or low volatility has been relative to past history. If it is higher we want to smooth more or have a longer lookback, and if it is lower we want to have a shorter lookback. This can be accomplished as follows:

Basically we are taking the percentile ranking using all history to date of 1 divided by the current average VIX over the past 10-days. To visualize how this moving average works we can see it applied to the S&P500 (SPY) in the chart below:

Notice that the moving average tracks the price very closely during bull markets and then filters out noise by becoming smoother during corrections. This is exactly what we want to see! Now lets compare a standard 200-day sma strategy that uses the current price versus using the Adaptive VIX Moving Average filter.

The result is a nice boost in gross performance (no transaction costs) that also happens to come with far fewer trades (48 vs 164) which would even further boost net performance. The results are in the table below:

This concept can be extended in several ways including using a simple moving average on the AMA line to create faster crossover strategies that are more responsive to market conditions. Ultimately this is a very simple and intuitive way to adjust standard trend-following as a function of changing volatility regimes.

Which Quant ETFs are Outperforming?

November 18, 2019

One of the challenges of investing in today’s environment is that there are so many investment products that it is hard to keep track. Our recently launched site Investor IQ is designed to help better organize investors and provide them with the analytics required to make better decisions. The biggest risk to chasing performance is if you aren’t on top of what is happening now and instead are chasing the last 3-year or 5-year winning fund (which are likely to mean-revert). Our relative strength rating tracks momentum at shorter intervals in order to better capture future outperformance. Here is a current snapshot of our “Quant ETFs” category under US ETF Digest which makes it easy to see which quant styles are outperforming right now:

As you can see the market is currently favoring stocks that are either undervalued (Value Screen/QVAL and Shareholder Yield/SYD) or exhibit growth at a reasonable price (GARP) which are ranked at the top by relative strength or “RS Score”. This reflects a significant shift away from growth (FFTY) and momentum (QMOM) which are ranked in last place. In fact the signal- which an ensemble of trend and momentum signals- shows that their trends are in a caution or “Hold” position while all other factors remain in a “Buy” signal. The OB/OS oscillator in the far right column is an ensemble of mean-reversion indicators that ranges from 0 to 100 (least to most overbought). Currently all of the ETFs in the list are neutral in terms of timing but nearing overbought territory (>80) where new purchases should either be avoided or existing positions should be trimmed.

The goal of this list was to capture many of the factors that quants use to produce alpha versus the broad index in a long-only format. We deliberately omitted strategies that had the ability to raise cash since I would consider that a separate genre of tactical strategies. If you have suggestions for additional quant ETFs that are not redundant to the members of this current list feel free to leave them in the comments section and I will seek to add them over time pending review.

Investor IQ Website is Live (In Beta)

November 11, 2019

For readers interested in getting signals and analytics on hundreds of ETFs and individual stocks our Investor IQ website is currently live and free during our beta-testing phase. We will be adding new data and analytics gradually over time as well as improving website functionality. The Economic Model is currently hosted on the site and predictions are updated every 2-3 days in real-time. Subscribers will soon receive access to backtests on the economic model (I have received plenty of requests) and other research unique to the website. For the time being we will continue to publish Investor IQ on this blog with limited functionality on a weekly basis for our readers so be sure to sign up to the website as soon as you can!

Current Economic Model Prediction

October 29, 2019

As of the 25th of October the Economic Model changed signal from sideways to bullish. So far the out of sample predictions since its creation have been quite useful for trading during these tricky markets. While Fed day is tomorrow and could change market sentiment, the economic numbers continue to show that we are not nearing recession territory. This prediction is in contrast to many pessimistic news articles that have been published over the last two months. Ultimately news articles focus on very recent data and tend to isolate a few specific indicators that may no longer have much predictive value (or are context dependent). That was the reason for developing an integrated model that uses 50 different indicators along with dozens of derivatives of the same time series within a decision-tree framework. This model will be featured in real-time on our upcoming website.

Mean-Reversion in Trend-Following Performance Using a 120-day Lookback

September 19, 2019

In the last post we showed that trend-following tends to be mean-reverting in the short-term. Data analysis also shows that trend-following has an even stronger mean-reverting effect using a 6-month or 120-day window using the same methodology. Take a look at the chart below using the BarclayHedge SG Trend Index:

In the last post I hypothesized that the mean-reversion effect exists because investors tend to chase recent performance. But there is obviously a lot more going on that drives the performance of trend-followers including lower interest rates, higher correlations, and generally less pronounced trends. Certainly monetary policy worldwide has also played a factor. A very good paper by Spring Valley analyzes some of the factors that have affected trend-following performance. Ultimately the data suggests that you need to incorporate this effect into your strategy or asset allocation methodology in order to be more consistently profitable using a trend-following approach.

Mean-Reversion in Trend-Following Performance

September 18, 2019

In a recent post I showed that the momentum factor has been mean-reverting in the short-term, and that this effect can be used to trade both the factor and momentum strategies effectively. An obvious extension is to see whether trend-following as a factor is also mean-reverting. After all, time-series momentum and momentum have been shown to be related in the research.

To represent the trend-following factor I used the data for the BarclayHedge SG Trend-Following Index which captures the profitability of CTAs that follow a systematic trend-following approach. For consistency, I used the same methodology as the original post: I took the 10-day return and smoothed using a 5-period simple moving average in order to reduce noise. I then took the percentile ranking using all history available at each point-in-time of that smoothed return. Oversold was considered to be when the percentile ranking of the return was below the median (<.5) and overbought was when the percentile ranking was above the median (>.5). Positions are held until the percentile ranking goes back above (below) the median. As a third strategy, I tested avoiding the top quartile of performance (<.75) which is a lower turnover and perhaps a more realistic strategy.

In general we see evidence of mean-reversion in trend-following performance (this is true using a wide variety of parameters) which becomes most pronounced starting in early 2014. The strategy of avoiding the top quartile (long when trend-following has not recently been performing very well) has been effective over longer periods of time.

The lesson highlighted in recent posts has been that to be effective in the modern day environment you have to be a contrarian— buying momentum and trend-following strategies after they have had poor performance. The reason this anomaly likely exists is because people tend to hire and fire managers based on recent performance. As a piece of anectdotal evidence: when I was doing consulting work a long time ago, I used to joke with my colleagues that certain clients were particularly adept at timing when to be in or out of strategies: as soon as they were upset, the strategy probably bottomed, and as soon as they wanted to increase their allocation it had probably topped. After making several poor allocation/timing decisions they usually quit the strategy altogether claiming that it was ineffective.

I made a presentation at a conference in 2010 about mean-reversion in strategy performance using a sample of over a hundred different strategies (including both mean-reversion and trend-following as well as many others). My experience in money management after 2010 has been no different. Unfortunately, all marketing is geared toward recent performance so there is a conflict of interest: if you understand that strategies mean-revert in the short-term then you will be marketing most when clients are least likely to make money. AUM flows tend to reflect that this method works well. It is therefore not surprising that DALBAR studies show that the average investor (most of whom have advisors) significantly underperform their risk benchmarks.