Sunday, May 15, 2011

Meta-Trader - Coatl Review - Part 2

Welcome back Meta-Traders.

Here is part 2 of my review of Coatl from Asirikuy. This review won’t make a lot of sense unless you read part 1, so if you need a refresher, go back and read part 1 here.

When we left off on part 1, we had a broad sense of what types of values were being optimized, but were only starting to wrap our heads around the size of the decision space. The spreadsheet on the left shows each if the items optimized by COATL and how many choices are considered for each item.

Broadly, here are the items optimized:

- Stop Loss values as a percent of the ATR (choose 1 of 11)
- Logic used for system entry (choose 1 of 18)
- Logic used for system exit (choose 1 of 18)
- Symmetry values for indicator levels for position entry (choose 1 of 9)
- Symmetry values for indicator levels for position exit (choose 1 of 9)

Daniel cuts down considerably on the size of decision space by using “symmetry” values for indicator levels. Symmetry values range between 50 and 90 and for upside crossovers constitute a cross of the actual value (say 80) and for downside crossovers are 100 minus the values, for example 100 minus 80 or 20. This clever use allows both upside and downside values to be optimized in one pass. It also ensures that indicator interpretations are symmetrical, hence the name.

Anyway, when we multiply the number of choices for all the items together, we end up with a decision space of 2.41E * 10^16. Written out in long form, that is 240,000,000,000,000,000 or 240 quadrillion possible combinations. When dealing with numbers that big, you can easily see why scientific notation is required. We don’t see numbers that big in the grocery store (or our bank accounts) but we see them in science and engineering.

To get a sense of what a difference the genetic algorithm makes, I started an optimization without the genetic algorithm box checked, and the system estimated it would take about approximately 795,000 hours. With 24 hours in a day, that comes to 33,125 days and with 365 days in a year, that’s about 90 years! Thus, without the genetic algorithm, it would take a lifetime to optimize just 1 pair! When the genetic algorithm box is checked, the optimization time is reduced to just over 5 hours!

Once you put in the 5 hours optimizing, all the work is done, right? Wrong, now you have 1000’s of optimization results to wade through to find the best choice. If you think this is easy, think again. What you end up with is a “Sparse matrix in Euclidian Space”.

Humans are pretty good at visualizing 2 and 3 dimensional spaces. Once you get beyond 3 dimensions what you get is a “hyper-cube” or a cube with N dimensions. In this particular case, you have a hyper-cube with 15-dimensions.

Meta-Trader helps you handle this challenge in a few different ways:

- MT4 discards the unprofitable results and only keeps the ones that turned a profit. With the 2.4*10^16 choices, the system came up with about 6,000 profitable combinations when optimizing on EUR/USD.

- MT4 shows a running graph of profitable outcomes with instances on the X-Axis and Profit returned on the Y-Axis. Neighboring results are usually nearby in Euclidean space on at least one dimension.

- In the same space as the graph, you can also show a 2-dimensional surface map which shows profitability as a shade of green at the intersection of 2 axis values. The deeper the shade of green, the more profitable.

Using that last feature, you can get an idea of what parameters values are producing profitable systems at the intersection of 2 sides of the hyper-cube. Obviously, you want to find a set of parameter values that are within a broad area of profitability that won’t fall into an area of unprofitability with a small shift it the market.

Overall, trying to interpret this data is one of the most interesting challenges I have come across in the amazing field of Forex trading. Also, I have to think this is one area where Meta-Trader comes up a bit short. I have screen shots from Wealth-Lab where you can fly through a 3-dimensional representations of optimization results. Even so, Meta-Trader is a pretty amazing tool, especially considering the fact that it’s totally free!

Hard as this challenge is, Daniel makes it easier by coming up with a set of parameter that he thinks perform best for each pair. In the case of EUR/USD, all 3 embedded systems use normal MACD crossover for entry, and a combination of long and short-term RSI crossovers for exit. And while on the topic of EUR/USD, let’s take a look at the performance of Daniel’s selected parameters for EUR/USD versus the other systems on Asirikuy. Why EUR/USD? Because it’s the most liquid, has the narrowest spread, and is a good basis for comparison with other systems on Asirikuy.

For a 10-year back test, and 100K invested and a risk unit of 1.0 per trade, 100K grew to about 415K. This comes to about a 13.82% return, but maximum drawdown is nearly 60% - clearly not among the best systems on Asirikuy for EUR/USD on a risk to reward basis. Clearly the risk would have to be dialed down and combined with other pairs and systems to get a more tradable result.

And that’s where the system really starts to shine - on a portfolio basis. There’s a lot to talk about there, so check back next week for the last and final part of my review of Coatl.

4 comments:

  1. Hey Chris,

    I hope things are well with you. I wanted to ask you if you have had any troubles while trying to back test some of Daniel's EA's. I don't know if it is me but I get results with 0 trades and no errors to help me understand what is happening. I have been trying to test on the weekend and Daniel's spread changer program seems to work well, but I don't know if the clock library is not functional over the weekend or what. I have searched through the videos on Arisuky but have a hard time finding the information I am looking for. It would seem all I would have to do is change the trading mode to testing and it should work...
    Anyway, I wanted to ask if you had anything special you did to get things to work.

    JT

    PS: if you want to, you can yank my zulutradetop reference from your blog. I wouldn't be offended if you did. I don't plan to post much on that anymore. I think I proved my point there and at the same time found no one really cares to listen.

    ReplyDelete
  2. JT-

    Hi and thanks for the comment.

    Regarding backtesting, you have to use a starting balance of $100,000 to get the back tests to work. The other thing is to set Operations Mode to 2 - testing. That should be all you need to get it working. Even with that, you need to use Alpari US Demo, since the default data that comes from MetaQuotes is not very good quality. And you have the weekend spreads problem. Given all that, Backtesting is a pretty big pain and not worth the effort if you can avoid it.

    The reason I say that is because Daniel provides clean back-tests for all his systems hich you can download as a ZIP file. Then you can load them into the portfolio analyzer, and see how they run when combined together and risk re-balanced.

    The only exception I would say is the Coatl Portfolio, where they are are a lot of good settings, and i'm not even 100% convinced that the settings that Daniel picked are the best. It also brings up the option of running multiple Coatl portfolios, with different settings. There's no shortage of possibilites.

    Regarding your blog roll, i'll find another more active blogger and fill it in.

    Thanks for reading,

    Chris

    ReplyDelete
  3. Thanks for the info Chris.
    I typically like to use 10K in my back tests (something a little more realistic to my finances). I'll have to try the 100K setting. I have been using the alpari UK data (downloaded on MT4, I should probably do the direct download). Daniel has a bunch of tools that I have not even had time to look into. I typically, when I get time, end up playing around with my systems :).

    I am interested in running Coatl, but some demo forward testing shows that 3 trades are open and remain open for some time. I don't think this would work with the FIFO rule or no hedging rule. I am also interested in doing the Atipaq.

    Thanks

    JT

    ReplyDelete
  4. JT-

    The 100K requirement only applies to the back test. You can go live with as little as $1000 or $100 for a 'cent' account.

    Coatl is definitely not NFA compliant, but we can work around that with FXDD which has a back-office solution. I'll have more to say on that with my COATL Part 3 review this weekend. Atipaq is doing great and is now leading the pack up 40% for the year! More on that Friday as well.

    Take care bud,

    Chris

    ReplyDelete