# Williams %R Trading Strategy – 81% Win Rate – Williams Percent Range vs RSI (Backtest, Indicator & Systems)

Williams %R was developed by the famous trader and tax rebellion Larry Williams, who has given names to several technical indicators. Last week we wrote about the WilliamsVixFix indicator, and today we are explaining the Williams %R trading strategy and how to calculate and use the indicator.

Williams %R does work. In this article, we explain how to use Williams %R in a trading strategy, and finally, we backtest trading strategies to see if Williams %R works. Does it work? Our conclusion is that Williams %R seems to work pretty well.

## What is the Williams %R indicator?

The Williams %R fluctuates between 0 to -100. It’s an oscillating indicator and reflects the current close relative to the highest high for the lookback period.

The indicator is somewhat similar to the stochastic indicator, however, that one measures the close relative to the lowest low. A high reading is considered overbought, and low readings are considered oversold.

Here is how a 5-day lookback period looks in the S&P 500:

Williams %R goes quickly from overbought and oversold conditions. Thus, it is mainly used as a mean reversion indicator.

## How do you calculate the Williams %R indicator?

If you use a lookback period of five days, the formula looks like this:

Williams %R = (  ( highest high last 5 days – close ) / ( highest high last 5 days – lowest low last 5 days)  )* -100

For example:

If the close today is 100, the highest high over the last five days was 115, and the lowest low over the last five days was 95, then the Williams %R is -75 ( (15/20) *-100 )

## Williams %R resembles WilliamsVixFix

The Williams %R is pretty similar to the WilliamsVixFix (but inversely from each other). The chart below is both indicators using a 22-day lookback period:

## Williams %R – does it work? We backtest some strategies

We backtest the Williams %R trading strategy on the S&P 500 (SPY) and we make the following trading rules:

By using optimization we get, perhaps as expected, the best results on short lookback periods. We used a minimum lookback period of two days and a maximum of 25 days. All tests gave a profit factor of two or more, except for 25 days which produced 1.9.

The best result is a two-day lookback period. This gives this equity curve for SPY since its inception until today:

Both during the GFC in 2008/09 and the Covid-19, the strategy performed exceptionally well. The percentage returns in 2008 and 2020 were 98.9% and 43.3%! During the bear market of 2022, it rose 15.7%, still pretty decent!

The returns above are compounded. CAGR is 11.9% (buy and hold is 10.3%), market exposure is 22%, the number of trades is 598, average gain per trade is 0.6%, max drawdown is 17%, and the profit factor is 2.2. These are pretty good numbers!

If we look at the risk-adjusted return we calculate it to 52%. We find this number by dividing the CAGR (annual return) by the time invested in the market, which is 0.22 (22%).

### Does the Williams %R work for shorts?

No, unfortunately, and as expected, the Williams %R does not work for shorts. It’s much more difficult to find profitable strategies on the short side!

## Williams %R Amibroker code

If you would like the Williams %R code for Amibroker you can order it at the link below. Additionally, you get the code for all the other free trading strategies we have published:

## Williams %R vs. RSI: we test different trading strategies

What is the best indicator: Williams %R or the RSI indicator?

The Williams %R is a mean revertive indicator, just like the Relative Strength Indicator (RSI) and Stochastics. Let’s test a trading strategy based on the RSI, which is quite similar criteria as we did above for the Williams %R:

• Enter on the close when the two-day RSI is below 10
• Exit on the close when the close is higher than yesterday’s high or when the RSI(2) ends higher than 70

These criteria yield this equity curve for SPY since its inception until today:

The CAGR is substantially lower than for the Williams %R: 7.3% vs 11.9%. Thus, the Williams %R seems to work better for the S&P 500 than the RSI.

Of course, the difference could be entirely due to chance and randomness. However, we suggest traders should test their RSI strategies and see if they can improve them by using Williams %R.

## Williams %R works perfectly with this indicator

We changed the settings somewhat to test another strategy that included a second indicator, and we got this equity curve on Nasdaq/QQQ (logarithmic) from its inception in 1999 until today:

The CAGR is 13.4% (buy and hold is 9.9%), the time spent in the market is 14%, 251 trades, 78% winners, the average winner is 2.3%, the average loser is 2.1%, the profit factor is 3.2, max drawdown is 20.5%, and the Sharpe Ratio is 2.9. These are pretty solid numbers!

If we look at the risk-adjusted return, it comes in at 96%.

Let’s look at how the strategy performs for S&P 500 (SPY since inception) we got the following curve:

The 280 trades have an average return of 0.88% and a win rate of 81%. The high win rate comes at a cost: the average winner is much lower than the average loser: 1.6% vs. 2.2%. Mean reversion strategies typically have a high win rate while the winners and losers are a bit asymmetric (winners lower than the losers). Despite this, the strategy performs really well!

Would you like to know the code and the criteria (in Amibroker/Tradestation and plain English)? You can either order the strategy by clicking the link below, or you can subscribe to our Trading Edges. You can order the strategy on this link (please choose Williams %R Strategy No. 3):

When you have paid, please press the link below to access the code (a text file):

Download the Williams %R strategy no. 3 by clicking here (you need to pay for access)

Alternatively, you can subscribe to our Trading Edges where we send out ideas like this monthly for a lower fee per edge. The edge above will be presented as an edge in a few months.

## Conclusion: Williams %R does work

The Williams %R trading strategies are pretty similar to the WilliamsVixFix. However, the Williams %R seems to perform slightly better in our backtests. Moreover, on a wide range of backtests, Williams %R performs better than the RSI and Stochastics in the strategies we tested.

We believe the Williams %R is an underappreciated indicator!