Blog_FxSystemDevelopm-2

Many aspiring traders are focused on finding good entries. They focus on setups and entries. I would say 90% of their time is actually dedicated to perfecting entries. And that is one way to miss the forest for the trees. Tom Basso and Van Tharp, back in the 1980s, had already issued a study on the relative importance of entries. In particular, the “Coin Flip” study that was done showed that across 10 futures markets, a simple random entry with a trailing stop made money. The question then becomes: does the random entry actually work or did they cherry pick the situation? What is the actual importance of entries, if the Coin Flip actually is profitable over any length of time?

Tom Basso’s Coin Flip Study

“I was doing a seminar with Tom in 1991. Tom was explaining that the most important part of his system was his exits and his position-sizing algorithms. As a result, one member of the audience remarked, “From what you are saying it sounds like you could make money consistently with a random entry as long as you have good exits and size your positions intelligently”. – Van Tharp, Trade Your Way to Financial Freedom

Here are the very simple rules Tom Basso used, in order to test the viability of a random entry system:

1) Hypothetical 1 Million dollar account. This is required in order to simulate diversification amongst futures contracts, withstanding margin requirements and drawdowns.

2) Select markets that have more of a tendency to trend, so commodities and futures markets. In particular, the markets backtested on were Gold, Silver, US Bonds, Eurodollars, Crude Oil, Soybeans, Sugar, Deutsche Mark, the Pound and Live Cattle.

3) The Exit is 3*10 Day Average True Range (more on this here) subtracted from the close. The trailing stop can only get closer to the current market price, not further away.

4) Position size: 1% of equity

5) Selected markets must be liquid (so that trades can be entered and exited immediately with low slippage).

5) Always in the market (so as soon as 1 trade is closed, another is opened).

Basso Random EntryRandom Entry Trades taken as per Basso’s Rules coded by Craig Consulting on MT4

We did these simulations within the MT4 environment with the help of our resident programmer Craig. We tested FX Majors along with Gold, from January 1st 2014 to June 30th 2016 (except for NzdUsd which had data errors and was run only until the end of February 2016). So effectively we are testing the random entries in a trending and rangebound environment. Unfortunately MT4 doesn’t have a MonteCarlo generator so we had to do all the runs manually and it was a lengthy process. So we did 20 runs which may skew the results a little, but we did not find significant deviations from the core concept: Tom Basso’s Coin Flip remains as sturdy today as it did back in the 1980s/1990s.

Calculations BassoAn example of the output in Excel – Tom Basso’s Random Entry is in fact profitable in most cases.

As you can see, the random entry method ends up with a profit in most cases (and this was a robust finding across all runs). The profit factor is also interesting. However, there were very few trades and a very low win rate. This is most likely why Van Tharp talks about the psychological part of trading. Even with robust statistics at your disposal, it would be very hard to stomach this kind of a system in reality.

But now the complications arise. We need to ask ourselves: just how random are Tom Basso’s random entries? To keep the discussion short & sweet, here are our thoughts:

– real random entries must be random in time and price. So being in the market at all times is not as random as it should be. Tom Basso’s randomness is simply asking the algorithm to be “long or short” randomly at a given starting date, and then randomly pick long or short after each trade is closed. So this means the starting point and initial conditions are influential.

the markets we are trading (forex and commodities) exhibit autocorrelation (trendiness) just like the futures contracts used in the original study. This is another bias to this test, as stocks do not exhibit the same degree of autocorrelation in returns.

the exits aren’t random at all, are they? We are not trading a purely random system. So we’re not saying that it is possible to obtain decent results simply flipping a coin in the market. What will emerge in this article is that the exit strategy influences returns more than the average trader expects. In particular, we are using a trailing stop which is particularly suited to trending markets. Random entries with trailing stops will get “chopped up” during range-bound environments but will “buck the trend” when there is one.

Variation 1: Pure Random Random Entry

The first robustness check we performed, was to make the entry method even more random than Tom Basso’s. We ran the iterations again, and the algorithm acts as follows: it randomly extracts numbers from 1 to 20 but issues a signal only if it gets “1” (Buy) or “2” (Sell). So this system is effectively random in time and price. You’re not in the market the whole time. We also lengthened the ATR. Instead of using a 10 Day ATR, which is much closer to the current market’s volatility conditions, we adopted a 200 Day ATR which should be less biased by volatility clusters in the data. Also, instead of using a fixed 3*ATR initial & trailing stop, we used a 1*ATR Initial Stop and a 2*ATR Trailing stop. The idea is to give back less profit in trending situations, and get out of the market early in choppy situations.

PastedGraphic-20“Random Random” Trades with our new rules, coded by Craig Consulting on MT4

Craig Random Entry ResultsAn example of the output in Excel – our own Random-Random Entry

