Smooth Indicators With Zero Lag

In the December 2020 issue of Technical Analysis of Stocks & Commodities (TASC), John Ehlers proposed a "noise elimination technology" (NET). What is it? The article states, "Reduce indicator noise and clarify the direction of your indicators using Kendall rank correlation, which measures the strength of dependence between two sets of variables."

So, NET is a technology to reduce noise in the indicaors you use. Ehlers goes on to highlight that many indicators use short amounts of data, which results in noise. A common fix to reduce noise is to smooth out noise. However, introducing a smoothing filters can often inject lag into your indicator. This lag can result in delayed decisions and poorer trading outcomes.

So, how to fix a noisy indicator without introducing lag? Well, that's the goal of John Ehlers's NET creation. To accomplish the goal of reducing noise and not introducing lag, John utilizes the Kendall Correlation. The Kendal correlation is well beyond my skillset so, I won't attempt to explain it. Based upon the TASC article, "The Kendall correlation basically strips out the noise components not going in the main direction of the indicator." 

Noise Elimination Technology Applied

The TASC article provides an example utilizing the SPY ETF and John Ehlers's MyRSI indicator. The MyRSI indicator is a version of the RSI indicator described in the May 2018 issue of TASC. I attempted to recreate this setup using the E-mini S&P futures. Below you can see the daily chart of the E-mini S&P with the MyRSI indicator with a default lookback period of 14.


MyRSI indicator (red)

You can see the MyRSI indicator (red) is rather noisy. Let's see if we can fix that. I took John Ehlers's NET code and converted it into a function. I did this so I can easily access the NET code from an indicator and strategy. Below is the same E-mini S&P chart with the NET code applied to the MyRSI indicator.

MyRSI indicator with NET applied (blue)

By applying the NET filter to the MyRSI indicator, we can see a much smoother looking indicator. This should eliminate whipsaws. Below is an image of the standard MyRSI indicator (red) vs. the MyRSI indicator with NET applies (blue).


MyRSI indicator (red) and MyRSI indicator with NET applied (blue)

Yep, adding the NET filter to MyRSI does make a smoother looking indicator. It also appears to impact when the indicator crosses the zero level. This will impact the timing when buying and selling.

Like I said, I created a function for the NET calculations. To utilize the NET calculation I can simply pass into the function the values from the MyRSI indicator. The EasyLanguage code looks something like this:

myRSI = JE_My_RSI(Lookback);
Result = JE_Noise_Elimination_Technology(Lookback, myRSI); 

So, the real question is, does it work? 

Does NET Work?

Let's do a simple experiment to see if using John Ehlers's NET filter works. I'm going to use the MyRSI indicator and test it on the E-mini S&P. 

First, I created a simple TradeStation strategy based upon the MyRSI indicator. This will be a stop-and-reverse- strategy. The strategy will go long when the indicator crosses above the zero line and sells short when it crosses below the zero line. You can see an example of this in the image below.

MyRSI NET Example

Remember, I'm not creating a trading system. I'm performing a market test by building a TradeStation strategy to measure the impact of applying the NET filter to our indicator. I want to discover if using the NET filter will improve trading performance. 

Testing E-mini S&P

One way to test the NET filter's impact is to compare the performance reports of two strategies. One strategy utilizes the NET filter while the other does not. This is a bit limiting at this stage of testing. Why? Because we would only be looking at one lookback value. Remember, the MyRSI value has a Lookback parameter (default 14). See below!

myRSI = JE_My_RSI(14);

What if the default value of 14 is a lucky number giving excellent results? Maybe it's an unlucky number showing horrible results. Furthermore, what do the neighboring values look like?

You see, I want to explore a wide range of values to see how they behave. Ideally, I want to locate a cluster of values (stable range) that produce similar results. This gives me confidence that the indicator is more robust and likely to work going into the future. 

So, I'm not going to look at two performance reports. Instead, I want to test the robustness of each indicator over a range of lookback periods.

Like the traditional RSI, MyRSI has a lookback period as an input. I will use TradeStation's optimization feature to test the lookback period from 2-30 in steps of 1. I'll do this for both indicators. The results are below.

MyRSI Lookback Optimization

MyRSI Lookback Optimization

MyRSI NET Lookback Optimization

The bar graphs above, depict the net profit (y-axis) of the strategy based upon the lookback period (X-axis). The first graph (MyRSI Lookback Optimization) is very unstable. The net profit seesaws from positive to negative throughout the optimization. Compare that with the second graph (MyRSI NET Lookback Optimization), where the positive and negative profit values are more clustered. 

In the second graph, you can see a positive cluster between 15-20, where most other values are negative. This is unlike what you see in the first graph. This clustering seen in the second graph indicates that the NET filter applied to the MyRSI value may hold some value.

Testing Mini DOW

I performed an identical test on the Mini DOW. Looking at the results below, you can see a similar situation to what we saw with the E-mini S&P. With the optimization using the NET filter, you can see a cluster of positive results around 13-21. Notice the smoother slopes around the optimal values of 15 and 16. You don't see this in the first graph and this observation may indicate using the NET filter may improve performance.


MyRSI Lookback Optimization


MyRSI NET Lookback Optimization

Testing Soybeans

Again, I performed an identical test on soybeans. Looking at the results below, you can see a using the NET filter may or may not improve results. It's not clear. The standard MyRSI has a good stable range between 7 and 22. The MyRSI with the NET filter has a slightly more narrow stable range between 8-16. However, the NET version does have the potential to make more money. Yet, it also has the potential to have a greater drawdown.

So, using the NET filter may not always improve results. This of course, is no surprise. In this business, it's essential to test to see what works for you. This is why you must build market studies in EasyLanguage and test. 


MyRSI Lookback Optimization


MyRSI NET Lookback Optimization

Download the NET Function

What's nice about the NET indicator is how easily it can be applied to other indicators. I created a NET function that you can download and use. This will make it easy to use it on your favorite indicators. Just maybe, it will improve your indicators performance.

You'll find the code within our EasyLanguage library. How do you get access to the library? By joining our free EasyLanguage Mastery newsletter

If you want to learn to use EasyLanguage to build market studies like these, join me in my System Development Master Class. In SDMC, you can learn how to program in EasyLanguage, discover how to build market studies, and learn the proper steps to construct and validate trading systems.

About the Author Jeff Swanson

Jeff is the founder of EasyLanguage Mastery - a website and mission to empowering the EasyLanguage trader with the proper knowledge and tools to become a profitable trader. Join our EasyLanguage FaceBook group to interact with other EasyLanguage traders! Click the FaceBook icon to join.

follow me on:
  • Ron says:

    “You’ll find the code within our EasyLanguage library. How do you get access to the library? By joining our free EasyLanguage Mastery newsletter.”

    Hey Jeff, been a member forever. Rejoined just in case. But no easy to find links are showing on for the EL library access. Did I miss it?

    • Jeff Swanson says:

      Hey Ron,

      You’ll find the link at the bottom of most emails you get from us. You’ll also find it with each of our newsletters. It’s the link called “ELM Insider.” Send me an email if you can’t find it, and I’ll send you a direct link.

  • >