All Things Techie With Huge, Unstructured, Intuitive Leaps

Elliott Wave Principle Re-visited With Computer Trading

I write software. I'm pretty good at it. My strength lies not in streamlined code, but in algorithms. Any code monkey can write code. Most coders today could NOT write an object sorter using recursion and recursion is kiddie scripting in some of the functions that I code.

The real aim of the game is to not to get paid for writing software, but to write software that makes money. A quant is exactly that:


Business Slang . an expert in quantitative analysis.

So, one of the ways to write software to make money, is to develop trading software for stocks, bonds, derivatives and Forex. Everyone has their own proprietary technical analysis trading software but they all start with Weighted Moving Averages and all sorts of statistical charting and apparent correlations that you give signals when to buy and sell.

The great granddaddy of them all is the Elliott Wave Principle. If you don't know what the Elliott Wave Principle is, you can read about it HERE.

A typical Elliott Wave pattern stock price looks like this:

Elliott developed his ideas over 60 some years ago, and I idly wondered if Elliott Wave Patterns were still valid in this day and age of computer trading. Would computer trades at split seconds skew an Elliott Wave pattern if and when they occur? (The reason why I say "if" is that determining the milestones of the Elliott Wave pattern is a very subjective thing. Many technical analysts try to debunk the principle and its adherents swear by it.)

So the burning question is and was: Is there something to the Elliott Wave, and how has computerized trading changed the Elliott Wave, if at all?

To do that, I needed some data, and not just large time domain general data. I wanted data points demarcated by seconds, not days or hours. After all computers trade by the second. So I captured the real live second by second trading of Facebook on its opening IPO where volumes were shattered but the price remained flat.

Here is a sample of that data:

To prevent subjective interpretation, I wrote a computer object -- a model of the wave that was magnitude agnostic (meaning that I was just searching for the pattern and didn't care about the price). One of the biggest problems with the Elliott Wave is interpretation and where does one begin to count for the wave pattern. I let the computer do that for me. If the signal (serial stock price changes) didn't fit the pattern, I advanced to the next data point, and tried again. I have to say that the results were pretty dismal.

Then it struck me -- I needed an "ish" engine on this. I have previously discussed "ish" on this blog. It is a form of fuzzy logic that can ignore the odd outlier whilst still identifying the pattern. I used the ish engine to categorize wildly divergent answer schemes of health surveys in Nigeria. Once I incorporated the ish engine into my model, I started to get many more hits where I did identify the Elliott Wave pattern.

To answer the question of how computerized trading was affecting the analysis principle, I had to collect models of the deviation of the Elliot Wave. The first thing that the ish engine picked up, was that computerized trading injected many more outliers that were in fact intermediate steps in the pattern. From a macro perspective, the Elliott Wave still sort-of resembled the pattern, but on a micro level, the fractal pattern was different, and like fractals, this was carried over onto the larger pattern.

Here is a graphic illustration of the outliers where intermediate steps are introduced into the wave pattern:

Instead of going from 1 to 2, now there is a 1A step inserted into the pattern. This was when I tested for 1 deviation per step.

Then I allowed the computer to test for two deviations per step. Now one can see two outliers as the wave progresses from 2 to 2A to 2B to 3. This is so simple to do when you have a computer object that models the wave and allows for ish or deviation. One can run many many epochs (data sessions) over and over again and change the parameters each time.

If one thinks of the wave as a series of vectors, then one begins to see how a direction vector can be incorporated into the ish engine or fuzzy logic. Let's suppose that Talib is right (and I am sure that he is) and there is a lot more randomness than one suspects. My posit was that computerized trading is responsible for generating the randomness.

When I altered the wave model to accommodate a deviation in the direction of the vector component in the wave, the computer came up with a model that was topless:

So, I now had models that the computer had saved. The next step was to assign Bayesian Probabilities to each model. The first injection of Bayesian probability was for predictive effect. Based on where I was at the moment, what magnitude and direction of the price vector would happen next? Then I determine the probability of which overall model that it will fit. From there one can make larger price determinations. Incidentally, no-fit is also an outcome in this model, where there simply isn't a pattern.

What's the next step? The next step is to introduce artificial intelligence multi-layer perceptrons as a fall-through model to analyze the price signal in real time. Then the perceptrons keep correcting themselves based on real time outcomes.

Can this updated algorithm score alpha and make money on stocks, futures, derivatives and Forex? I don't know yet, but I am too busy earning a living to take this to the next step. Are there any fund managers out there willing to fund a research project with the updated Elliott Wave coupled to fuzzy logic, artificial intelligence and Bayesian Inference?


  1. Good that you have done it.. how are the results..
    Did u back test
    Is it in amibroker afl type..?

  2. Has not been put in amibroker. Has been back tested with good results. Needs further work for packaging. Thinking of making it a proprietary tool when I get the time.