5 June 2008

Hilbert Sine Wave – Which Version is Best?

Confused by all the different versions out there? The answer turns out to be simple …

Trading with Cycles Part 2 – Which Hilbert Sine Wave is Best?

Thanks to Victor H. and Rick J. for suggesting I look at the different Hilbert Sine Wave versions available. This article is a little heavy, but if you’re confused by all the Hilbert Sine Wave versions out there, this might help you pick out the best one to use.

How many versions of the Hilbert Sine Wave are there?

John Ehlers, the developer of the Hilbert Sine Wave, has created 4 different versions of this indicator and there are another 2 possible variations:

  • Original code from “Rocket Science for Traders” using weighted moving average
  • Original code using Jurik moving average smoothing (what I use)
  • Original code using Hull moving average smoothing (fast & free moving average)
  • Updated code from “Cybernetic Analysis for Stocks and Futures” book
  • Alternative approach using Discrete Fourier Transform (DFT)
  • Alternative approach using Bandpass Filters

I assessed all 6 versions on 2 criteria. First comparing support and resistance level signals generated by the Hilbert Sine Wave algorithm visually on a 233 tick chart of the Emini. Each version was given a visual score, relative to the original weighted moving average version (score zero).

Then I back-tested 4 different systems on a 699 tick Emini chart over 60,000 bars:

  • Cycle trades (buy at support, sell at resistance)
  • “Overshoot” trades (buy at overshoot of support, sell at overshoot of resistance)
  • Breakout trades (buy at overshoot of resistance, sell at overshoot of support)
  • 5th Wave trades (buy at pullback in up trend, sell at pullback in down trend)

The results of all the systems were then added together. Don’t expect great results for these systems – it is taking EVERY trade with no filtering – but it does allow us to compare between different versions of the Hilbert Sine Wave.

Which version of the Hilbert Sine Wave is best?

The results of these tests are summarized below:

  WMA JMA Cyber. Hull DFT B'pass
Visual Score 0 -1 -3 -2 -5 -7
Profit $6.7k $2.4k $1.4k $0 ($3.0k) ($3.4k)
Profit Factor 1.07 1.07 1.01 1.04 0.97 0.97
No. Trades 1,675 1,747 1,883 1,997 1,666 2,057
% Profitable 53% 53% 49% 52% 52% 45%
Bottom Line BEST 2nd        

Hilbert Sine Wave: Visual Score & System Results Trading 1 Emini Contract

Bottom line: The original code using a weighted moving average was best overall.

Wow, with all the hard work gone into improved versions – the original still works best!

Now, am I going to change from the Jurik moving average version I use day-to-day? Probably not, the pull-back to end-of-trend (or 5th wave) signals are very important for my in my Emini day trading and I think the JMA version in superior in this regard. But the analysis was enlightening.

The visual score charts are shown below with my annotations.

 

Hilbert Sine Wave: Weighted Moving Average

Emini Hilbert Sine Wave WMA Image

Hilbert Sine Wave: Weighted Moving Average (Emini 233 tick)

 

Hilbert Sine Wave: Jurik Moving Average

Emini Hilbert Sine Wave JMA Image

Hilbert Sine Wave: Jurik Moving Average (Emini 233 tick)

 

Hilbert Sine Wave: Hull Moving Average

Emini Hilbert Sine Wave Hull Image

Hilbert Sine Wave: Hull Moving Average (Emini 233 tick)

 

Hilbert Sine Wave: Cybernetic Analysis

Emini Hilbert Sine Wave Cybernetic Image

Hilbert Sine Wave: Cybernetic Analysis (Emini 233 tick)

 

Hilbert Sine Wave: DFT

Emini Hilbert Sine Wave DFT Image

Hilbert Sine Wave: DFT (Emini 233 tick)

 

Hilbert Sine Wave: Bandpass

Emini Hilbert Sine Wave Bandpass Image

Hilbert Sine Wave: Bandpass (Emini 233 tick)

 

I hope this article was useful to those traders who use the Hilbert Sine Wave.