In this article we analyze a trading strategy on the Future of the S&P 500 (Ticker @ES), the index of the most capitalization of the United States, with the aim of testing the effectiveness of one of the best known trading indicators: the percentr, also known as Williams %r.
The future of the S&P 500 is one of the most liquid and exchanged tools in the world. It is negotiated at the Chicago Mercantile Exchange (CME) and is available 23 hours a day, 5 days a week, making it particularly suitable for systematic trading strategies that operate both on a daily basis and intraday.
Do you want help to improve your trading approach? Click here >>>
How the percentr oscillator works (Williams %r)
The percentr is a technical indicator conceived by Larry Williams, one of the best known names in the world of trading. It is an oscillator that aims to identify potential hyper -computer and hyper -fired areas within a certain temporal period.
But what is meant by these terms? A condition of hyper -pouring occurs when prices recorded a strong rise in a relatively short period of time, moving too far away from recent medium levels. In these cases it is assumed that the market may be close to a possible reversal following a push to the limits.
On the contrary, a situation of hyper -time presents itself following a rapid drop in prices, indicating that any bearish pressure could be close to the end and thus indicating a possible return to an average value.
The percentr measures the current closure level compared to the maximum-minimous range of the last n periods, providing values between 0 and 100. The more the value is approaching 0, the more the price is close to recent minimums (hyper-time). Conversely, a value close to 100 indicates a price close to the recent maximums (hyper -mp).
It is worth stressing that on some trading platforms the percentr is calculated on a scale ranging from 0 to 100, on others instead from -100 to 0. The concept at the base does not change: it is only a matter of representation. In this study we will use the version that returns between 0 and 100 values.
In Figure 1 it is possible to see an example of how the percentr indicator is represented.
Figure 1. Visual example of the oscillator percent R.
The basic strategy on the S&P 500 with the Williams %R
To test the effectiveness of the percentr, we built a simple but well -structured strategy, operating on the future of the S&P500 with time frame daily.
We have chosen to use a low value for the calculation of the indicator, setting it on 2 periods. This choice is inspired by the research of Larry Connors, author and quantitative trader known for having used the RSI at 2 periods in several strategies, also an oscillator, with the aim of capturing movements in the short term.
In addition to the percentr, we introduced a simple trend filter: a mobile average at 200 periods. The goal is to avoid going against the main trend.
The behavior of the strategy will be as follows:
- If the price is located above the mobile average at 200 periods, only Long inputs are taken into consideration.
- If the price is below average, only short entrances are considered.
As regards the entrances and outputs:
- Long input: it happens when the percentr crosses down the level 20 (therefore it enters the hyper -fired area), reporting a possible restart. In this case, there is an order limit on the minimum of the previous session.
- Short entrance: it happens when the percentr crosses up the level 80 (entering the Ipercomprato area). In this case, there is an order limit on the maximum of the previous session.
- Exit from the position: the position is closed to the breakdown of the maximum of the previous session (for the long) or to the breaking of the minimum (for short).
Finally, to limit losses in case of unfavorable movements, a fixed loss stop equal to $ 2,500 per contract is set.
Backtest of the basic strategy with the Williams oscillator %R
Analyzing the Equity Line in Figure 2, which reports the results starting from 1 January 2000, there is a decidedly positive and constant trend over time, with a net profit of about 115,000 dollars. The curve has an orderly trajectory, with contained lateral phases and not excessively deep drawdown. This is already a first encouraging sign of the validity of the approach adopted.
Figure 3 shows the detail of the total trade analysis, from which some key considerations emerge. The strategy produced a total of 611 operations, with a success percentage of 67.43%. The Averal Trade, or the average profit by operation, is around 190 dollars:
- Long operations recorded better performances than the short ones, with a 295 dollar trade.
- Short operations are less performing, with a Averal Trade of just 41 dollars.
Overall, the strategy has shown a good ability to adapt to the different market phases, maintaining positive results even in the most turbulent periods. However, the clear imbalance between the long and short performances suggests the possibility of further intervening to optimize the bearish component of the system.
Figure 2. Equity Line of the systematic strategy on S&P 500 with Williams %r.
Figure 3. Total trade analysis of the systematic strategy on S&P 500 with Williams %r.
Change of systematic strategy with more selective short entrances
In light of the results obtained in the original version, a clear difference emerged between the long and short component, with the latter visibly less performing. For this reason, we decided to change the operational logic on short entrances, adopting a non -symmetrical approach compared to the long part.
In particular, in the new version of the strategy:
- The Long Logica remains unchanged, with entry to the lower intersection of the level 20 of the percentr.
- For the short entrances, however, we have raised the threshold from 80 to 90, trying to capture only those extreme movements that can really justify the opening of a bearish position.
This choice is based on the observation of the behavior of the future on the’s & P500. In other words, the market tends more often to climb slowly and to correct quickly, often making the early short entrances.
Raising the threshold at 90, the idea is to filter the least significant signals and act only in the presence of a truly marked excess, thus improving the overall quality of the bearish trade. Also in this version, the filter of the mobile average at 200 periods and the output rules (breaking of the previous minimums/maximums) remain unchanged, as well as the 2,500 dollar stop loss per contract.
Performance of the strategy modified on S&P 500
The introduction of a higher threshold for short inputs, from level 80 to level 90 of the percentr, led to an evident improvement of the strategy, both in terms of stability of the equity line and of overall efficiency of the bearish operations.
As can be observed in Figure 4, the overall equity line is now even more fluid, with a more regular growth and without prolonged side phases. The total net profit has increased significantly, going from about 115,000 dollars of the basic version to $ 145,000.
Figure 5 shows the detail of the new Total Trade Analysis. The total number of operations was reduced to 551, but the Averrage Trade rose to about 265 dollars. We can see that the improvement has focused mainly in the short part, where the Averal Trade rose from $ 41 to $ 208.
Overall, the modification has made it possible to improve the quality of the short signals, reducing noise and increasing the efficiency of the trade. This shows how, even with simple strategies, small adjustments can make a big difference, especially when taking into account the specific characteristics of the market on which you work.
Figure 4. Equity Line of the S&P 500 strategy with Williams %R with modified parameters.
Figure 5. Total trade analysis of the S&P 500 strategy with Williams %R with modified parameters.
Conclusions on the use of Williams Percent R to operate on the S&P 500
This analysis confirms that even simple strategies, based on classic indicators such as percentr, can generate interesting results if structured with criteria.
The trend filter helped to avoid countercurrent operations, while the use of a very short period (2) has made it possible to capture extreme movements in the short term. The first version of the strategy has already shown good stability, but it was sufficient to slightly change the short threshold to obtain a net improvement in the overall performance.
Moral: sometimes it is enough to observe the market, adapt the rules to its behaviors, and let the data speak.
Do you want help to improve your trading approach? Click here >>>
Until next time,
Andrea Unger