Introduction:

It’s often suggested that forex and markets in general are a succession of random movements, a random walk. People trade based on logical reasoning but there are so many people affecting the same value that the movements of a price become impossible to tell apart from a random walk.

With a simple method of random walk visualization, we can easily show that the above theory is incorrect. Especially for short periods like ticks, prices tend to travel in easily identifyable trends, much more so than a random instrument would.

Random walk vs tick data

First let’s see what pure randomness, as far as computers can generate it, looks like:

The pictures above are generated by a random walk. On each step, the position has a 50/50 chance of going up or down and on the next step, a 50/50 chance of going right or left. The colors change accordingly purely for aesthetics.

Now we’dlike to do the same using actual tick movements from forex instruments. We generate the following images using forex tick data. We move up or right for rises in price and we move down or left for falls in price. We alternate horizontal and vertical movements. If forex is simply a random walk we expect the same type of pattern-less image as shown above.


The graphs obtained for two month of tick data are very different from the random graphs. There is a strong tendency towards diagonal movements that correspond to upward or downward trends.

Even as we zoom in to periods without a particular overall trend we observe that the graph
is mostly made up of diagonal movements.



Diagonals going from top-left to bottom-right, and inversely, indicate trends. Those movements are the most frequent and indicate very short term trends. You’ll only find this pattern with ticks or minutes for a few instruments.

Overall, forex ticks follow trends by almost 70% more than if they moved randomly. That means one should be able to predict the next tick movement with 70% accuracy.

Automated strategy
If you simply predict that the next tick movement will be the same as the previous, you’ll be right about 65% of the time and with regression algorithms that are a little more complex you can reach the 70% correct predictions. However, that’s not enough to make a profit because of commission costs and spread.

The best results are obtained when using point & figure data with a threshold of 0.5 pip on EURUSD. We can predict with about 60% accuracy the next 0.5 pip movement and by limiting trades to the ones where the regression is very confident, we actually manage a profitable strategy.

Below are a couple of images that I believe show that the strategy works. For those perhaps unfamiliar with the historical tester from jForex, the pictures below are summaries of back-tests. The top part shows the actual chart, in this case, EURUSD for the last six month, with entries and exits. The two charts in blue show the evolution of profits taking spread and commission
into account (top) and only spread (bottom).


In the back-test above, the strategy bets very often and while it manages to beat spread, although barely, it loses money overall.


This strategy above limits itself to certain trades, when the regression shows a high confidence. The strategy is profitable overall but it makes only 52 trades that last no more than a few ticks over a period of six month. This is probably a strange way to
trade but it works. The regression algorithm I use is the LSTM network. It is made for dealing with time-series and it’s really a wonder of human engineering.

Long term


Trading on a longer time-scale would be ideal because cost of commission would immediately be less important. It does seem that most instrument follow long term trends much more than occurs with random instruments. However, the long term trends are much harder to play, you can’t identify a trend as easily as with ticks.

The way I see it, a good automated strategy needs to look at every time-scale and only enter positions when trends are present in the same direction on every or most time-scales. However, I still find it very difficult to identify long-term trends automatically.

Thanks for reading.
Übersetzen in Englische Sprache Zeige Original