Member-only story

Where’s Waldo? An example of pattern recognition. Back-testing and optimizing with Python.

Sofien Kaabar, CFA
7 min readJun 26, 2020

Tom Demark, the renowned famous technical analyst has created many successful indicators and patterns. Among his many discoveries, he came up with 7 different price patterns that he dubbed as “Waldo patterns”.

Inspired by the cartoon Where’s Waldo? Tom has developed these patterns to find short-term tops and bottoms. Any trader or even a receiver of such information would be excited knowing about this, but with hindsight and confirmation bias, the person seeing this, will test the patterns on the chart and focus on the ones that work while disregarding the ones that do not. The only way to remedy this problem is by developing a systematic trading strategy based on these patterns, and that is precisely what we are going to do.

I have just published a new book after the success of New Technical Indicators in Python. It features a more complete description and addition of complex trading strategies with a Github page dedicated to the continuously updated code. If you feel that this interests you, feel free to visit the below link, or if you prefer to buy the PDF version, you could contact me on Linkedin.

In this study we will limit our test to two of the 7 patterns, Waldo #5 and Waldo #8. (The numbering of the patterns starts at 2 which is why Waldo #8 is the seventh pattern).

The below definitions and conditions of the patterns are taken almost word for word from a great book written by Jason Perl: DeMark Indicators (Bloomberg Market Essentials: Technical Analysis)

TD WALDO #5

To find a potential short-term top:

  • The current bar’s close should be equal to the close of the previous price bar.
  • The close of the previous bar should be higher than the close of the bar before it.

To find a potential short-term bottom:

  • The current bar’s close should be equal to the close of the previous price bar.
  • The close of the previous bar should be lower than the close of the bar before it.

--

--

Sofien Kaabar, CFA
Sofien Kaabar, CFA

Written by Sofien Kaabar, CFA

Top writer in Finance, Investing, Business | Trader & Author | Bookstore: https://sofienkaabar.myshopify.com/

Responses (2)

Write a response