Understanding the Weighted Average Stochastic Score for Ranking and Rotation Strategies

Please refer to an updated article for this indicator (click here). Note that I have since opted for a more simplified version of this indicator (WASS).

This article will explain the methodology behind the ranking table that uses the Weighted Average Stochastic Score (Score). ETFs trading near their highs on multiple timeframes are typically in uptrends and have high scores, while ETFs trading near their lows on multiple timeframes are typically in downtrends and have low scores. In addition to providing insights on trend and trend strength, these scores can be ranked for momentum-rotation strategies.

It all starts with the humble Stochastic Oscillator, which measures the level of the close relative to the high-low range over a lookback period. A 14-day Stochastic Oscillator value of 100 indicates that the most recent close is at the very top of the 14-day high-low range, while a value of 0 indicates that the most recent close is at the very low of the 14-day range. A value of 50 means price is in the middle of its 14-day range.

Before getting into the calculation, note that I am only using closing prices to calculate the Stochastic Oscillator. Traditionally, Stochastics is calculated using the high and low, as well as the close. The two formulas are shown below for reference.  

Traditional: (Close – Lowest Low XX Days) / (Highest High XX Days – Lowest Low XX Days)

Close Only: (Close – Lowest Close XX Days) / (Highest Close XX Days – Lowest Close XX Days)

There are a few problems with using the intraday high and low. First, as we saw in August 2015, ETFs can be prone to irregular spikes. Dozens of ETFs spiked lower on August 24th, 2015. It was not just a few illiquid ETFs, but also some of the big SPDRs, such as the Technology SPDR (XLK) and Consumer Discretionary SPDR (XLY).

Spike highs and lows skew indicators that use these price points and this skew can last many months. If you are using 14-day Stochastics, it will only last 14 days. However, the longer the lookback period, the longer the skew for your indicator. The chart below shows the S&P 500 Momentum ETF (MTUM) with the traditional Stochastic Oscillator in the middle window and the close-only Stochastic in the lower window. System developers using a 125-day Stochastic would have dealt with skewed data for six months after the spikes. Notice how the close-only Stochastic dipped below 50 in September (2015) and January (2016), but the traditional Stochastic did not.

I prefer closing prices for indicators because this lowers signal volatility and reduces noise. In addition, the closing price is the most important price point.

Calculating the Weighted Average Stochastic Score

The weighted average Stochastic ranking uses lookback periods of 25, 50, 75, 100 and 125 days. 25 days is just longer than a month and 125 days is around 6 months. The weighting for each Stochastic value increases as the lookback period increases. This means the longer lookback periods (100 and 125 days) carry more weight than the shorter lookback periods (25 and 50 days). The weightings progress as follows: 10%, 15%, 20%, 25% and 30%, and total 100%.  Each Stochastic value is multiplied by the weighting and these products are added together for a weighted average Stochastic value. This value is then smoothed with a 20-day SMA.

  1. Calculate close-only Stochastic for 25, 50, 75, 100 and 125 days
  2. Multiply each value by its corresponding weight (10%, 15%, 20%, 25%, 30%)
  3. Sum the values and apply a 20-day SMA for smoothing

The chart below shows the Home Construction ETF (ITB) with the five different Stochastic indicators, the unsmoothed Weighted Average Stochastic Score and the smoothed score.  ITB closed at a new high on all timeframes (25, 50, 75, 100 and 125 days). All five Stochastic values are 100, as is the unsmoothed weighted average. The smoothed score, which applies a 20-day SMA to the unsmoothed score, is at 73.19.

Even though smoothing introduces lag, it reduces volatility and improves performance when backtesting rotational strategies (less trading and fewer whipsaws). Smoothing also adds stability to the rankings and cuts down on dramatic shifts.

Admittedly, the ITB chart above provides a super “clean” example with three clear trends (up, down and up). The score was above 50 throughout 2017 (uptrend), below 50 for most of 2018 (downtrend) and above 50 for most of 2019 (uptrend). Basically, the bias is bullish when above 50 and bearish when below 50.