Running various iterations of our “Random-Random” system, we get much closer to the “random” results we would expect. With some interesting outcomes.

  • results end up much more variable. Equity curves are more of a mix between end profit and end loss, compared to Basso’s settings. This is to be expected because we are voluntarily adding randomness to the method.
  • The total number of trades is higher. Of course, we are not in the market as long as Tom Basso and we have tighter stops, so we have more trades. This increases our sample size and adds robustness to the results, we think.
  • Using a smaller trailing stop than Basso, our DrawDowns are smaller, yet our average profit is still larger (double) than our average loss. So the trailing stop is still very much working in our favour.
  • The profit factor is strangely still positive. We wouldn’t expect this if the market was purely random. And the result isn’t just confined to this iteration. It’s consistent over all runs we performed.

At this point in our journey, Craig & I started to see through the data. What we were effectively observing was that “tendency to trend” characteristic that FX and commodities possess. So any variation of a random entry and trailing stop should yield similar results. The trailing stop is in fact a simple trade management vehicle to “capture trends”.  And this is what we found through more and more testing. (for all results and iterations, please feel free to contact Craig at drurycr@optusnet.com.au).

Market Type: the most important thing

Following the above observation, we re-ran the tests but this time we gave the random entry generator a “trend filter”. Of course, one could debate what kind of trend filter was used because there are many variations on the theme. But we wanted to be as robust and non-discretional as possible. We told the algorithm to look for situations like this:

Trend FIlter UsdJPyThe non-discretional trend-filter, as applied on UsdJpy Daily chart since 1/1/2015

As with many other tools, it’s not perfect but it gets the job done. The areas that are not shaded are considered “range” periods. So to understand what we did when we applied our random entry to the filtered market states, remember that:

  • entries are still random in time, so the beginning of a trend state does not imply a trade initiation
  • entries are still random in direction, so the model can also look for longs in downwards trends and long in upwards trends.

What we are attempting to do, by maintaining the random-random nature of the signals, is to verify further whether “filtering trending markets” can enhance the performance of the signals at all. Our logic was as follows: if the market state is truly the most important factor, then by only entering the market in those moments (albeit randomly) we should get better results than entering at random just anywhere, anytime.  In other words, we’re trying to “help” the trailing stop do it’s work.

Here is a sample of the results:

Basso TrendSample run of Tom Basso’s random entry and trailing stop combined with our trend filter

What we did this time is apply Tom Basso’s random entry settings with our Trend Filter. Here are the main takeaways after multiple runs:

  • More stability in the profit factor.
  • Much higher average wins, which compensate a lower hit rate.
  • End Profit distribution skewed more to the positive side if compared to the traditional Basso Random Entry.

The trend filter has worked up to a certain extent. But to really find out if what we’re seeing is non-random, we need to verify the opposite: what are the results if we use a random entry, with the trailing stop (which should work best in trending markets) inside a range?

Range BoundSome recent “range” situations as identified by our non-discretional trend filter.

A range is defined as “not in trend”.

And here is a sample of the results:

Range BoundSample run of a random entry in a “no trend” environment

The main takeaways are evident:

  • the final profit is consistently negative, which is interesting when considering that we’re using “random” entries
  • the profit factor is decisively lower than on any other random entry test
  • The average win is no longer consistently larger than the average loss.

Preliminary Conclusions

It’s quite easy to get lost in all these runs. It’s also easy to miss the objective of the test. So just to restate it: we are attempting to find out just how important the entry is, when trading FX. To do this, we dusted off Tom Basso’s old “coin flip” study done with Van Tharp, and re-run it within an MT4 environment from 2014 to 2016.  Our results confirm that:

  • the FX markets (along with commodities) tend to trend for extended periods of time.
  • A random entry, with a volatility-based trailing stop, on average makes money over long enough sample sizes.
  • The type of trailing stop can modify the results marginally but since the logic is still the same (we’re still attempting to capture long lasting directional moves) there is never a tremendous change.
  • A random entry gets chopped up inside a range.

So we can conclude that the Market Type (Trend or Range) is the overriding variable in our tests. The implication for traders is to focus more on identifying the market type first, and then deploying appropriate trade management and exit strategies which are in line with that market type. You can’t fade strength or buy weakness in a trend, and you can’t buy strength and sell weakness in a range.

Over to You

Trading purely random entries may be viable on paper, but it’s impractical and in any case tough to stomach in real life. Also, simply keeping losses small is not enough, since one can easily “die from a thousand paper cuts” effectively reducing the trading account to an amount that is useless. So having a strategy is necessary; entries should be more efficient than random; losses can hurt even if they are small.

This is our first evidence-based piece and I do need to thank our resident programmer Craig Drury for his efforts. We remain at your disposal for comments on our tests and if you have ideas on how to make the results even more robust, or if you have other feedback, it would be very much appreciated.

About the Author

Justin Paolini is a Forex trader and member of the team at  www.fxrenew.com, a provider of Forex signals from ex-bank and hedge fund traders (get a free trial), or get FREE access to the Advanced Forex Course for Smart Traders. If you like his writing you can subscribe to the newsletter for free.