The last post on “Monkey-Style” trading with random entries and trailing stop exits generated a fair bit of interest, comments and questions. In this follow-up post, I want to explore the concept further and address some of the points raised in the discussions resulting from that study.
Before I get started, I want to clarify that I am not advocating the use of random trading in real-life system design. I simply used random logic, as per David Harding’s quote, to remove any impact from the entry signals and solely focus on exit and money management.
The Other Side of The Coin
David Harding’s quote (“If you put in stops and run your profits and trade randomly you make money; and if you put in targets and no stops, and you trade randomly you lose money. So the old saw about cutting losses and running profits has some truth to it.”) was really two-sided. The previous post looked into the first part of the quote with random entries and trailing stops. Let’s now look at the other part of the quote with random entries and profit targets.
The overall concept of the system is identical to the one tested in the last post: entries in random directions every time a position is closed, with a fixed fractional money management system over a portfolio of diversified futures. The only difference has to do with exits, which are now triggered by a volatility-adjusted take-profit order. At the time of trade entry, the ATR is calculated as a measure of volatility and a limit order is entered at a distance equal to a multiple of the ATR value.
As the test contains a random element, I ran several hundreds of them in order to average them to detect a “central tendency”. The ATR-multiple also stepped through different values from 2 to 10, each of these being run 200 times to generate 1,800 tests in total.
Well, David Harding seems to be proven right again as the average performance of these 1,800 runs generated a near 85% loss over the 20 years of the back-test (and this is excluding commissions – more on that later).
I have run other tests and generated one chart comparing all outcomes. The “Random Entries with Target Profits” equity curve is plotted on that chart further below.
Note that the Win ratio for this system with Profit Targets comes close to 95%. This is logical: all winning trades are exited when they hit their target profit but losing trades are never exited (except at the end of the test); this shows that focusing on single stats like this one can be misleading (how many times do you hear market gurus claiming 90% accuracy rate?).
I decided to “hire another monkey” to help with another instance of a random system: random entries and random exits.
My first monkey is still in charge of “tossing a coin” to decide of the direction of each new trade, but instead of having a deterministic exit, the second monkey decides randomly of the duration of each trade: monkey picks 69 and the system holds the position for 69 bars. I did assist the monkey a bit, by giving him some “hindsight bias”, so that the average trade duration was roughly equal to the trade duration of the systems in the “Random Entries, Trailing Stops” scenario (for example 13 days for 2xATR, 63 days for 5xATR or 220 days for 10xATR).
This is a very random system, which can go either short or long, and we would therefore expect for it to perform neutrally when tested without any trade frictions. And this is exactly what happens. Check the chart further below: the equity curve is a near flat-line. This goes some way to prove that averaging the results of 1,800 runs with random trading logic does generate a result close to the theoretical/expected result. And we can clearly see the impact of a trailing stop exit (positive) and a profit target exit (negative) compared to a full random system.
Retiring the Entries Monkey
Some readers did comment on the last randomness post, pointing out that entries were as important as exits and such good results could also be obtained with random exits and “good entries”. This was my next test: using a standard Moving Average cross-over for entry generation, I left my “exit monkey” in charge of exiting the trades after a random period of time (again, with the help of hindsight, so that the average trade duration for this random system was similar to the equivalent MA cross-over system). Note that the system only entered on the actual cross-over of moving averages (i.e. when a position exits, the system waits for the next cross-over instead of re-entering in the direction of the moving averages).
The system only returned 64% over 20 years, with relatively high volatility, not really displaying more than what could be described as “random oscillations”. Replacing random entries with MA cross-over entries can not conclusively be said to have improved the system, as the signal-to-noise ratio is too high to assert whether the positive performance of MA entries is significant or not.
MA Entries with Profit Targets
Another way to compare random and MA cross-over entries would be to take the “random entries with profit targets” system and replace the entry generation by a moving average cross-over. This is the next (and final) test in this post.
The MA Entries with Profit Target Exits system variation performs very similarly to the one with random entries, even performing slightly worse, by losing more than 90% over the time span of the back-test (20 years). Again not a strong evidence for the superiority of MA entries over random entries.
Putting it All Together
Below is the chart of each of the 5 scenarios tested, exhibiting a wide variation in results obtained.
|Random Entries / Trailing Stops||
|Random Entries / Random Exits||
|Random Entries / Profit Targets||
|MA Entries / Random Exits||
|MA Entries / Profit Targets||
Some pretty clear trends in there. Note that the Drawdown figures are calculated on a monthly basis. Drawdowns based on daily performance would therefore be larger, as mentioned in this post, discussing a short Drawdown paper by David Harding.
Of course, it is not possible to generalise the results of these findings. The entry logic chosen for these tests for example is specific and some other entry logic, with a different average trade duration might have yielded different results.
This was indeed the case in some previous tests discussed on the Trading Blox forum (thanks to Pumpernickel for pointing these threads out in the last post comment), where similar discussions/tests took place. The results found there seemed to indicate profitability for Trend Following entries and random exits (with a slightly different logic) and even some random entry/exit combination (different logic from above again: direction of positions were not random). Check these two threads for more info and results.
Note on averaging and result normalization
Because most of the tests involved some random logic, I deemed it necessary to run a fairly large sample for each case in order to average the results and obtain an overall tendency.
Some readers have pointed out that averaging the results hides the distribution of the outcomes and might hide the fact some the average performance is skewed by some outliers.
These are valid points to raise, which I want to address by displaying the shape of the distribution of CAGR for all instances of the “Random Entries with Trailing Stops” system (with a 2-ATR stop).
There is of course some variation around the average (average CAGR = 17.03% with a standard deviation of 4.96%), but I feel the average is still a good indicator for the central tendency of the system concepts being tested here. I actually decided to check this by estimating the statistical significance of this result by using the bootstrap method. With the null hypothesis that the average return is zero, the p-value for obtaining an average of 17.03% is actually 0.00 (100,000 resamples).
The other aspect of this comparison test is the normalization of results: every family of tests was normalized so that the standard deviation of the monthly returns was identical for all scenarios, allowing for a better, apples-for-apples comparison.
Notes on Slippage and Commissions
I usually do not include trade friction on the tests published on the blog, one of the reasons being to avoid making assumptions on commissions and slippage amounts, which are variable for every trader based on size, broker, market, etc. (and which can definitely have a non-negligible impact as previously discussed in here and here).
So, I usually prefer to leave this out of the equation (at the risk of making the “raw” results less realistic) and let the readers interpret the results based on their friction costs assumptions. Moreover, we are not really testing a system here, we are using a system back-test to check the impact of entries and exits.
Nevertheless, I have re-run the “Random Entries with Trailing Stops” system including commissions ($10 per contract) and slippage (5%). Of course, these extra costs have an impact: the CAGR drops from 16.14% to 10.16%, as can be seen in the chart below:
And here are some additional figures that should help estimate trading costs:
|System||Round-Turns per Million||Average Trade Duration|
|Random Entries / Trailing Stops||
I hope this (long) post has clarified some points/questions raised from the last “randomness” post. If not, we can always continue the discussion in the comments section…