Chartists can also consider a buffer for their bullish and bearish thresholds. A move above 60 shows a high enough score to warrant an uptrend, while a move below 40 shows a low enough score to warrant a downtrend. The battle zone resides between 40 and 60.

ETF Rotation Strategy

Now let’s put an ETF rotation strategy to the test. This strategy buys the top ten ranked ETFs when the S&P 500 is in a long-term uptrend and sells when they drop out of the top twenty. The Weighted Average Stochastic Score must also be above 40 to insure the ETF is not in a downtrend. When ETFs are sold, they are replaced with the highest ranking ETFs in the top ten. The S&P 500 is trending higher when its 20-day SMA is above the 200-day SMA and lower otherwise.

The testing runs from January 2007 until January 2020. I would like a longer test period, but it is difficult to find a wide array of ETFs with longer histories. This period includes the 2008-2009 bear market, the flash crash in May 2010 and two 20% declines.

There are three test groups. First, I will set the benchmarks with buy-and-hold using the S&P 500 Sector Indexes. Second, I will test 44 of the 60 ETFs in the Core ETF List. I picked these 44 because they have been trading since at least June 2006. The other 16 started trading between 2007 and 2018. Third, I will test the 60 Core ETFs just for grins.

Setting the Benchmark with the 11 Sector Indexes

$SPI, $SPHC, $SPEN, $SPF, $SPM, $SPU, $SPCC, $SPRE, $SPST, $SPT $SPTS
(sorry, StockCharts does not have symbols for the total return sector indexes)

Buy and hold for the 11 S&P sector indexes returned 6% per year without dividends and 8.5% per year with dividends. This return, however, came at a cost. Namely, the 50 plus percent drawdown during the bear market in 2008-2009.

I did not test using the sector SPDRs because of the realignments during the testing period. The Real Estate SPDR (XLRE) was extracted from the Finance SPDR (XLF) in October 2015. The Communication Services SPDR (XLC) was created in June 2018 using stocks from the Technology SPDR (XLK) and Consumer Discretionary SPDR (XLY).

44 Core ETFs (Trading Since at least June 2006)

AGG, EEM, EFA, FDN, GDX, GLD, IBB, IGV, IHF, IHI, IJR, ITA, ITB, IWM, IYR, KBE, KIE, KRE, LQD, MDY, PFF, QQQ, RSP, SLV, SOXX, SPY, TLT, UUP, VIG, XBI, XES, XHB, XLB, XLE, XLF, XLI, XLK, XLP, XLU, XLV, XLY, XME, XOP, XRT

Next we add some basic market timing and the ETF rotation strategy using the 44 ETFs that have been trading since at least June 2006. There are ten equal-weight positions. The first line shows results without dividends and the second shows results with dividends. The reality is probably somewhere in between the two.

The Compound Annual Return (CAR) moved above 8% without dividends and the Maximum Drawdown was around 15%,  which is less than a third of the buy-and-hold drawdown. The Win% was around 58% and the Average Gain was almost twice the Average Loss. Notice that this is a fairly active strategy with around 500 trades and the average gain was around 6.5%.

I went ahead and tested the 60 ETFs in the core list. Keep in mind that only 44 of them were trading as of June 2006. The rest came online after the test began.

Final Thoughts

Basic market timing with the S&P 500 and an ETF rotation strategy can beat the market, especially when one considers risk-adjusted return and drawdowns. These strategies were only invested 76% of the time and avoided the bear market in 2008.

This is not a trend following strategy because the average gains are not that big (6 to 6.5%). The average gains, however, are almost twice the average loss. Also note that the holding periods were not that long. The average holding period for winners was 60 days and the average holding period for losers was 30 days.

Prior returns do not guarantee future returns. I create systems and run backtests to understand the mechanics and set expectations going forward. How much trading is involved? What kind of returns are realistic? Does the risk justify the reward?  The future does not look exactly like the past, but it often rhymes.

Thanks for tuning in and have a great day!

-Arthur Hill, CMT
Choose a Strategy, Develop a Plan and Follow a Process

Scroll to Top