<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Mechanical Forex</title>
	
	<link>http://mechanicalforex.com</link>
	<description>Trading in the FX market using mechanical trading strategies</description>
	<lastBuildDate>Sun, 19 May 2013 13:48:28 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/MechanicalForex" /><feedburner:info uri="mechanicalforex" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Developing System Generation with Endless Potential: Implementing Custom Inputs in Kantu</title>
		<link>http://feedproxy.google.com/~r/MechanicalForex/~3/g0GX9-QIQwA/developing-system-generation-with-endless-potential-implementing-custom-inputs-in-kantu.html</link>
		<comments>http://mechanicalforex.com/2013/05/developing-system-generation-with-endless-potential-implementing-custom-inputs-in-kantu.html#comments</comments>
		<pubDate>Fri, 17 May 2013 05:02:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Kantu]]></category>
		<category><![CDATA[system design]]></category>

		<guid isPermaLink="false">http://mechanicalforex.com/?p=3552</guid>
		<description><![CDATA[During the past few months I have been working on the Kantu trading system generator, a program which allows any trader to generate trading strategies that have some desired historical results. Up until now the program has achieved many of the initial goals I had in mind but a key factor that limits the applicability [...]]]></description>
				<content:encoded><![CDATA[<p>During the past few months I have been working on the Kantu trading system generator, a program which allows any trader to generate trading strategies that have some desired historical results. Up until now the program has achieved many of the initial goals I had in mind but a key factor that limits the applicability of this program is the limitation in the inputs (in number and description) used to generate trading rules that deliver trading strategies. Right now Kantu uses only the OHLC values of bars and through simple comparative operators creates simple or complex price patterns that generate a desired historical performance result. In order to expand the scope of this program I decided to carry out an extensive addition to the software that will soon allow traders to add custom inputs and generate systems through a potentially limitless system generation paradigm. On today&#8217;s post I want to talk a little bit more about how I implemented this and why it adds so much power to the Kantu trading software.</p>
<p>The initial idea surrounding Kantu &#8211; to use parameterless price patterns to generate strategies &#8211; allows us to come up with a lot of trading systems that may generate satisfactory historical results across several financial instruments but the truth seems to be that the scope of these patterns limits the possible trading solutions that can be found across the board. The main limitation is that the patterns only use OHLC information and derive patterns through an addition of rules of the form [1] (&gt;&lt;) [2] where [1] and [2] are a choice of the open, high, low or close of any given candle available for selection. In order to expand the potential of the program it is necessary to allow the software to generate rules that go outside of this &#8220;box&#8221; by giving the program freedom to generate rules in another manner. This does not mean that you will go outside of the parameterless price pattern model, but that you will consider other possible choices. For example you could also potentially run comparisons between a candle&#8217;s middle value (middle distance between high and low) and the OHLC values, and in this manner you can generate other potential patterns that do not rely on OHLC values.</p>
<p>-</p>
<p style="text-align: center;"><a href="http://mechanicalforex.com/wp-content/uploads/2013/05/5-16-2013-11-50-48-PM.png"><img class="aligncenter  wp-image-3553" alt="5-16-2013 11-50-48 PM" src="http://mechanicalforex.com/wp-content/uploads/2013/05/5-16-2013-11-50-48-PM.png" width="519" height="261" /></a></p>
<p>-</p>
<p>When this became apparent I decided to implement some additional rules, but after some coding it became obvious that I couldn&#8217;t code everything that users might want to use. Since Kantu already implements a powerful back-tester it also seemed unreasonable to limit the scope of the software, given that some users might also want to use things such as traditional indicators or some other type of pattern that requires some limited parameterization, such as the definition of VSA patterns, harmonic patterns, etc. In order to comply with this I modified Kantu to be able to use any type of custom input, so that users can add the inputs that they desire into the software so that they can generate systems that perform comparisons with whatever data they want. The new feature extension for Kantu allows a user to add any input to the software and generate systems that use rules based on these inputs to achieve the desired historical results. <strong>It is also important to note that this functionality is completely independent from the previously implemented features, the user can decide whether to use the regular price-pattern generation technique or the new custom inputs when loading data</strong>.</p>
<p>The process to do this is fairly simple. When creating data to import into Kantu &#8211; either through MT4 or through the F4 framework &#8211; the user can add whatever variables he wants to use for strategy creation within the file. For example if I wanted to use the middle point of a bar as an additional input I would simply add it as an additional column to the csv that contains the data. In order to make this process as error-free as possible I can simply add an additional parameter to the code that creates the csv file so that my input for each bar is also saved for the whole array. In The F4 framework the csv file is saved using the RecordBars EA, with this code that saves time and OHLCV values:</p>
<blockquote><p>fprintf(fp,&#8221;%s, %lf, %lf, %lf, %lf\n&#8221;,timeString, open(1), high(1), low(1), close(1));</p></blockquote>
<p>If I want to add the middle point, I would simply add an additional column to the csv:</p>
<blockquote><p>fprintf(fp,&#8221;%s, %lf, %lf, %lf, %lf, %lf\n&#8221;,timeString, open(1), high(1), low(1), close(1), (low(1)+(high(1)-low(1))/2));</p></blockquote>
<p>In this line the (low(1)+(high(1)-low(1))/2) defines the middle point of the bar which we are saving as an additional column. In this same manner I can save anything I would want to use, the average volume, the body as a percentage of the ATR, the candle range, etc. I can also have things such as the body/range ratio or even indicators such as the MA, MACD, etc. <strong>I could even add the OHLC of another pair to use multiple pairs for system generation!</strong> In fact there is absolutely no limit to the nature or amount of variables I can add. I could add 50 columns with 50 different inputs and the software can then use these inputs to generate strategies. As a matter of fact I could even add fixed constants if I want to make sure that I will be able to generate systems that make some fixed comparison such as RSI(20) &gt; 50. One of the few limitations is clearly that &#8211; since Kantu doesn&#8217;t know the nature of the inputs &#8211; it cannot automatically generate code for the systems but pseudo code is generated as showed on the image above (full code generation is only possible right now for the price pattern functionality).</p>
<p>With this coding addition the scope of Kantu becomes limitless in the sense that the user can now use any given input to generate trading strategies, the limitations on the inputs &#8211; such as ensuring them to be parameterless &#8211; are the sole responsibility of the user and the software simply finds strategies with some requested historical performance that use the data that has been included within the loaded data file. My idea with this release will be to provide Kantu users with an increased ability to create strategies with whatever inputs they may desire to use. This may also shine some light into the differences between indicators/price action based systems and the differences between different types of indicators. <strong>I would also like to point out that all testing functionality &#8211; genetic search, walk forward analysis, fixed quota, IS/OS study, etc &#8211; is also available when using custom inputs.</strong></p>
<p>This release is currently on the works and will be released before next Monday. If you would like to learn more about system generation and how you too can create trading systems using software please consider joining <a href="http://www.asirikuy.com/join.htm">Asirikuy.com</a>, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general . I hope you enjoyed this article ! :o)</p>
<p>&nbsp;</p>
<img src="http://feeds.feedburner.com/~r/MechanicalForex/~4/g0GX9-QIQwA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mechanicalforex.com/2013/05/developing-system-generation-with-endless-potential-implementing-custom-inputs-in-kantu.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://mechanicalforex.com/2013/05/developing-system-generation-with-endless-potential-implementing-custom-inputs-in-kantu.html</feedburner:origLink></item>
		<item>
		<title>Not all trading system drawdowns are created equal: Extracting all potential worst cases from Monte Carlo simulations</title>
		<link>http://feedproxy.google.com/~r/MechanicalForex/~3/AFWBPq6xoVw/trading-sys-drawdown-monte-carlo.html</link>
		<comments>http://mechanicalforex.com/2013/05/trading-sys-drawdown-monte-carlo.html#comments</comments>
		<pubDate>Thu, 09 May 2013 15:05:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[system evaluation]]></category>
		<category><![CDATA[trading strategies]]></category>

		<guid isPermaLink="false">http://mechanicalforex.com/?p=3543</guid>
		<description><![CDATA[One of the most robust ways of evaluating if a strategy is still behaving according to its historical distribution of returns is to perform Monte Carlo simulations that allow you to find out the trading scenarios where your strategy is behaving in a manner which is outside of its predicted statistical behaviour. In a Monte [...]]]></description>
				<content:encoded><![CDATA[<p>One of the most robust ways of evaluating if a strategy is still behaving according to its historical distribution of returns is to perform Monte Carlo simulations that allow you to find out the trading scenarios where your strategy is behaving in a manner which is outside of its predicted statistical behaviour. In a Monte Carlo simulation you run thousands of trading scenarios that align with the same distribution of returns obtained from long term back-tests and from these trading scenarios you can analyse the worst result; deriving a worst-case scenario that allows you to stop your strategy within a specific confidence interval. For example I may find from a 100K iteration Monte Carlo simulation &#8211; using the 15 year back-testing results of my strategy &#8211; that the probability of my system going through a 20% drawdown within the next 10 years is 1 in 100K if the system statistics remain intact. This means that if I reach a 20% drawdown within the next 10 years I can discard the strategy with a 99.999% confidence level that it&#8217;s statistical characteristics are now different.</p>
<p>However this use of the Monte Carlo simulation is very simple and it is limited in the sense that you are only stopping strategies along one of the many possible worst case scenarios. But what do I mean by &#8220;many&#8221; worst case scenarios? Well, the scenario I described above talks about a <em>convergent Monte Carlo simulation</em>, where we are looking at the absolutely worst case that can arrive as the number of trades becomes large. This means that no matter how many additional trades we have, the probability of facing a deeper drawdown if the statistics of the system remain constant is close to zero. This is because the simulation already goes beyond the <em>point of guaranteed profitability</em>, a trade number beyond which the system with a positive expectancy will always generate a positive return with a confidence beyond 99.999%. Generating a deeper drawdown than that predicted by a 100K iteration worst case beyond this number of trades becomes extremely hard as this is actually the limit of the trading strategy.</p>
<p>-</p>
<p style="text-align: center;"><a href="http://mechanicalforex.com/wp-content/uploads/2013/05/5-9-2013-9-56-11-AM.png"><img class="aligncenter  wp-image-3545" alt="5-9-2013 9-56-11 AM" src="http://mechanicalforex.com/wp-content/uploads/2013/05/5-9-2013-9-56-11-AM.png" width="540" height="255" /></a></p>
<p>-</p>
<p>What are the other worst cases ? The above scenario allows traders to make a very broad assumption, which is that all drawdowns are created equal. If a trader commits to the convergent Monte Carlo simulation worst case, they are effectively saying that they will wait for this worst case before stopping the strategy, an absolute proof that the strategy&#8217;s long term edge has failed. But can we find proof that the system has failed before we reach the convergent worst case ? The answer is yes and this is something that will allow you to stop a strategy way before it has to reach the much deeper level predicted within the convergent case. The trick here is that we must understand that <span style="text-decoration: underline;"><strong>not all drawdowns are created equal</strong></span> and a smaller drawdown period can constitute a worst case provided that it happens within certain conditions. This means that if your convergent worst case is a 30% drawdown, you might be able to say with a 99.999% that your system has failed at a 15% drawdown, provided that this drawdown happens within some predefined conditions.</p>
<p>How is this so? <em>They key is in the number of trades that it takes you to reach a certain drawdown level</em>. When you carry out a Monte Carlo simulation across a variety of trade numbers that are smaller than the convergent case, you can find out the level of confidence with which you can discard a system after only a few dozen trades. The above image shows you an example of a system where I have carried out simulations across a wide variety of trade numbers and you can see that the Monte Carlo worst cases are different for each case. It is also important to look at the number of iterations below the target drawdown figure that you want to use for discarding (above it&#8217;s been calculated 8%) as this will tell you how confident you can be about discarding your strategy. This is extremely important because a 2 trade MC simulation would tell you that the worst case across 100K simulations is 2 consecutive loses but this doesn&#8217;t mean that the system should be discarded because the probability to achieve this result across the 100K iterations is probably around 50% (meaning that this is just a highly probable behaviour across this trade number).</p>
<p>The analysis for the sample strategy showed above allows me to make predictions for the 20 trade case that show me when the strategy can be discarded. For example if I reach a drawdown of 8% after 20 trades I know that I can discard the strategy with a confidence of 99.9% because the probability that my system would reach a 8% drawdown so quickly are close to zero (0.1%). However note that as the number of trades goes up the probability to reach a 9% drawdown also increases, meaning that if this drawdown is reached after 80 trades I can no longer make this decision because the probability that I am making a wrong call is much higher. In this case I wouldn&#8217;t want to wait till the convergent worst case (around 26-30%) if I can discard my strategy after an only 8% drawdown that happens under the right circumstances. If for my distribution of returns the probability to reach an 8% drawdown after 20 trades already allows me to discard a strategy with a 99.9% confidence, there is no reason to wait for the wider worst case.</p>
<p>-</p>
<p style="text-align: center;"><a href="http://mechanicalforex.com/wp-content/uploads/2013/05/5-9-2013-10-01-28-AM.png"><img class="aligncenter  wp-image-3544" alt="5-9-2013 10-01-28 AM" src="http://mechanicalforex.com/wp-content/uploads/2013/05/5-9-2013-10-01-28-AM.png" width="498" height="222" /></a></p>
<p>-</p>
<p>In summary I want to show you that you can better manage your trading systems if you not only pay attention to drawdown depths but also to the amount of trades it takes to reach a certain drawdown level. If you run Monte Carlo simulations for different trade numbers you can come up with worst case scenarios that will allow you to discard strategies when they &#8220;nose dive&#8221; into drawdown levels that would be close to impossible if their long term distribution of returns was to be preserved. I also want to call some attention to the results of the same system with a game theory money management module (second image), which shows how advanced money management affect the strategies overall results. When using game theory we could discard with smaller worst case scenarios, especially in the short term (20-40 trades).</p>
<p>The above analysis features &#8211; as well as several other enhancements &#8211; are currently being implemented on the Asirikuy Monte Carlo simulation which Asirikuy members will be able to use soon. If you would like to learn more about Monte Carlo simualtions and system analysis please consider joining <a href="http://www.asirikuy.com/join.htm">Asirikuy.com</a>, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general . I hope you enjoyed this article ! :o)</p>
<img src="http://feeds.feedburner.com/~r/MechanicalForex/~4/AFWBPq6xoVw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mechanicalforex.com/2013/05/trading-sys-drawdown-monte-carlo.html/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		<feedburner:origLink>http://mechanicalforex.com/2013/05/trading-sys-drawdown-monte-carlo.html</feedburner:origLink></item>
		<item>
		<title>Designing Forex Trading System Portfolios: Looking at Moving System Correlations</title>
		<link>http://feedproxy.google.com/~r/MechanicalForex/~3/Tj9dgUDGJM4/designing-forex-trading-system-portfolios-looking-at-moving-system-correlations.html</link>
		<comments>http://mechanicalforex.com/2013/04/designing-forex-trading-system-portfolios-looking-at-moving-system-correlations.html#comments</comments>
		<pubDate>Thu, 25 Apr 2013 04:13:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[portfolio trading]]></category>

		<guid isPermaLink="false">http://mechanicalforex.com/?p=3533</guid>
		<description><![CDATA[The need for system portfolios in trading is a real no-brainer. The efficacy of an edge can deteriorate with time and therefore the use of different systems that hedge and compliment each other seems to be necessary to increase profitability and reduce risk. However the problem with portfolio building comes from the fact that it&#8217;s [...]]]></description>
				<content:encoded><![CDATA[<p>The need for system portfolios in trading is a real no-brainer. The efficacy of an edge can deteriorate with time and therefore the use of different systems that hedge and compliment each other seems to be necessary to increase profitability and reduce risk. However the problem with portfolio building comes from the fact that it&#8217;s always done with hind-sight. Any combination of strategies that are historically profitable will tend to give better results than a single system and the more you pile up strategies the better the results you will get. This means that you&#8217;re encouraged to maximise your margin usage because you will almost always get an advantage in historical testing from doing so. On today&#8217;s post we will be discussing some of the real life issues that arise from these problems and how we can arrive at potentially better portfolios by building portfolios based on moving window correlation. The concept of moving correlations allows us to see how the relationship between strategies changes with time and whether any observations are simply fortuitous or reflective of a strategy&#8217;s nature.</p>
<p>What is the problem with the creation of portfolios ? Let us suppose you have two systems, A and B. When you simulate a run of A+B you get much better results than when you trade A or B on their own but you are unsure if you should put them together for live trading. However you decide to go forward and trade them live but suddenly you hit a drawdown period where both A and B tank and you are left with a reaching of your statistically determined worst case scenario, without knowing what went wrong. Why was your decision to put A and B together wrong if your back-testing results show you that it made perfect sense, the results were in fact better &#8211; and the risk was supposedly less &#8211; than when you traded them apart! In order to understand why things went wrong and why the choice to run A+B together wasn&#8217;t justified we first need to understand what makes systems give better results when simulated as a portfolio under historical testing.</p>
<p>-</p>
<p style="text-align: center;"><a href="http://mechanicalforex.com/wp-content/uploads/2013/04/4-24-2013-10-52-17-PM.png"><img class="aligncenter  wp-image-3535" alt="4-24-2013 10-52-17 PM" src="http://mechanicalforex.com/wp-content/uploads/2013/04/4-24-2013-10-52-17-PM.png" width="387" height="282" /></a></p>
<p>-</p>
<p>If A and B are both profitable during your back-testing results, then it is obvious that the profits of A and B will be additive since both of them are &#8211; in the end &#8211; going to generate profits. However the drawdown periods from A and B will most likely not perfectly match and therefore you will see that your maximum drawdown periods will &#8211; with a very high probability &#8211; drop to a smaller value. So you have added a lot of compounding power (additive profits) but your drawdown has dropped due to the misalignment of drawdown periods. Results for portfolios of historically profitable systems will always be better than the individual systems due to the above reasons. You need to look for something beyond the simple improvement in trading statistics to be able to judge if A and B should belong together or if they should stay apart. But what makes this difference?</p>
<p>One possible answer: study system correlations.  Correlations measure the way in which the results of a strategy are associated with the results of another, whether a 2% profit on system A is likely to cause a 2% profit/loss on system B. If system A makes 1% and system B always also makes 1% then the correlation coefficient between the two is 1 while if the opposite happens, A makes 1% and B loses 1%, then the correlation coefficient is -1. However you shouldn&#8217;t study the correlations of system results as a whole but you should calculate the moving window correlation of some return figure (correlation for the past X monthly returns) and see how it evolves through a long term (10+ year test). This will give you an idea of how stable the relationship between the strategies is and therefore how likely it might be in the future for the strategies to correlate and drag you into a deep drawdown. If your systems are always negatively correlated then there is a big chance that there is a causal link that prevents drawdown alignment and therefore it would be a safer bet to trade A+B. Note that correlations between systems will never be negative &#8220;all the time&#8221; because they sometimes align in times of profit! It is also important to see when positive correlations have happened (whether they align with loses or profits).</p>
<p>So what should you look for? The images in this post show you several examples of system correlations. In all cases A+B give better results than either A or B traded alone but in some cases it is clear that the correlations imply that the systems should not be traded together. The first image shows the 48 moving monthly return Pearson correlation coefficient for two trend following strategies on the EUR/USD, since both strategies tackle similar market phenomena they show a very high positive correlation through the entire test (they only have a two month period of slightly negative correlation!). Although the results of A+B are better than A or B we should not trade these two systems together because it is obvious that they have a tendency to work in the same way and therefore the probability that they will align and kill the account when they fail is quite high. It is evident that systems that are designed with poor regard to correlation tend to have worse robustness because the strategies are hard-wired to tackle similar market phenomena.</p>
<p>-</p>
<p style="text-align: center;"><a href="http://mechanicalforex.com/wp-content/uploads/2013/04/4-24-2013-10-56-18-PM.png"><img class="aligncenter  wp-image-3534" alt="4-24-2013 10-56-18 PM" src="http://mechanicalforex.com/wp-content/uploads/2013/04/4-24-2013-10-56-18-PM.png" width="450" height="323" /></a></p>
<p>-</p>
<p>Take a look at the second image I have posted. This image shows you a counter-trending strategy coupled with a trend-following strategy on the EUR/USD. The strategies have a much better hedging relationship and you can see that correlations are largely negative through a very big portion of the test. The positive portions you see correspond to profitable periods and &#8211; even then &#8211; the magnitude of these correlations is quite small (less than 0.2). You could therefore infer that the probability that these two systems will align within a significant drawdown phase is much smaller because the very nature of the strategies suggests that they trade in different ways that generate return structures that tend to be negatively correlated. This obviously doesn&#8217;t mean that the systems cannot become heavily and positively correlated in the future but it does mean that the chance of this happening becomes much less significant. The idea here is to pair strategies that are fundamentally different so that &#8220;trading in the same way&#8221; becomes much harder between them.</p>
<p>It is also worth noting that the Pearson correlation coefficient is not very robust to outliers (assumes a normal distribution) and therefore it&#8217;s not the best idea to use the simple monthly returns to calculate it. It is therefore useful to use variants of the monthly return that can be treated via logarithmic transformations (as Fd has suggested within our community) to generate normal distributions. When working with the regular monthly return (non-normal) the Spearman correlation coefficient might be more accurate (as it is more robust to outliers and makes no assumption about normality).</p>
<p>Last but not least, I would like to thank Fabio &#8211; an Asirikuy member &#8211; who pointed me in the direction of some material that suggested the use of correlation windows as a tool to enhance the building of trading portfolios (so this is definitely not a new thing). This is certainly a useful tool that makes the building of portfolios that are &#8220;very likely to fail&#8221; much less likely. Of course, if you would like to learn more about trading systems and portfolio building  please consider joining <a href="http://www.asirikuy.com/join.htm">Asirikuy.com</a>, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general . I hope you enjoyed this article ! :o)</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<img src="http://feeds.feedburner.com/~r/MechanicalForex/~4/Tj9dgUDGJM4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mechanicalforex.com/2013/04/designing-forex-trading-system-portfolios-looking-at-moving-system-correlations.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://mechanicalforex.com/2013/04/designing-forex-trading-system-portfolios-looking-at-moving-system-correlations.html</feedburner:origLink></item>
		<item>
		<title>Machine Learning in Trading: Differences between higher and lower time frames</title>
		<link>http://feedproxy.google.com/~r/MechanicalForex/~3/NCTpOlGGvcU/machine-learning-in-trading-differences-between-higher-and-lower-time-frames.html</link>
		<comments>http://mechanicalforex.com/2013/04/machine-learning-in-trading-differences-between-higher-and-lower-time-frames.html#comments</comments>
		<pubDate>Tue, 16 Apr 2013 14:24:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[machine learning]]></category>
		<category><![CDATA[system design]]></category>

		<guid isPermaLink="false">http://mechanicalforex.com/?p=3525</guid>
		<description><![CDATA[About two years ago I started my journey into the development of trading systems using machine learning techniques, particularly neural network based systems using the FANN (Fast Artificial Neural Network) library. However after the development of several systems, including successful implementations using both direct price information and image processing (reading directly from charts) I then [...]]]></description>
				<content:encoded><![CDATA[<p>About two years ago I started my journey into the development of trading systems using machine learning techniques, particularly neural network based systems using the FANN (Fast Artificial Neural Network) library. However after the development of several systems, including successful implementations using both direct price information and image processing (reading directly from charts) I then decided to explore other machine learning techniques that were potentially faster and more powerful than neural networks in the prediction of financial time series. Following several articles by Belo and Barbosa &#8211; mentioned along my previous posts about machine learning &#8211; I started to develop ensembles of different machine learning techniques, studying the differences between them and how they were affected by inputs, outputs, etc. Today I want to talk a little bit about the big differences in building a machine learning technique for the higher and lower time frames and why the lower time frames represent a much larger challenge than the higher ones.</p>
<p>When you develop a machine learning technique for trading you are generally searching for a method that allows you to predict a given outcome that translates directly into an inefficiency (a net positive, long term monetary gain for you). This means that you will generally attempt to predict both the future direction of price and its magnitude, so that you can get a good idea of how much money you will be able to make if your prediction is right. My approach has generally been to attempt to predict the direction/magnitude of the next bar in a price series and this can be quite successful for the higher time frames with the appropriate input/output structures. The reason is simply that the daily time frame bars are large and therefore the movements within them are easier to predict than the movements within a lower time frame, which are inherently more random. Applying this simple methodology &#8211; attempt to predict the next bar(s) &#8211; leads to huge failure along the lower time frames and therefore this technique is limited to only higher time frames (but even then it&#8217;s likely to be sub-optimal).</p>
<p>-</p>
<p style="text-align: center;"><a href="http://mechanicalforex.com/wp-content/uploads/2013/04/4-16-2013-9-05-10-AM.png"><img class="aligncenter  wp-image-3527" alt="4-16-2013 9-05-10 AM" src="http://mechanicalforex.com/wp-content/uploads/2013/04/4-16-2013-9-05-10-AM.png" width="362" height="273" /></a></p>
<p>-</p>
<p>Looking at the way in which regular trading systems are developed &#8211; through mathematical expectancy analysis &#8211; it soon becomes clear that <strong>when you develop a system using machine learning you should aim to look for trade entries that have a high chance of success towards a predefined profit target and position holding time</strong>. This means that you shouldn&#8217;t train a system in order to learn if the next hourly bar (or the next ten or twenty or fifty for that matter) will be bullish or bearish but you will simply train it to give you an idea of whether &#8211; if you had entered a trade on that bar &#8211; after X time you would have eventually reached your profit target before your loss target (this takes into account the whole price range (high/low) movement). This means that you train your system to distinguish circumstances that lead to favourable movements  within a given predefined maximum holding time, without constraining your strategy to trying to predict the outcome of a particular time period. The inputs used to define the machine learning method are bound to be similar, so the outputs are marking the main difference between this approach and the more basic &#8220;predict if the outcome is bearish or bullish for the next bar(s)&#8221;.</p>
<p>It is no secret that up until now my success in the development of machine learning techniques for the lower time frames has been very limited but I believe that this is precisely due to the above issue dealing with the way in which I have been designing my predictions. Attempting to predict if the net movement for the next bar(s) will be positive or negative leads to very frequent trade entries &#8211; as your machine learning technique tends to predict one or the other &#8211; while having an output that attempts to forecast the success of an actual trade entry (whether you will reach the profit target before the loss target) is something much more in line with what we want as we are directly training the system to reach a predefined trading goal. With this type of output you can trade a clearer probability for trade success or failure while the &#8220;next bar(s)&#8221; prediction does not allow you to take into account the total price excursions but merely a very limited view of the open/close differences of the selected period.</p>
<p>-</p>
<p style="text-align: center;"><a href="http://mechanicalforex.com/wp-content/uploads/2013/04/4-16-2013-9-21-56-AM.png"><img class="aligncenter  wp-image-3528" alt="4-16-2013 9-21-56 AM" src="http://mechanicalforex.com/wp-content/uploads/2013/04/4-16-2013-9-21-56-AM.png" width="528" height="293" /></a></p>
<p>-</p>
<p>This is perfectly in line with the work of Belo and Barbosa and other academics who have postulated that higher time frames are more profitable for machine learning because they seem to be more predictable (have less noise). The issue, as explained above, is most likely related with the way in which they are trying to predict things. Certainly it is extremely difficult to predict the outcome of the next 15 minute or 1 hour bar while predicting the outcome of the next daily bar is much easier, the reason is that the daily bar is simply much bigger and therefore its movement represents overall market phenomena much more clearly. The problem here is that you&#8217;re trying to predict the wrong thing. I believe there is no reason why you cannot achieve a profitable 1H system using machine learning, but it seems naive to believe that you can do this by predicting the next 1H bar (which is very difficult) but you should instead predict your chances of success if you entered a trade now and you want to hold it for a maximum of, for example, 10 hours.</p>
<p>My next goal in the development of machine learning strategies will be to tackle the issue of lower time frame machine learning systems using the above mentioned approach. I will first try simple linear/kernel  classifier models that are bound to be much computationally lighter and I will then switch to more advanced models such as neural networks and support vector machines. I have yet to see if the above mentioned technique will be successful in machine learning but my first experiments point to some preliminary success. I also want to know if I can also achieve success without the use of binary classifiers but simply by predicting directly the mathematical expectancy values of a trade taken at a given point in time with a defined holding time. <strong>Do you have any ideas to develop better machine learning systems for the lower time frames ? Do you have any opinion about my proposed design ? Leave  a comment with any questions or suggestions!</strong></p>
<p>If you would like to learn more about machine learning techniques and how you too can use libraries such as FANN and shark to design trading strategies  please consider joining <a href="http://www.asirikuy.com/join.htm">Asirikuy.com</a>, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general . I hope you enjoyed this article ! :o)</p>
<img src="http://feeds.feedburner.com/~r/MechanicalForex/~4/NCTpOlGGvcU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mechanicalforex.com/2013/04/machine-learning-in-trading-differences-between-higher-and-lower-time-frames.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://mechanicalforex.com/2013/04/machine-learning-in-trading-differences-between-higher-and-lower-time-frames.html</feedburner:origLink></item>
		<item>
		<title>The Data problem: Creating a multi-instrument/fundamental historical data engine for Forex Trading</title>
		<link>http://feedproxy.google.com/~r/MechanicalForex/~3/t0rrD55bqFU/the-data-problem-creating-a-multi-instrumentfundamental-data-historical-engine-for-forex-trading.html</link>
		<comments>http://mechanicalforex.com/2013/03/the-data-problem-creating-a-multi-instrumentfundamental-data-historical-engine-for-forex-trading.html#comments</comments>
		<pubDate>Mon, 25 Mar 2013 14:19:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[system design]]></category>

		<guid isPermaLink="false">http://mechanicalforex.com/?p=3509</guid>
		<description><![CDATA[As you may already know, one of my main interests in the development of automated strategies for the Forex market is the development of systems that use machine learning in order to adapt to changes in market conditions. One of the main problems I have when doing this is that &#8211; up until now &#8211; [...]]]></description>
				<content:encoded><![CDATA[<p>As you may already know, one of my main interests in the development of automated strategies for the Forex market is the development of systems that use machine learning in order to adapt to changes in market conditions. One of the main problems I have when doing this is that &#8211; up until now &#8211; I have been limited by the amount of data I can use due to the limitations of the MT4 strategy tester and &#8211; in general &#8211; due to the lack of a wide variety of historical information that I would like to use. Through the following paragraphs we will discuss why this is problematic, what the ideal case would be and the solution I have created &#8211; using the F4 framework &#8211; in order to ensure that I can run back-tests with as much historical data from as many symbols as I want. Hopefully after finishing this work I will be able to have a virtually unlimited data repository that will enable us &#8211; at Asirikuy &#8211; to run machine learning tests using relationships between a wide variety of market instruments.</p>
<p>When I first started my journey in machine learning (ML) &#8211; with neural network strategies &#8211; my first approach was to use data from a given symbol in order to predict its outcome in the future. I was quite successful with this approach on the EUR/USD where I was able to quickly come up with profitable neural network strategies (Sunqu, Paqarin and Tapuy) even being able to create NN strategies that used images in order to learn from the market. However it soon became clear to me that this strategy wasn&#8217;t going to be successful on other pairs. Pairs like the USD/JPY and the GBP/USD didn&#8217;t seem to be predictable merely from the OHLC information from their own time series. By looking at the academic literature on the matter &#8211; although often limited to the accuracy of the ML method and not the actual profit, which is what matters &#8211; I was able to conclude that people who made machine learning approaches for these symbols had often used much more complicated ensembles than simple inputs such as the previous day&#8217;s bullish/bearish bias.</p>
<p>-</p>
<p style="text-align: center;"><a href="http://mechanicalforex.com/wp-content/uploads/2013/03/3-25-2013-9-09-49-AM1.png"><img class="aligncenter  wp-image-3512" alt="3-25-2013 9-09-49 AM" src="http://mechanicalforex.com/wp-content/uploads/2013/03/3-25-2013-9-09-49-AM1.png" width="482" height="187" /></a></p>
<p>-</p>
<p>My view is that a machine learning method created from an over complicated set of expressions derived from a time series, such as a bunch of different indicators, is much less preferable than a method that is able to predict based on much simpler inputs. My experience tells me that these methods are weak and in fact they have never been able to survive the constant re-training tests to which I submit my ML implementations when back/live trading. Of course, this might be something I&#8217;m doing wrong but &#8211; in any case &#8211; I prefer to focus on methods that use simple inputs to make predictions. So why is it relatively easy to achieve success with a symbol such as the EUR/USD while for the USD/JPY and the GBP/USD it is so difficult? This is a question that I have been asking myself for a while as for me it is fundamental to be able to create ML strategies for as many instruments as I want/need.</p>
<p>My first guess, is that we lack enough information. While the EUR/USD daily rates seem to provide enough information as to make successful predictions about the future, the USD/JPY and the GBP/USD do not contain enough information within their own data to predict their future with a decent accuracy. In this case the PCA analysis reveals that the OHLC variables that lead to higher predictability on the EUR/USD do not work very well on these symbols, pointing to the fact that we are missing the data that explains the variability within these pairs. Obviously it is clear that the movements on a single symbol might be related to a bunch of other symbols and fundamentals that represent wider economic conditions and therefore we might find success in the prediction of these instruments by using data that is not their own OHLC.</p>
<p>In order to bypass the limitations of the MT4 back-tester, I have decided to create a module for the F4 framework that will be in charge of acquiring historical data from an external source. By using data from an online source I am able to get at least EOD information from a wide variety of symbols up to the point where it is needed. Since obtaining data outside of the back-tester obviously opens up the possibility for data-snooping (as you could get data for future dates relative to your currently back-tested candle) the data is always queried from the online source such that only data up to the last closed date of the back-test is used (therefore avoiding any snooping by design). By implementing this library we are able to get EOD data from any requested symbol (gold, silver, S&amp;P500, Dow, etc) for the date needed within our back-test. When live-trading the library uses the same procedure in order to obtain data up to the last candle close, giving us the possibility to use the exact same mechanism on both live and back-testing.</p>
<p>-</p>
<p style="text-align: center;"><a href="http://mechanicalforex.com/wp-content/uploads/2013/03/new.png"><img class="aligncenter  wp-image-3510" alt="new" src="http://mechanicalforex.com/wp-content/uploads/2013/03/new.png" width="486" height="272" /></a></p>
<p>-</p>
<p>The possibilities that open up are endless. With the ability to query data for a wide variety of instruments we are able to test machine learning approaches that correlate a wide variety of instruments while still using any front-end we want (MT4, MT5, etc). This means that I can now test whether there is a way to predict the USD/CAD using the EOD of oil futures and I can also look at data from the USD index or the EUR index in order to attempt to predict other pairs. The next step is to also include fundamental data &#8211; by parsing an online source as well &#8211; in order to be able to back-test using correlations between things such as trade balance, interest rate parity, etc. Certainly a true quantitative approach to trading would wrap a whole view of the market, rather than limited predictions based on a single pair&#8217;s own EOD data. This module will open up the possibility to get us exactly there, to enable us to make ML based predictions using a really global ensemble of market data. Image a system &#8211; as showed above &#8211; where the machine learning algorithm is mutated on every bar to actually adapt to the symbols that yielded the most profitable results within the past X bars.</p>
<p>If you would like to learn more about the creation of machine learning strategies and how you too can use the F4 framework to design strategies that use these techniques  please consider joining <a href="http://www.asirikuy.com/join.htm">Asirikuy.com</a>, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general . I hope you enjoyed this article ! :o)</p>
<img src="http://feeds.feedburner.com/~r/MechanicalForex/~4/t0rrD55bqFU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mechanicalforex.com/2013/03/the-data-problem-creating-a-multi-instrumentfundamental-data-historical-engine-for-forex-trading.html/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		<feedburner:origLink>http://mechanicalforex.com/2013/03/the-data-problem-creating-a-multi-instrumentfundamental-data-historical-engine-for-forex-trading.html</feedburner:origLink></item>
		<item>
		<title>Autonomous Forex Trading Agents Using Machine Learning: The Road to True “Set-and-Forget” Algo Trading?</title>
		<link>http://feedproxy.google.com/~r/MechanicalForex/~3/qUOQw4ie1DU/autonomous-forex-trading-agents-using-machine-learning-the-road-to-true-set-and-forget-algo-trading.html</link>
		<comments>http://mechanicalforex.com/2013/03/autonomous-forex-trading-agents-using-machine-learning-the-road-to-true-set-and-forget-algo-trading.html#comments</comments>
		<pubDate>Wed, 13 Mar 2013 20:44:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[system design]]></category>

		<guid isPermaLink="false">http://mechanicalforex.com/?p=3480</guid>
		<description><![CDATA[Every month I usually perform a simple literature search in order to find new and interesting research articles in the field of Forex algorithmic trading. As many of you may know during the past two years I have been very interested in neural networks and what they can achieve in trading but recently &#8211; thanks [...]]]></description>
				<content:encoded><![CDATA[<p>Every month I usually perform a simple literature search in order to find new and interesting research articles in the field of Forex algorithmic trading. As many of you may know during the past two years I have been very interested in neural networks and what they can achieve in trading but recently &#8211; thanks to my friend Fd &#8211; I have expanded this research to include machine learning in a much more general sense. This month &#8211; while performing my literature search &#8211; I found some very interesting examples using machine learning and in particular I have read papers by Rui Pedro and Orlando Belo (links to their papers <a href="http://dl.acm.org/author_page.cfm?id=81100617850&amp;coll=DL&amp;dl=ACM&amp;trk=0&amp;cfid=293420555&amp;cftoken=66752901">here</a>), two guys from Portugal who have developed some really nice research in the area of autonomous Forex trading agents. During the following paragraphs I am going to introduce the concept of autonomous trading agents, what some research has found and why this area of research is quite exciting.</p>
<p>Definitely one of the biggest problems we currently have in trading is the design of a trading methodology.  The problem involves everything from deciding how to design a strategy, to optimizing a system once it is fully coded and then deciding for how long it should be traded and when it should be redesigned or re-optimized. The main problem is that this whole process requires the intervention of a human trader in order to design models, test models and choose how models are being used. Ideally we would want an algorithm that could do everything by itself, an algorithm that could have many models to choose from, select models in a way that works historically and then change the way in which it adapts and trades according to its historical results. We are talking here about a trading implementation that is autonomous and can function without any human intervention, evolving in a way that does its best to guarantee profits under unknown market conditions.</p>
<p>-</p>
<p><a href="http://mechanicalforex.com/wp-content/uploads/2013/03/300px-Bonsack_machine.png"><img class="aligncenter size-full wp-image-3481" alt="300px-Bonsack_machine" src="http://mechanicalforex.com/wp-content/uploads/2013/03/300px-Bonsack_machine.png" width="300" height="251" /></a></p>
<p>-</p>
<p>Is there such a thing? Is there a way to create a true trading robot? The answer seems to be that there is &#8230; at least someone trying :o). Rui Pedro and Orlando Belo have done some extensive research in this area and their approach to the solution of the problem is very interesting. These two guys build their autonomous robots using 3 different pieces that handle different parts of the trading process. The idea is that these parts are able to fully take care of the whole strategy design, decision making and money management aspects of the trading strategy, also evolving trading rules as the market changes and the system needs to adapt.</p>
<p>So how do they do it? The first part of their system is an Ensemble Model that uses several classifiers and regression models in order to draw predictions from the market data. This was very interesting for me because I had never thought about this solution when working with neural networks in the past. Instead of using a single predictive model (for example a neural network) you can use several different types of models that all have different advantages and disadvantages. Within the Ensemble model these guys always include logistic regression models, decision trees, neural networks, etc. In total they have over 10 models within their Ensemble model that are used by the autonomous system to have a variety of &#8220;choices&#8221; to trade the market. How do we go then from these models to making actual trading decisions?</p>
<p>The case-based reasoning system, which is the second layer of the 3 layered model, handles this part of the puzzle. This part of the model takes a look at what the system has experienced in the past according to previous model results and judges what should be traded and what should not be traded. For example if the system sees that in the past when the random forest and RIPPER rule learner predictors agreed and the system followed there was a profit, then it will bet that there will be a profit again this time if the case repeats itself. The case-based reasoning system analyses all the cases that the system has experienced and their outcomes, with the idea to adapt the system as the number of cases evolves. The quality of the predictors might change over time and the case-based reasoning system handles the relevance of the predictors in a way that can derive the best historical results.</p>
<p>The last part of their puzzle is actually a rule-based section where the system can be told things that it isn&#8217;t capable of learning through trading. For example it can be told that the first Friday month is the NFP release or that the trading week should be cut to certain hours (not in hind-sight but to reduce broker dependency for example), etc. This part of the trading model is the least complex as it only includes a bunch of hard-coded rules (that shouldn&#8217;t change) which allow the system to improve its results as this information cannot be derived through the trading data.</p>
<p>The most interesting thing about the above is that these guys built a model for the USD/JPY in 2007, using 2003-2007 data (there is no apparent optimization but this was the data they used to test the model) and then traded this same system live from 2007-2008 achieving results that were comparable with those of the in-sample period (they were less profitable but overall acceptable). Through their 2008 paper they also show some of the ways in which the predictors adjusted to new market conditions, which were not available within the period they used for the design of the autonomous implementation. Interestingly enough the results of the financial crisis and the periods that followed were never published in any paper but during the year 2010 they did release a new paper that described a whole multi-system approach that involved several autonomous systems, each trading on its own currency pair.</p>
<p>-</p>
<p><a href="http://mechanicalforex.com/wp-content/uploads/2013/03/image2s.jpg"><img class="aligncenter size-full wp-image-3482" alt="image2s" src="http://mechanicalforex.com/wp-content/uploads/2013/03/image2s.jpg" width="221" height="228" /></a></p>
<p>-</p>
<p>This  paper was less convincing as it involved different ensembles for the different currency pairs and the inputs of the regression models also involved indicators (which obviously need shift information that is subject to optimization). It is also important to mention that the models were fitted to maximize their individual predictive profits during the in-sample period, showing that the adaptive process was used to yield the best results across a certain set of market conditions. The method used by Rui and Belo therefore has the same disadvantages as a regular NN based system in the sense that the model conditions need to be defined and tested across some given market period. The models can still adapt as market conditions change and the way in which they adapt can in a certain degree be controlled by the case-based model that assigns their lot sizes. They therefore have a fundamentally first degree adaptive technique with some flexibility given by the second model used. The last paper these guys published on the subject &#8211; which talks about an Autonomous hedge fund &#8211; takes the concept even further, developing autonomous systems that trade FX, futures, stocks, etc.</p>
<p>One of the things that Rui and Belo achieved &#8211; which I haven&#8217;t been able to &#8211; is to produce adaptive models that give significantly profitable historical results in currencies besides the EUR/USD. Implementing some of their ideas and improving on several of them will also be part of my check-list for 2013. In order to do this I plan to use the C++ shark open source machine learning library and some imagination :o). If you would like to learn more about the NN systems we have developed and how you too can use F4 to implement your own neural network ideas  please consider joining <a href="http://www.asirikuy.com/join.htm">Asirikuy.com</a>, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general . I hope you enjoyed this article ! :o)</p>
<img src="http://feeds.feedburner.com/~r/MechanicalForex/~4/qUOQw4ie1DU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mechanicalforex.com/2013/03/autonomous-forex-trading-agents-using-machine-learning-the-road-to-true-set-and-forget-algo-trading.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://mechanicalforex.com/2013/03/autonomous-forex-trading-agents-using-machine-learning-the-road-to-true-set-and-forget-algo-trading.html</feedburner:origLink></item>
		<item>
		<title>The Relevance of Back-testing Time: Does a longer, profitable back-test lead to better OS success probabilities?</title>
		<link>http://feedproxy.google.com/~r/MechanicalForex/~3/2_7wMYTEVTI/the-relevance-of-back-testing-time-does-a-longer-back-test-lead-to-better-success-probabilities.html</link>
		<comments>http://mechanicalforex.com/2013/03/the-relevance-of-back-testing-time-does-a-longer-back-test-lead-to-better-success-probabilities.html#comments</comments>
		<pubDate>Tue, 12 Mar 2013 13:51:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[eye openers]]></category>
		<category><![CDATA[system design]]></category>
		<category><![CDATA[trading success]]></category>

		<guid isPermaLink="false">http://mechanicalforex.com/?p=3470</guid>
		<description><![CDATA[Using the largest possible amount of data when back-testing to generate systems that can better accommodate more market conditions is a fairly intuitive and well rooted idea in algorithmic trading. However there seems to be a general lack of quantitative evidence to say whether this is actually the case or if there is an optimum amount of [...]]]></description>
				<content:encoded><![CDATA[<p>Using the largest possible amount of data when back-testing to generate systems that can better accommodate more market conditions is a fairly intuitive and well rooted idea in algorithmic trading. However there seems to be a general lack of quantitative evidence to say whether this is actually the case or if there is an optimum amount of previous market conditions to use that may provide a higher probability of success for out of sample (OS) trading. Since determining how much data to use for the creation of trading strategies is fundamental to the design of a trading methodology, I have decided to run some experiments in order to find out what the best amount of historical data to use for system generation actually is. Through the rest of this post I will show you some of the quantitative evidence I have obtained through my research as well as some of the conclusions I have been able to reach through this analysis.</p>
<p>So how do we find out what the historically optimum in-sample size for system creation has been? The first step is to generate a large amount of profitable and symmetric in-sample systems using different sizes for the in-sample period and then compare their success rate across a fixed out of sample period size. It is also important to distribute this in-sample/out-of-sample pairs randomly across the whole back-testing data in order to avoid the fitting of the results to some particular set of market conditions. For example in order to evaluate the success rate of a 500 day in-sample period I generate 1000 profitable and symmetric systems using randomly selected 500 in sample periods followed by a 365 day out of sample. One test might be from 1992 to 1994 with an out of sample from 1994 to 1995 while another might be from 2005-2007 and then the out of sample from 2007 to 2008. I performed this analysis using in-sample sizes from 100 to 6500 days with a constant out of sample of 365 days. I also performed this analysis on EUR/USD data from 1986 to 2012 (before 2000 using DEM/USD data).</p>
<p>-</p>
<p style="text-align: center;"><a href="http://mechanicalforex.com/wp-content/uploads/2013/03/graph1post.png"><img class="aligncenter  wp-image-3473" alt="graph1post" src="http://mechanicalforex.com/wp-content/uploads/2013/03/graph1post.png" width="437" height="318" /></a></p>
<p>-</p>
<p>The first result we can analyse from the above experiment is the difference between the number of profitable and unprofitable OS periods. Intuitively we would think that the number of systems profitable in the OS would increase as a function of the in-sample size, since more market conditions would allow us to better accommodate the results of the OS period. This happens to a certain extent but it is also true that after a given point the increase of the in-sample size does not lead to a significantly better edge. As you can see in the image above, the number of systems profitable in the OS increases logarithmically as a function of the in-sample see (logarithmic fit in red), this predicts that the increase in your edge as the in-sample size increases will be less significant as your in-sample becomes larger and larger. This hints that the number of market conditions might be convergent to a certain extent, meaning that after a certain point you cannot &#8220;better adjust&#8221; to new market conditions based on past ones because you have already taken into account all the behaviour which is relevant. Note that the error lines show the variability I experienced after doing 10 different runs to account for the random nature of the system generation procedure used by Kantu.</p>
<p>These results also show us that there is a minimum number of in-sample days which is required to reach acceptable results. Systems created using data from less than 500 days are especially unreliable (out of sample edge is almost completely lost) while systems created with more than 3000 days of in-sample data tend to reach similar results. This shows us that there is a bare minimum of information that is needed to gain an edge in the OS while introducing much larger amounts of data only improves this edge slightly. In general this also supports the fact that 3000 days (about 8 years) is the best starting point for system generation. Using more years can give you a further advantage but it doesn&#8217;t seem to be fundamental for success in the OS. This supports our development methodology at Asirikuy, where we have used 9 year periods for system generation and optimization. From this it also seems important to note that there is in fact an improvement of the OS success with the in-sample size so using the largest possible in-sample size you can will confer you an additional advantage &#8211; at least in the case of the EUR/USD &#8211;  even if this is not too great.</p>
<p>-</p>
<p style="text-align: center;"><a href="http://mechanicalforex.com/wp-content/uploads/2013/03/graph2post.png"><img class="aligncenter  wp-image-3472" alt="graph2post" src="http://mechanicalforex.com/wp-content/uploads/2013/03/graph2post.png" width="388" height="289" /></a></p>
<p>-</p>
<p>Another interesting thing to analyse is how the OS profitability varies according to the size of the in-sample period. Obviously we want to have OS periods that are just as or more profitable than the  in-sample (measured as (absolute profit)/(total trades)) so that we can have a smaller probability of being disappointed by our OS performance. The graph above shows you the number of systems with OS profitability higher or equal than the in-sample per trade profitability. As you can see the results are fairly similar to the initial results we discussed &#8211; where we analysed only the net number of OS profitable systems &#8211; showing that the probability to have a profitability higher than the one of the in-sample period is also logarithmic in nature. The probability to have a better OS period &#8211; from a profitability perspective &#8211; also increase with the size of the in-sample period, the probability increases very fast at first, then increasing more linearly as we reach larger in-sample sizes. In contrast with the previous case, the increase of probability here is far more pronounced, hinting that &#8211; although the number of systems profitable in the OS might not increase very much with larger in-sample sizes &#8211; the increase in the probability of having a more profitable OS period &#8211; relative to the in-sample &#8211; is higher.</p>
<p>It seems that the above quantitative evidence supports the design paradigm that suggests the inclusion of as much data as possible in the system generation process. Having more data seems to lead to a higher probability of out of sample success, both from a probability of net profit and a probability to have profits higher than those of the in-sample period. Therefore it would be advisable to always include as much data as possible when generating a strategy because this generates an additional probability to be successful under unseen market conditions.  However it is also worth pointing out that the nature of both studied behaviours is logarithmic, meaning that we should expect convergence of these values towards some tangent as the in-sample size grows much larger. <strong>From the derived logarithmic fits it seems to be that in-sample sizes above 8000 days would give practically no improvement in the expected OS performance.</strong></p>
<p>However the are still a lot of questions to answer about the above. Is this process the same across other pairs? Is this process the same across other markets? How does the out-of-sample size affect these results? These are all very interesting questions that I will certainly continue to research within the next few months :o). If you would like to learn more about system generation and how you too can perform your own research  please consider joining <a href="http://www.asirikuy.com/join.htm">Asirikuy.com</a>, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general . I hope you enjoyed this article ! :o)</p>
<img src="http://feeds.feedburner.com/~r/MechanicalForex/~4/2_7wMYTEVTI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mechanicalforex.com/2013/03/the-relevance-of-back-testing-time-does-a-longer-back-test-lead-to-better-success-probabilities.html/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		<feedburner:origLink>http://mechanicalforex.com/2013/03/the-relevance-of-back-testing-time-does-a-longer-back-test-lead-to-better-success-probabilities.html</feedburner:origLink></item>
		<item>
		<title>The Kantu Project and other tools: To be available for purchase soon :o)</title>
		<link>http://feedproxy.google.com/~r/MechanicalForex/~3/pPXBL-LvI5o/the-kantu-project-and-other-tools-to-be-available-for-purchase-soon-o.html</link>
		<comments>http://mechanicalforex.com/2013/03/the-kantu-project-and-other-tools-to-be-available-for-purchase-soon-o.html#comments</comments>
		<pubDate>Mon, 11 Mar 2013 15:54:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Asirikuy]]></category>

		<guid isPermaLink="false">http://mechanicalforex.com/?p=3466</guid>
		<description><![CDATA[During the past several years I have kept the development of trading tools exclusively inside the Asirikuy community but during the past few months it has become obvious to me &#8211; due to emails from several people &#8211; that some traders are also interested in using our tools without joining our trading community. The reasons [...]]]></description>
				<content:encoded><![CDATA[<p>During the past several years I have kept the development of trading tools exclusively inside the Asirikuy community but during the past few months it has become obvious to me &#8211; due to emails from several people &#8211; that some traders are also interested in using our tools without joining our trading community. The reasons are several, from people wanting to avoid paying a yearly subscription to others who don&#8217;t have the time to study and others who are already professional algorithmic traders who just want to increase their analysis or system design capabilities. In the light of this I have decided to start to externalise Asirikuy tools in order to comply with this market demand that will certainly increase the availability of these tools to others while keeping our learning material and trading implementations available only to those who want to join our trading community. On today&#8217;s post I want to go through the reasons why I have decided this to be the best course of action and how this will be implemented going forward.</p>
<p>I have to say that through the lifetime of Asirikuy I have always received emails from time to time from people who are interested in using our tools without joining our community. People often wrote to me about the APDAT or the Monte Carlo simulator and it seemed to me that joining the community was essential to using this tools as I perceived as irresponsible behaviour to make tools available to people who might not have the knowledge necessary to take advantage of them properly. However during the past few months I received emails from several professional and regular retail traders who made a very good case for the external selling of tools and I have therefore decided to implement their advice and start this externalisation procedure.</p>
<p>-</p>
<p style="text-align: center;"><a href="http://mechanicalforex.com/wp-content/uploads/2013/03/selling.jpg"><img class="aligncenter  wp-image-3467" alt="selling" src="http://mechanicalforex.com/wp-content/uploads/2013/03/selling.jpg" width="315" height="237" /></a></p>
<p>-</p>
<p>One of the best arguments made, which I have come to realise in the past year, is that it is not my responsibility to educate those that do not want to be educated and therefore I should not be overly concerned with the way in which tools are used provided that I voice my concerns about their use properly. Another very important aspect is that making the tools available externally keeps away people who want to buy the tools but who are not interested in learning or in our trading implementations. <strong>Keeping access to our trading strategies and frameworks restricted to those who are interested in learning and contributing in a community environment is fundamental</strong> as those people interested in just access to tools might not take advantage of all the other aspects of our community.</p>
<p>In particular the most important reason why this makes sense is because by keeping everything bundled I feel that I am often making people pay more for the whole package while they could be paying less for just the tools if this is the only thing that they want to use. By joining Asirikuy I provide a learning experience that allows users to become more involved in the learning process and truly understand everything that is going on but I shouldn&#8217;t seek to provide this service to people who are simply not interested in this part of our community. <strong><span style="color: #000000;">Another important argument for sharing some tools is that I want to start sharing revenue with people who have contributed with the coding of some of these implementations within our community. </span></strong></p>
<p>If the programmers involved with each tool are in agreement with the external selling I will make them available through this website through a simple (one time) paypal link. Some tools might be more expensive than others but our analysis tools will most likely be in the 20-150 USD price range. The first tool that will be available through an external purchasing option will be Kantu &#8211; our parameterless price action based system generator &#8211; which will be available for 120-130 USD. There will be a demo version available for this program (everything but code exporting will be available).<strong> It is worth noting that programs with comparable functionality &#8211; such as adaptrade or priceaction lab &#8211; are retailing for a price well above the 1000 USD.</strong> Another advantage is that Kantu will be available for Windows, Linux and MacOS (unlike these other programs).</p>
<p>Purchasers of our tools will also have all minor version updates available for free (bug fixes, etc) and updates to new major releases will be available under a small fee (whether to update is obviously optional).  Obviously all updates are available to Asirikuy members for no additional charge and any manual or document developed for externally available tools will also be available to members of our community. Other aspects of our website &#8211; such as our Alpari data &#8211; might also be available for purchase (although I have to consult my source first). <strong>The Kantu demo and purchase option will be available from this week so stay tuned to learn more about this release :o)</strong></p>
<p><span style="color: #800000;"><strong>If you have any concerns, questions or suggestions regarding this change please feel free to post within the comments, I am certainly eager to read what Asirikuy users and programmers think about this new direction  as well as people who are interested in our tools but not in joining our community :o)</strong></span></p>
<p>If you would like to learn more about trading and how you too can become a better trader through a community approach please consider joining <a href="http://www.asirikuy.com/join.htm">Asirikuy.com</a>, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general . I hope you enjoyed this article ! :o)</p>
<img src="http://feeds.feedburner.com/~r/MechanicalForex/~4/pPXBL-LvI5o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mechanicalforex.com/2013/03/the-kantu-project-and-other-tools-to-be-available-for-purchase-soon-o.html/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		<feedburner:origLink>http://mechanicalforex.com/2013/03/the-kantu-project-and-other-tools-to-be-available-for-purchase-soon-o.html</feedburner:origLink></item>
		<item>
		<title>Trading the EUR/USD from 1999: Studying long term out-of-sample success and in-sample selection</title>
		<link>http://feedproxy.google.com/~r/MechanicalForex/~3/8YOCWqOQYzw/what-if-you-had-had-to-select-a-system-to-trade-the-eurusd-from-2000-to-2012-studying-long-term-out-of-sample-success-and-in-sample-selection.html</link>
		<comments>http://mechanicalforex.com/2013/03/what-if-you-had-had-to-select-a-system-to-trade-the-eurusd-from-2000-to-2012-studying-long-term-out-of-sample-success-and-in-sample-selection.html#comments</comments>
		<pubDate>Thu, 07 Mar 2013 02:00:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[eye openers]]></category>
		<category><![CDATA[system design]]></category>

		<guid isPermaLink="false">http://mechanicalforex.com/?p=3457</guid>
		<description><![CDATA[As many of you may know, my vision of trading does not focus on the next 6 months or 1, 2 years but on achieving profitable trading during the next 10-20 years and hopefully even further. In my quest to develop a methodology for successful long term trading, a question I have always asked myself [...]]]></description>
				<content:encoded><![CDATA[<p>As many of you may know, my vision of trading does not focus on the next 6 months or 1, 2 years but on achieving profitable trading during the next 10-20 years and hopefully even further. In my quest to develop a methodology for successful long term trading, a question I have always asked myself is what the best way to select trading strategies for long term success actually is. If you had to select a strategy right now that you would absolutely have to follow during the next 10 years, how would you choose such a system? Would you take a system that has been profitable for very long time ? Would you choose a system with low drawdown, high profit, high Sharpe ratio ? Today&#8217;s post focuses on attempting to answer this question by looking at what would have been successful in the past, particularly we will look at what in-sample selection methodology would have worked if you had been asked this exact same question in 1999, to trade the EUR/USD during the next 12 years.</p>
<p>Let&#8217;s suppose you are a fund manager in the year 1999 and you have been asked by your group of select clients to find a single parameter-less price action based daily system that the fund will be trading during the next 12 years on the &#8220;new and shiny&#8221; EUR/USD currency. Your clients want to have a very high probability for profit and they don&#8217;t want any surprises (meaning that they want something for which there is a high chance of past performance matching future results). Scratching your head, you walk into the office and wonder how you can actually select a strategy that is robust &#8211; having a high chance of future positive performance &#8211; with the minimum possible downside risk. Since you refused to buy that magic crystal ball the year before, you have nothing but your analytical skills to get you out of this problem. What is the best way to make this selection? Hint, the most intuitive things are the most prone to failure.</p>
<p>-</p>
<p style="text-align: center;"><a href="http://mechanicalforex.com/wp-content/uploads/2013/03/3-6-2013-8-27-11-PM.png"><img class="aligncenter  wp-image-3459" alt="3-6-2013 8-27-11 PM" src="http://mechanicalforex.com/wp-content/uploads/2013/03/3-6-2013-8-27-11-PM.png" width="465" height="278" /></a></p>
<p>-</p>
<p>By using the DEM/USD data from 1986-1999 and Kantu &#8211; our price action based strategy generator at Asirikuy &#8211; I have created thousands of in-sample profitable and symmetric systems and analysed the in-sample statistical characteristics that profitable systems in the out-of-sample part (2000-2012) actually have in common. To my surprise, if you had made the decision to trade the strategies with the highest trading frequency or the highest profitable to drawdown ratios you would have made a big mistake as your probability of system failure during the next 12 years would have been very high. Seemingly contrary to what happens when you have small out-of-sample periods, when the intention is to have a long out-of-sample, trading frequency is not a determinant factor and in fact higher frequencies are detrimental to overall out-of-sample profitability. So focusing on this part of the spectrum is really not a good thing because neither higher frequencies nor better profit to drawdown statistics generated good results in the out of sample.</p>
<p>What works tremendously well (over 80% success rate) is actually a not so forward selection criteria. If you ignore everything else and only select systems that have very low maximum drawdown period length &#8211; for example less than 400 days &#8211; you end up with a bunch of systems that have a very high probability to succeed. These systems also have other things in common, such as relatively low trading frequencies (10-20 trades/year) and high stabilities (they are very linear in nature within the in-sample phase). Surprisingly if you had simply generated 10K systems and selected those with the lowest maximum drawdown period lengths you would have had a good chance of coming profitable in the next 12 years of out of sample testing. Statistics would have only been equal or better than in-sample on a limited number of cases (probably less than 10%) but in all cases you would be above your statistical worst case scenario and &#8211; in +80% of cases &#8211; you would be above a neutral balance change. Interestingly the worst cases here are not the highest frequency traders so although higher trading frequency does not lead to predictions of good long term out-of-sample performance, a high trading frequency on its own is also not a good criterion for discarding strategies. However if you attempt to restrict your maximum drawdown length search only to strategies that trade more frequently, you will get a much worse overall result.</p>
<p>As you can see, in the past we had a simple criteria related with the maximum drawdown period length that was more than enough to select a good trading strategy that would maintain its performance (or at least preserve our capital) for at least the next decade. The reason why this variable has such a strong predictive power can perhaps be related with the fact that it implicitly optimizes several other variables that are also correlated with system robustness. For example a short maximum drawdown length implies that the system has been able to tackle a significant portion of previous market conditions, hinting at a more stable system that is more linear and less prone to fall into losing territory. If a system has a maximum drawdown length of 100 days during a 10 year period it implies that it could handle a wider variety of market conditions in a positive manner than a system that had a maximum drawdown length of 200 days.</p>
<p>-</p>
<p style="text-align: center;"><a href="http://mechanicalforex.com/wp-content/uploads/2013/03/3-6-2013-8-30-09-PM.png"><img class="aligncenter  wp-image-3458" alt="3-6-2013 8-30-09 PM" src="http://mechanicalforex.com/wp-content/uploads/2013/03/3-6-2013-8-30-09-PM.png" width="390" height="316" /></a></p>
<p>-</p>
<p>Another main reason why I believe this criterion works so well is because it is not related to performance. Whenever you try to optimize a strategy based on a measure of profitability (such as the Sharpe ratio or the AAR to maximum drawdown ratio) you are never able to achieve a positive long term out-of-sample with a good statistical edge (at least under my testing conditions). The market seems to punish those who attempt to follow the track of the best performing strategies (from a return perspective) while a reward is given to those who focus on the stability of returns. This makes sense as highly profitable in-sample strategies can happen due to many reasons, for example due to excessive profitability during a very reduced percentage of market conditions &#8211; while a very stable system loses in-sample profitability at the expense of a higher stability of returns. Fd has also suggested the use of the kurtosis and skewness of returns as predictive variables for out-of-sample performance and we will also see in future posts that these variables can also play an important role. I believe that the predictive power of these variables is also related to the fact that they are not related to performance but to the stability of the trading strategy.</p>
<p>In essence the above research gives some hints into what might work when designing systems for long term profitable out-of-sample performance. Optimizing systems to give the highest return or lowest drawdown levels hasn&#8217;t worked in the past but using non-profit related variables that relate to system stability has yielded the best results. Choosing systems that have performed the most evenly across a large set of market conditions seems to be a key factor in the building of strategies that are bound to last for long periods of time. It is also interesting to note that these results hold when expanding the in-sample period, something interesting that supports the use of all in-sample data to build long-term profitable systems. Right now it seems to me that using 1986-2012 data to look for strategies that have extremely high stability would be a very good way to build strategies with a low probability for failure and &#8211; even if they fail &#8211; with the possibility of detecting failure in a very fast manner.  <strong>Trading a portfolio of the top performers &#8211; from a stability perspective &#8211; seems to be the best idea.</strong></p>
<p>-</p>
<p style="text-align: center;"><a href="http://mechanicalforex.com/wp-content/uploads/2013/03/3-6-2013-8-57-46-PM.png"><img class="aligncenter  wp-image-3460" alt="3-6-2013 8-57-46 PM" src="http://mechanicalforex.com/wp-content/uploads/2013/03/3-6-2013-8-57-46-PM.png" width="451" height="262" /></a></p>
<p>-</p>
<p>If you would like to learn more Kantu and how you too can build your own price action based trading strategies please consider joining <a href="http://www.asirikuy.com/join.htm">Asirikuy.com</a>, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general . I hope you enjoyed this article ! :o)</p>
<p>&nbsp;</p>
<img src="http://feeds.feedburner.com/~r/MechanicalForex/~4/8YOCWqOQYzw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mechanicalforex.com/2013/03/what-if-you-had-had-to-select-a-system-to-trade-the-eurusd-from-2000-to-2012-studying-long-term-out-of-sample-success-and-in-sample-selection.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://mechanicalforex.com/2013/03/what-if-you-had-had-to-select-a-system-to-trade-the-eurusd-from-2000-to-2012-studying-long-term-out-of-sample-success-and-in-sample-selection.html</feedburner:origLink></item>
		<item>
		<title>All currency pairs are not created equal: Why it is better to design systems for higher liquidity pairs</title>
		<link>http://feedproxy.google.com/~r/MechanicalForex/~3/RyUPe46fOmY/all-currency-pairs-are-not-created-equal-why-it-is-better-to-design-systems-for-higher-liquidity-pairs.html</link>
		<comments>http://mechanicalforex.com/2013/03/all-currency-pairs-are-not-created-equal-why-it-is-better-to-design-systems-for-higher-liquidity-pairs.html#comments</comments>
		<pubDate>Fri, 01 Mar 2013 13:16:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[eye openers]]></category>
		<category><![CDATA[system design]]></category>
		<category><![CDATA[trading success]]></category>

		<guid isPermaLink="false">http://mechanicalforex.com/?p=3446</guid>
		<description><![CDATA[From the time when I first started to design Forex automated trading systems it became apparent to me that the task didn&#8217;t have the same difficulty on all the different currency pairs. While I could easily come up with systems that gave profitable historical results on the EUR/USD, designing systems for something like the EUR/JPY [...]]]></description>
				<content:encoded><![CDATA[<p>From the time when I first started to design Forex automated trading systems it became apparent to me that the task didn&#8217;t have the same difficulty on all the different currency pairs. While I could easily come up with systems that gave profitable historical results on the EUR/USD, designing systems for something like the EUR/JPY or the USD/CAD was a whole different story, even though I was using similar development methodologies. In analogy it seemed that systems designed for the EUR/USD were more profitable in out-of-sample (in live trading) than those designed for less liquid pairs. It is therefore interesting to ask if  there is a fundamental difference between these pairs. Are some pairs &#8220;more inefficient&#8221; than others? Today I want to answer this question from an entirely quantitative perspective, thanks to the research I have been able to carry out using the Kantu system generator software. On today&#8217;s post you will learn why the EUR/USD is more inefficient and how pairs should be evaluated before we develop automatic trading system generation methodologies for them. <strong>On a side note I would also like to thank Fd for all his help with R scripts and with the analysis of some of the data presented on today&#8217;s post</strong>.</p>
<p>The question of whether it is best to design systems for one pair or another is not easy to answer. Many people will say that the ability to develop systems on one pair rather than another stems from personal bias and skills rather than from an innate difference between the pairs that makes system development &#8220;easier or harder&#8221;. In order to void the human development factor and put the question in quantitative terms I want to find out whether in-sample profitable and symmetric strategies generated automatically on one pair have a higher probability of being profitable in out-of-sample than strategies generated on another pair. The procedure to get this information is pretty straightforward with Kantu; I first generated 20,000 historically profitable and symmetric systems on each different pair with random 9/3 in/out of sample period going from 1987 to 2012 and I then compared the results with another pair.  So one of the systems may have had an in sample period from 01.Jan.2000-01.Jan.2009 with an out of sample from 01.Jan.2009-01.Jan.2012 while another system might have gone from 1996 to 2005 in sample and then from 2005 to 2008 in out of sample. The randomization of the in/out of sample periods is fundamental to get a &#8220;full picture&#8221; of the currency pairs. Simulations included spreads as well as random slippage.</p>
<p>-</p>
<p style="text-align: center;"><a href="http://mechanicalforex.com/wp-content/uploads/2013/03/3-1-2013-7-32-48-AM.png"><img class="aligncenter  wp-image-3447" alt="3-1-2013 7-32-48 AM" src="http://mechanicalforex.com/wp-content/uploads/2013/03/3-1-2013-7-32-48-AM.png" width="358" height="241" /></a></p>
<p>-</p>
<p>After we get the results we can then proceed to draw a distribution of out of sample returns that shows us the frequency (amount of systems) for each out of sample return class. As you can see in the image above (EUR/USD results) the out of sample returns tend to form a bell-shaped curve with the interesting fact that the curve is skewed towards positive territory. This means that if we generate a profitable and symmetric strategy on the EUR/USD we have a more than random chance of being profitable in out of sample regardless of the in-sample statistics. In the case of this pair it is enough to have something that is historically reasonable (profitable and symmetric through in-sample trading) to have an above chance expectation of positive performance for the next 3 years. In other words the EUR/USD is inefficient because we can get profitable out of sample results based on historical in-sample performance. This definitely explains why I always found it easier to optimize and create new systems on the EUR/USD and it also explains why neural networks tend to do so much better on this pair than on others. <strong>Note that the edge we have above is both regarding the number of profitable systems in out of sample (About 600 more than predicted if we had no edge) and total net addition of all profits and losses (meaning that the sum of all the out of sample results is positive). </strong></p>
<p>What happens when we look at another pair, such as the USD/CAD (which I have always had problems with). What we find is that the distribution of returns has changed and is now centred around negative territory. This means that profitable symmetric in-sample results were not enough to give you an edge on this pair during the past 25 years. The USD/CAD is therefore less inefficient than the EUR/USD because designing systems that give a positive expectation for out of sample profitability is simply harder as there are far more good in-sample strategies that fail in the out of sample when compared to the EUR/USD. This is a quantitative comparison of currency pair efficiency based on parameterless price action based pattern generation, giving us a very important clue about why designing systems for minors such as the USD/CAD might not be the easiest or most profitable idea. In fact if you try a system generation procedure where you select the most highly correlated in-sample performance variable with out of sample performance as your selection criteria you will see that results are always profitable for the EUR/USD while they are always losing for the USD/CAD (more on this methodology on a future post).</p>
<p>-</p>
<p style="text-align: center;"><a href="http://mechanicalforex.com/wp-content/uploads/2013/03/2-28-2013-11-37-38-AM1.png"><img class="aligncenter  wp-image-3449" alt="2-28-2013 11-37-38 AM" src="http://mechanicalforex.com/wp-content/uploads/2013/03/2-28-2013-11-37-38-AM1.png" width="403" height="251" /></a></p>
<p>-</p>
<p>Why is there such a big difference between these pairs? My main explanation for this is a complete negation of the efficient market hypothesis (which we know is wrong, particularly since the strong failure of random walk based volatility prediction models during the financial crisis). My vision is that traders are not rational profit maximizers &#8211; as the efficient market hypothesis says &#8211; but that traders are in fact emotional and irrational and therefore higher volume leads to higher inefficiencies because there is a higher manifestation of the underlying human nature that makes the markets predictable to a certain degree. This means that an instrument will be easier to exploit if it has a higher trading volume, something that is confirmed when you analyse the other majors and minors which shows you a direct relationship between average yearly trading volume and the skewness of the out of sample distribution of returns derived by Kantu.</p>
<p>The conclusion is that it is far easier and potentially far more profitable to trade highly liquid pairs (at least algorithmically) than to trade minors or exotics. Although this doesn&#8217;t mean that profitable trading on these pairs is impossible &#8211; I&#8217;ll show you a way to do it on a future post &#8211; it is indeed telling us that there are pairs where it is easier and more practical to develop trading methodologies. <strong>This also has consequences for automatic system generation because it means that although we might be able to find profitable in-sample results for all pairs, only on some pairs will these systems tend to give profitable out of sample performance.</strong> Therefore the previous analysis of a pair&#8217;s efficiency is fundamental to determine whether algorithmic system generation is the correct approach or what modifications might be necessary to make it so.</p>
<p>If you would like to learn more about Kantu and how you too can develop algorithmic systems automatically please consider joining <a href="http://www.asirikuy.com/join.htm">Asirikuy.com</a>, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general . I hope you enjoyed this article ! :o)</p>
<p>&nbsp;</p>
<img src="http://feeds.feedburner.com/~r/MechanicalForex/~4/RyUPe46fOmY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://mechanicalforex.com/2013/03/all-currency-pairs-are-not-created-equal-why-it-is-better-to-design-systems-for-higher-liquidity-pairs.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://mechanicalforex.com/2013/03/all-currency-pairs-are-not-created-equal-why-it-is-better-to-design-systems-for-higher-liquidity-pairs.html</feedburner:origLink></item>
	</channel>
</rss>
