<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Au.Tra.Sy blog - Automated trading System &#187; Backtest</title>
	<atom:link href="http://www.automated-trading-system.com/category/backtest/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.automated-trading-system.com</link>
	<description>Systematic Trading research and development, with a flavour of Trend Following</description>
	<lastBuildDate>Mon, 23 Jan 2012 11:58:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Further Musings on Randomness</title>
		<link>http://www.automated-trading-system.com/further-musings-on-randomness/</link>
		<comments>http://www.automated-trading-system.com/further-musings-on-randomness/#comments</comments>
		<pubDate>Wed, 23 Mar 2011 08:23:10 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=4084</guid>
		<description><![CDATA[The last post on &#8220;Monkey-Style&#8221; trading with random entries and trailing stop exits generated a fair bit of interest, comments and questions. In this follow-up post, I want to explore the concept further and address some of the points raised in the discussions resulting from that study. Before I get started, I want to clarify [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2011/03/monkeys_stuckincustoms.jpg" alt="" title="monkeys_stuckincustoms" width="400" height="266" class="alignnone size-full wp-image-4085" /></p>
<p>The last post on &#8220;Monkey-Style&#8221; trading with <strong>random entries and trailing stop exits</strong> generated a fair bit of interest, comments and questions. In this follow-up post, I want to explore the concept further and address some of the points raised in the discussions resulting from that study.</p>
<p>Before I get started, I want to clarify that <strong>I am not advocating the use of random trading in real-life system design</strong>. I simply used random logic, as per David Harding&#8217;s quote, to remove any impact from the entry signals and solely focus on exit and money management.</p>
<h3>The Other Side of The Coin</h3>
<p>David Harding&#8217;s quote (<em>&#8220;If you put in stops and run your profits and trade randomly you make money; and if you put in targets and no stops, and you trade randomly you lose money. So the old saw about cutting losses and running profits has some truth to it.&#8221;</em>) was really two-sided. The previous post looked into the first part of the quote with random entries and trailing stops. Let&#8217;s now look at the other part of the quote with <strong>random entries and profit targets</strong>. </p>
<p>The overall concept of the system is identical to the one tested in the <a href="http://www.automated-trading-system.com/trend-following-monkey-style/">last post</a>: entries in random directions every time a position is closed, with a fixed fractional money management system over a portfolio of diversified futures. The only difference has to do with exits, which are now triggered by a <strong>volatility-adjusted take-profit order</strong>. At the time of trade entry, the ATR is calculated as a measure of volatility and a limit order is entered at a distance equal to a multiple of the ATR value.</p>
<p>As the test contains a random element, I ran several hundreds of them in order to average them to detect a &#8220;central tendency&#8221;. The ATR-multiple also stepped through different values from 2 to 10, each of these being run 200 times to generate 1,800 tests in total.</p>
<p>Well, David Harding seems to be proven right again as the <span id="more-4084"></span>average performance of these 1,800 runs generated a <strong>near 85% loss</strong> over the 20 years of the back-test (and this is excluding commissions &#8211; more on that later).</p>
<p>I have run other tests and generated one chart comparing all outcomes. The &#8220;Random Entries with Target Profits&#8221; equity curve is plotted on that chart further below.</p>
<p>Note that the Win ratio for this system with Profit Targets comes close to 95%. This is logical: all winning trades are exited when they hit their target profit but losing trades are never exited (except at the end of the test); this shows that focusing on single stats like this one can be misleading (how many times do you hear market gurus claiming 90% accuracy rate?).</p>
<h3>More Randomness</h3>
<p>I decided to &#8220;hire another monkey&#8221; to help with another instance of a random system: <strong>random entries and random exits</strong>.</p>
<p>My first monkey is still in charge of &#8220;tossing a coin&#8221; to decide of the direction of each new trade, but instead of having a deterministic exit, the second monkey decides randomly of the duration of each trade: monkey picks 69 and the system holds the position for 69 bars. I did assist the monkey a bit, by giving him some &#8220;hindsight bias&#8221;, so that the average trade duration was roughly equal to the trade duration of the systems in the &#8220;Random Entries, Trailing Stops&#8221; scenario (for example 13 days for 2xATR, 63 days for 5xATR or 220 days for 10xATR). </p>
<p>This is a very random system, which can go either short or long, and we would therefore expect for it to perform neutrally when tested without any trade frictions. And this is exactly what happens. Check the chart further below: the equity curve is a near flat-line. This goes some way to prove that averaging the results of 1,800 runs with random trading logic does generate a result close to the theoretical/expected result. And we can clearly see the impact of a trailing stop exit (positive) and a profit target exit (negative) compared to a full random system.</p>
<h3>Retiring the Entries Monkey</h3>
<p>Some readers did comment on the last randomness post, pointing out that entries were as important as exits and such good results could also be obtained with random exits and &#8220;good entries&#8221;. This was my next test: using a <strong>standard Moving Average cross-over</strong> for entry generation, I left my &#8220;exit monkey&#8221; in charge of exiting the trades after a random period of time (again, with the help of hindsight, so that the average trade duration for this random system was similar to the equivalent MA cross-over system). Note that the system only entered on the actual cross-over of moving averages (i.e. when a position exits, the system waits for the next cross-over instead of re-entering in the direction of the moving averages).</p>
<p>The system only returned <strong>64% over 20 years</strong>, with relatively high volatility, not really displaying more than what could be described as &#8220;random oscillations&#8221;. Replacing random entries with MA cross-over entries can not conclusively be said to have improved the system, as the signal-to-noise ratio is too high to assert whether the positive performance of MA entries is significant or not.</p>
<h3>MA Entries with Profit Targets</h3>
<p>Another way to compare random and MA cross-over entries would be to take the &#8220;random entries with profit targets&#8221; system and replace the entry generation by a moving average cross-over. This is the next (and final) test in this post.</p>
<p>The MA Entries with Profit Target Exits system variation performs very similarly to the one with random entries, even performing slightly worse, by <strong>losing more than 90%</strong> over the time span of the back-test (20 years). Again not a strong evidence for the superiority of MA entries over random entries.</p>
<h3>Putting it All Together</h3>
<p>Below is the chart of each of the 5 scenarios tested, exhibiting a wide variation in results obtained.</p>
<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2011/03/Random-Equity-Curves2.png" alt="" title="Random Equity Curves2" width="490" height="352" class="alignnone size-full wp-image-4089" /><br />
&nbsp;</p>
<table style="border:1px solid #c3c3c3; border-collapse:collapse;">
<tr>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3; padding:5px;">
      System
    </th>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3; padding:5px;">
	      CAGR
    </th>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3; padding:5px;">
	      Max DD
    </th>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;">
Random Entries / Trailing Stops
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">16.14%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">23.12%</div>
</td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;">
Random Entries / Random Exits
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">-0.26%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">10.49%</div>
</td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;">
Random Entries / Profit Targets
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">-7.94%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">89.03%</div>
</td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;">
MA Entries / Random Exits
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">2.36%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">59.76%</div>
</td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;">
MA Entries / Profit Targets
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">-10.46%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">93.05%</div>
</td>
</tr>
</table>
<p>&nbsp;<br />
Some pretty clear trends in there. Note that the Drawdown figures are calculated on a monthly basis. Drawdowns based on daily performance would therefore be larger, as mentioned in <a href="http://www.automated-trading-system.com/your-worst-drawdown-is-yet-to-come/">this post</a>, discussing a short Drawdown paper by David Harding.</p>
<p>Of course, it is not possible to generalise the results of these findings. The entry logic chosen for these tests for example is specific and some other entry logic, with a different average trade duration might have yielded different results. </p>
<p>This was indeed the case in some previous tests discussed on the Trading Blox forum (thanks to Pumpernickel for pointing these threads out in the last post comment), where similar discussions/tests took place. The results found there seemed to indicate profitability for Trend Following entries and random exits (with a slightly different logic) and even some random entry/exit combination (different logic from above again: direction of positions were not random). Check these <a href="http://www.tradingblox.com/forum/viewtopic.php?t=3779&#038;start=0&#038;postdays=0&#038;postorder=asc&#038;highlight=random+bollinger" target="_blank" rel="nofollow">two</a> <a href="http://www.tradingblox.com/forum/viewtopic.php?t=3796&#038;start=0&#038;postdays=0&#038;postorder=asc&#038;highlight=random+entry+exit" target="_blank" rel="nofollow">threads</a> for more info and results.</p>
<h3>Note on averaging and result normalization</h3>
<p>Because most of the tests involved some random logic, I deemed it necessary to run a fairly large sample for each case in order to average the results and obtain an overall tendency.<br />
Some readers have pointed out that averaging the results hides the distribution of the outcomes and might hide the fact some the average performance is skewed by some outliers.</p>
<p>These are valid points to raise, which I want to address by displaying the shape of the distribution of CAGR for all instances of the &#8220;Random Entries with Trailing Stops&#8221; system (with a 2-ATR stop).</p>
<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2011/03/histogram1.png" alt="" title="histogram" width="494" height="310" class="alignnone size-full wp-image-4088" /></p>
<p>There is of course some variation around the average (average CAGR = 17.03% with a standard deviation of 4.96%), but I feel the average is still a good indicator for the central tendency of the system concepts being tested here. I actually decided to check this by estimating the statistical significance of this result by using the <a href="http://www.automated-trading-system.com/bootstrap-test/">bootstrap method</a>. With the null hypothesis that the average return is zero, the p-value for obtaining an average of 17.03% is actually 0.00 (100,000 resamples).</p>
<p>The other aspect of this comparison test is the normalization of results: every family of tests was normalized so that the standard deviation of the monthly returns was identical for all scenarios, allowing for a better, <em>apples-for-apples</em> comparison.</p>
<h3>Notes on Slippage and Commissions</h3>
<p>I usually do not include trade friction on the tests published on the blog, one of the reasons being to avoid making assumptions on commissions and slippage amounts, which are variable for every trader based on size, broker, market, etc. (and which can definitely have a non-negligible impact as previously discussed in <a href="http://www.automated-trading-system.com/slippage-backtesting-realistic/" rel="nofollow">here</a> and <a href="http://www.automated-trading-system.com/follow-up-on-slippage/" rel="nofollow">here</a>).<br />
So, I usually prefer to leave this out of the equation (at the risk of making the &#8220;raw&#8221; results less realistic) and let the readers interpret the results based on their friction costs assumptions. Moreover, we are not really testing a system here, we are using a system back-test to check the impact of entries and exits.</p>
<p>Nevertheless, I have re-run the &#8220;Random Entries with Trailing Stops&#8221; system including commissions ($10 per contract) and slippage (5%). Of course, these extra costs have an impact: the CAGR drops from 16.14% to 10.16%, as can be seen in the chart below:</p>
<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2011/03/With-commissions.png" alt="" title="With commissions" width="491" height="321" class="alignnone size-full wp-image-4090" /></p>
<p>And here are some additional figures that should help estimate trading costs:</p>
<table style="border:1px solid #c3c3c3; border-collapse:collapse;">
<tr>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3; padding:5px;">
      System
    </th>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3; padding:5px;">
	      Round-Turns per Million
    </th>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3; padding:5px;">
	      Average Trade Duration
    </th>
<tr>
<tr>
<td style=""background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;"">
Random Entries / Trailing Stops
    </td>
<td style=""background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;"" align = ""right"">
<div style=""color:black"">877</div>
</td>
<td style=""background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;"" align = ""right"">
<div style=""color:black"">138</div>
</td>
</tr>
</table>
<p>&nbsp;<br />
I hope this (long) post has clarified some points/questions raised from the last &#8220;randomness&#8221; post. If not, we can always continue the discussion in the comments section&#8230;</p>
<p>&nbsp;</p>
<div style="font-size: 0.8em;">Picture credits: stuckincustoms via flickr (CC)</div>
]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/further-musings-on-randomness/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Trade what you Test and Test what you Trade</title>
		<link>http://www.automated-trading-system.com/trade-what-you-test-and-test-what-you-trade/</link>
		<comments>http://www.automated-trading-system.com/trade-what-you-test-and-test-what-you-trade/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 14:17:28 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[CSI]]></category>
		<category><![CDATA[rollover]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=3848</guid>
		<description><![CDATA[In order to avoid bad surprises in live trading, the maxim forming this post title should apply to as much of a trading system as possible. The goal is to ensure back-testing results are as realistic as they can. Input data is one component of a trading system and the area this post focuses on, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2011/01/test-trade.jpg" alt="test-trade" title="test-trade" width="470" height="170" class="alignnone size-full wp-image-3849" /></p>
<p>In order to avoid bad surprises in live trading, the maxim forming this post title should apply to as much of a trading system as possible. The goal is to ensure <strong>back-testing results are as realistic</strong> as they can.</p>
<p><strong>Input data</strong> is one component of a trading system and the area this post focuses on, more specifically <strong>roll-over methodologies for futures contracts</strong>.</p>
<h3>Real Monthly Trading Also Means Monthly Roll-Over</h3>
<p>One of the triggers for this post was a comment on the <a href="http://www.automated-trading-system.com/trade-monthly-basis/">Monthly Trading post</a> with regards to the futures data used for the test. In order to have comparable results between the daily and monthly instances of the systems tested, I simply and mechanically reused the same portfolio of instruments&#8230;</p>
<p>However, futures contracts in the portfolio <strong>roll on Open Interest</strong>. What this practically means, is that a trader using this methodology would have to monitor OI every day to decide whether to roll to another contract. <em>Not much of a monthly process.</em></p>
<p>I still think that test had some value, but it is important to realise that the monthly instance in that test was not representative of a pure monthly process. Instead we were actually simulating a trading strategy with <strong>monthly signal taking</strong> but <strong>daily roll-over</strong> monitoring process.</p>
<p>It highlights the fact that it is important to understand what the data used for testing actually represents, and to roll futures contract data in the same way as they are rolled in real-life.</p>
<p>This post is a good opportunity to revisit the concepts of generating continuous futures data and some of the older posts I had written on the subject using CSI (<a href="http://www.automated-trading-system.com/what-everybody-ought-to-know-about-continous-futures-contracts/">here</a> and <a href="http://www.automated-trading-system.com/continuous-contract-options/">here</a>).<span id="more-3848"></span></p>
<h3>ETF: Outsource your Contract Rolling Process</h3>
<p>Another reason why I think that the monthly trading test has some value is because the individual monthly trader might decide to <strong>trade ETFs instead of futures</strong>.</p>
<p>ETFs can be seen as simple wrappers of futures contracts: they trade continuously and their managers take care of rolling their underlying positions with a predefined methodology and timing, charging you a fee in the process.</p>
<p>Of course, this is not futures Trend Following any more, and using ETFs lacks the inherent leverage embedded in futures instruments. But it is possible to obtain decent performance with Trend Following on ETFs (check <a href="http://www.automated-trading-system.com/practical-guide-to-etf-trading-systems-garner/">this ETF Trading book</a> by Anthony Garner for example). An assumption in that book (which I will attempt to verify in a next post) is that <strong>futures can act as proxies for ETFs/ETCs</strong>.</p>
<h3>Contract Rolling and Testing</h3>
<p>Rolling contracts is a process necessary to generate a continuous time-series for back-testing futures instruments. There are many different ways to perform this operation (some of which are covered just below). What is important is that <strong>the continuous contract should be a realistic representation of one&#8217;s trading</strong>.</p>
<h3>Proportional vs Point-Based Adjustments</h3>
<p>At the time of writing these posts on continuous contracts, I was leaning towards the idea that proportional adjustment was the way to go:</p>
<p>&#8220;<em>This ensures a constant relative (percentage-wise) relationship between any prices across the trading history</em>&#8220;, as opposed to the point-based adjustment, with which &#8220;<em>you lose relative price difference (shifting all prices by an absolute amount has that effect on percentage changes: 10 to 11 is +10% but add 100 to both for an extreme case and 110 to 111 becomes less than +1%)</em>&#8220;.</p>
<p>When back-testing with <strong>Trading Blox</strong>, the standard functionality expects the prices to be <strong>point-based adjusted</strong>, to calculate trade PnL:<br />
(ExitPrice &#8211; EntryPrice) * BigPointValue * NumberContracts<br />
With a point-based adjustment, the number of points between entry and exit will represent the actual points the market has moved during the life of the trade, as opposed to proportional adjustment (which would give wrong PnL calculations).</p>
<p>But point-based adjustments prevents us from using relative price difference, such as &#8220;check if close today is 5% higher than close yesterday&#8221; as an example. This might be an issue for some systems, but there are workarounds for this in Trading Blox though.</p>
<p>We do not <em>have to</em> limit ourselves to one or the other  methodology, but we have to understand what the rolling algorithm represents and which data best suit each test.</p>
<p>Of course, you can even go with a more fancy approach to rolling (if this represents what your trading is), like one we had covered here last year with a <a href="http://www.automated-trading-system.com/better-trend-following-improved-roll-yield/">rolling methodology attempting to optimize roll yield</a>.</p>
<h3>Back-Adjusted or Forward-Adjusted?</h3>
<p>Another switch on the rolling methodology dashboard (in CSI) is the possibility to perform <strong>back-adjustments or forward adjustments</strong>. This only determines which price is fixed and in which direction the &#8220;adjustment drift&#8221; will propagate through the time-series. Forward-adjustment picks the earliest price as the reference price and moves each following contract by the required adjustment amount/ratio to fill the &#8220;rolling gap&#8221;. Backward-adjustment is the opposite: reference price is last price and adjustment propagates backward.</p>
<p>In order to get recent prices in line with real price levels, most traders prefer back-adjustment. From a back-testing point of view, it should not have <em>much</em> impact. However, the chart time-series will look quite different.</p>
<p>To illustrate this, here is an example chart plotting the same underlying (Crude Oil) since 2007, with four different standard CSI rolling methodologies:</p>
<ul>
<li>Proportional, Forward Adjustment</li>
<li>Proportional, Backward Adjustment</li>
<li>Point-based, Forward Adjustment</li>
<li>Point-based, Backward Adjustment</li>
</ul>
<div id="attachment_3850" class="wp-caption alignnone" style="width: 480px"><img src="http://www.automated-trading-system.com/wp-content/uploads/2011/01/rolled-contracts.png" alt="Mix of Point and Proportional, Back and Forward Adjustments" title="rolled-contracts" width="470" height="380" class="size-full wp-image-3850" /><p class="wp-caption-text">Mix of Point and Proportional, Back and Forward Adjustments</p></div>
<p>Going back to the monthly trading test, I did take my data &#8220;for granted&#8221; as it works for most cases&#8230; but not really for this one. It does emphasise the point that &#8220;Trade what you Test and Test what you Trade&#8221; should also apply to data and rolling methodologies, which need to be checked/reviewed for each new system.<br />
&nbsp;<br />
&nbsp;</p>
<div style="font-size: 0.8em;">Credits: thanks to Pumpernickel for the comment pointing out the discrepancy in the previous post between daily roll-over and monthly signal taking (and for this post title contribution, as part of a comment on an earlier post).<br />
Picture Credits: Trading Blox screenshot and artemuestra@flickr(CC).</div>
]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/trade-what-you-test-and-test-what-you-trade/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Can You Trade Effectively on a Monthly Basis?</title>
		<link>http://www.automated-trading-system.com/trade-monthly-basis/</link>
		<comments>http://www.automated-trading-system.com/trade-monthly-basis/#comments</comments>
		<pubDate>Tue, 11 Jan 2011 10:02:23 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[monthly]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=3789</guid>
		<description><![CDATA[Long-Term Trend Following is often billed as a superior and simple alternative to Buy-and-Hold for individual traders. For those investors wanting to take a DIY/self-trading approach, an active strategy might bring better performance &#8211; but requires a far more active involvement. In the case of an End-of-Day Trend Following system trading a global portfolio, the [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2011/01/EndofMonth-CraftyGoat1.jpg" alt="EndofMonth-CraftyGoat" title="EndofMonth-CraftyGoat" width="284" height="330" class="aligncenter size-full wp-image-3793" /></p>
<p><strong>Long-Term Trend Following</strong> is often billed as a superior and simple alternative to Buy-and-Hold for individual traders.</p>
<p>For those investors wanting to take a DIY/self-trading approach, an active strategy might bring <strong>better performance</strong> &#8211; but requires a far more <strong>active involvement</strong>. In the case of an End-of-Day Trend Following system trading a global portfolio, the requirements to check the markets and system every day, potentially several times a day, might be incompatible with individual investors&#8217; lifestyle (job, family, etc.).</p>
<p>A more practical &#8211; <em>monthly</em> &#8211; system might suit some individual traders&#8217; requirements better. <strong>But can these monthly systems achieve decent performances?</strong></p>
<h3>Daily vs Monthly Data</h3>
<p>This post will be looking at the results of <strong>one system traded on two different frequencies</strong>:<span id="more-3789"></span></p>
<ul>
<li>Daily</li>
<li>Monthly</li>
</ul>
<p>One common approach when testing a monthly/weekly system is to use the corresponding timeframe for the data fed to the back-testing system. This can sound intuitively correct but testing a system on monthly data has some drawbacks.</p>
<p>We still want to be able to &#8220;see what happened&#8221; in between each monthly trading decision (i.e. chart the intra-month equity curve), which is not possible with monthly data. Moreover, the reporting frequency does affect the system statistics (an illustration with Max Drawdown being described in this <a href="http://www.automated-trading-system.com/wp-content/uploads/2010/05/Pros-and-Cons-of-Drawdown-as-a-Statistical-Measure.pdf" target="_blank" title="Pros and Cons of Drawdown as a Statistical Measure">paper by David Harding [pdf]</a> &#8211; covered in <a href="http://www.automated-trading-system.com/your-worst-drawdown-is-yet-to-come/">this post</a>).</p>
<p>In order to perform an <em>apples-to-apples</em> comparison of both frequencies on the same system, <strong>daily data needs to be used in each case</strong>.</p>
<h3>System Rules</h3>
<p>A viable monthly system needs to be relatively long term: no point in trading a 3-day swing trading system on a monthly basis&#8230;</p>
<p>For the purpose of this post, the classical <strong>Golden Cross</strong> system is used (a.k.a. the 200-50 Moving Average Cross-Over system &#8211; featured in the <a href="http://www.automated-trading-system.com/resources/state-trend-following/">State of Trend Following report</a>).</p>
<p>In its <strong>daily</strong> incarnation, the system is traded exactly as per the monthly report: Buy when Short MA > Long MA, Sell when Short MA < Long MA. No stops are used, in combination with a fixed fractional money management logic (position size based on volatility). The same <a href="http://www.automated-trading-system.com/wp-content/uploads/2010/08/Instruments.html" target="_blank">portfolio</a> is used over the period 2000-2010.</p>
<p>The <strong>monthly</strong> incarnation is near-identical, but for an additional <strong>monthly trading condition</strong>: a trade can only take place on the last trading day of the month. If the MA cross-over occurs on the 3rd of the month: the position only changes at the end of the month. Intuitively, we can see how this could be an issue; by possibly staying on the wrong side of the trade during a good chunk of a move.</p>
<p>Note that if the MAs cross back before the end of the month, the position will stay unchanged at month-end, which could prevent some whipsawing.</p>
<h3>Results: The Monthly System Holds Up</h3>
<p>Maybe in a sigh of relief, the budding DIY trader/blog reader will look at the following results, which seem to indicate <strong>little difference between the daily and monthly systems</strong>:</p>
<table style="border:1px solid #c3c3c3; border-collapse:collapse;">
<tr>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3; padding:5px;">
      Performance Stats
    </th>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3; padding:5px;">
      Daily
    </th>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3; padding:5px;">
      Monthly
    </th>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;">
CAGR
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">41.45%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">39.14%</div>
</td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;">
Max DD
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">53.90%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">56.70%</div>
</td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;">
MAR
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
0.77
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
0.69
    </td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;">
Sharpe Ratio
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;" align = "right">
0.98
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;" align = "right">
1
    </td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;">
Trade Number
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
691
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
602
    </td>
</tr>
</table>
<p>&nbsp;<br />
After all, it might be possible to run a Trend Following system on a monthly basis with a decent performance!</p>
<p>Below are the graphical comparisons of both monthly and daily systems:</p>
<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2011/01/Curves-200-50.png" alt="Curves-200-50" title="Curves-200-50" width="498" height="400" class="alignnone size-full wp-image-3799" /></p>
<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2011/01/Diff-200-50.png" alt="Diff-200-50" title="Diff-200-50" width="477" height="265" class="alignnone size-full wp-image-3801" /></p>
<p>The first chart represents the equity curves of both systems, with the difference between the two plotted on the second chart (the second plot represents the rolling difference in CAGR between each system). The monthly system actually over-performs for most of the testing period (daily over-performance is negative), until 2008, when the daily system takes over.</p>
<h3>A Shorter-Term System</h3>
<p>Intrigued by the results? I was. And wanted to investigate further how a system could hold up being traded on a monthly basis.</p>
<p>A <strong>shorter-term system</strong> should logically be more affected by the monthly trading condition, so I decided to stretch the test by using the <strong>50-20 Moving Average Cross-Over</strong> and apply the same treatment to it.</p>
<p>Below are the results:</p>
<table style="border:1px solid #c3c3c3; border-collapse:collapse;">
<tr>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3; padding:5px;">
      Performance Stats
    </th>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3; padding:5px;">
      Daily
    </th>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3; padding:5px;">
      Monthly
    </th>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;">
CAGR
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">32.75%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">34.50%</div>
</td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;">
Max DD
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">54.90%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">67.20%</div>
</td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;">
MAR
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
0.6
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
0.51
    </td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;">
Sharpe Ratio
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;" align = "right">
0.79
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;" align = "right">
0.83
    </td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;">
Trade Number
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
2330
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
1569
    </td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;">
Avg. DD
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">22.00%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">15.71%</div>
</td>
</tr>
<tr>
</table>
<p>&nbsp;<br />
While the CAGR is comparable (even slightly better for the monthly system), the Max Drawdown figure is substantially worse (by 22.4%). Looking at the graphical results, we can see that the Max DD occurred during the crash of 2008 &#8211; where it paid up to follow your positions closely (ie on a daily basis). Note that this was the same for the Golden Cross system, where 2008 saw the daily system perform much better than the monthly one, during the crash.</p>
<div id="attachment_3798" class="wp-caption alignnone" style="width: 507px"><img src="http://www.automated-trading-system.com/wp-content/uploads/2011/01/Curves-50-20.png" alt="Daily and Monthly Equity Curves" title="Curves-50-20" width="497" height="401" class="size-full wp-image-3798" /><p class="wp-caption-text">Daily and Monthly Equity Curves</p></div>
<div id="attachment_3800" class="wp-caption alignnone" style="width: 489px"><img src="http://www.automated-trading-system.com/wp-content/uploads/2011/01/Diff-50-20.png" alt="CAGR Difference between both systems" title="Diff-50-20" width="479" height="268" class="size-full wp-image-3800" /><p class="wp-caption-text">CAGR Difference between both systems</p></div>
<p>Note that comparing two different systems is always a subjective affair, depending on which stats you decide to focus on. For example, the monthly system performs worse on MaxDD but actually better on average drawdown amount (added on the last line of performance stats table), which is also reflected in the higher Sharpe ratio.</p>
<h3>Is Monthly Trading Worth It?</h3>
<p>As always, the same disclaimer applies regarding the significance of the test using one system only.<br />
But the fact that trading a daily system on a monthly frequency did not dramatically impact performance is quite encouraging.<br />
Moreover, the fact that no adjustments were made to the monthly systems suggests that there might be some room for further improvement (a logic to better handle fast-reversing periods like 2008 might be an interesting area to look at).</p>
<p>Monthly Trend Following systems might not be the best or optimal solution; but they could offer a nice cost/reward solution to the individual trader.<br />
&nbsp;<br />
&nbsp;</p>
<div style="font-size: 0.8em;">Picture credits: CraftyGoat via flickr (CC)</div>
]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/trade-monthly-basis/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>The Good, the Bad and the Ugly Portfolios</title>
		<link>http://www.automated-trading-system.com/the-good-the-bad-and-the-ugly-portfolios/</link>
		<comments>http://www.automated-trading-system.com/the-good-the-bad-and-the-ugly-portfolios/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 09:36:47 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[diversification]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=3420</guid>
		<description><![CDATA[Following the last study on diversification using a &#8220;portfolio randomizer&#8221;, I wanted to further explore further the concept of hindsight bias in portfolio selection and how it can impact performance. This short post is an illustration of that concept. 51 Instruments, 40 Picks, How Many Combinations? The answer is&#8230; a lot: there are 47,626,016,970 ways [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_3421" class="wp-caption alignnone" style="width: 468px"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/11/combination-rickharris.jpg" alt="Many combinations..." title="combination-rickharris" width="458" height="230" class="size-full wp-image-3421" /><p class="wp-caption-text">Many combinations...</p></div>
<p>Following the last <a href="http://www.automated-trading-system.com/trading-diversification-free-lunch/">study on diversification</a> using a &#8220;portfolio randomizer&#8221;, I wanted to further explore further the concept of <strong>hindsight bias in portfolio selection</strong> and how it can impact performance. This short post is an illustration of that concept.</p>
<h3>51 Instruments, 40 Picks, How Many Combinations?</h3>
<p>The answer is&#8230; a lot: there are 47,626,016,970 ways of picking a portfolio of 40 instruments from a total set of 51   (formula is: 51! /  [40! x 11!]). Running so many simulations was not practical (!) so I decided to run a fraction of the possible combination (5,000 random iterations). We get a similar set of results as the last study:<span id="more-3420"></span></p>
<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/11/scatter-plot.png" alt="scatter-plot" title="scatter-plot" width="428" height="336" class="alignnone size-full wp-image-3422" /></p>
<p>This is still for a run of the 20/50 Moving Average cross-over system running from 1990.<br />
Note that the results are slightly different from the run with 40 instruments from the last post, as the position size was greater here (and therefore the &#8220;cloud&#8221; of CAGR/MaxDD results has moved towards the top-right).</p>
<p>The average performance figures for the systems are as follows:</p>
<table style="border:1px solid #c3c3c3; border-collapse:collapse;">
<tr>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3; padding:5px;" colspan="2">
Performance Stats
    </th>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;">
CAGR
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">29.68%</div>
</td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;">
Max DD
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">43.60%</div>
</td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;">
MAR
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
0.68
    </td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;">
Sharpe Ratio
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;" align = "right">
0.59
    </td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;">
Trade Number
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
3629
    </td>
</tr>
</table>
<h3>Isolating portfolios</h3>
<p>The next step was to isolate the <strong>worst and best cases</strong> (circled on the scatter plot) and identify the <strong>difference in portfolio composition</strong> between the two. Since this is a combination of 40 elements from a set of 51, there can only be 11 differences at a maximum between each portfolio.</p>
<p>Indeed, the &#8220;worst&#8221; and &#8220;best&#8221;portfolios share 32 of their 40 components but still exhibit a wide difference in their performance figures (the MAR ratio for example is 3.5 times better for the best case: 1.02 v. 0.29). For reference, the &#8220;good part&#8221; of the best portfolio (ie its instruments that do not overlap with the other portfolio) are:</p>
<ul>
<li>Cattle-Feeder-CME(Floor+Electronic Combined)</li>
<li>CopperHG-COMEX(Floor Trading Only)</li>
<li>Euro(Floor+Electronic Combined)-CME</li>
<li>Gas Oil(Combined)-ICE(IPE)</li>
<li>IBEX 35 Index-MEFF</li>
<li>Natural Gas-Henry Hub-NYMEX(Floor+Electronic Combined)</li>
<li>OMX Helsinki 25-EUREX</li>
<li>Palm Oil-Crude-MDEX</li>
</ul>
<p>On the other hand, the &#8220;bad part&#8221; of the portfolio is:</p>
<ul>
<li>Azuki Beans-Red-TGE</li>
<li>Cocoa-CSCE</li>
<li>DJ Euro STOXX 50 Index-EUREX</li>
<li>EURIBOR-3 Mth-EURONEXT(LIFFE)</li>
<li>Gold-COMEX(Floor Trading Only)</li>
<li>MSCI Taiwan Index-SGX(SIMEX)</li>
<li>Silver-COMEX(Floor Trading Only)</li>
<li>Soybeans-CBT(Floor Trading Only)</li>
</ul>
<p>To take the comparison to a further extreme, I ran the exact same system over both bad and good portfolios by themselves.</p>
<p>The difference in results is fairly striking:</p>
<div id="attachment_3428" class="wp-caption alignnone" style="width: 506px"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/11/good-portfolio.png" alt="Good portfolio" title="good-portfolio" width="496" height="300" class="size-full wp-image-3428" /><p class="wp-caption-text">Good portfolio</p></div>
<p><div id="attachment_3429" class="wp-caption alignnone" style="width: 510px"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/11/bad-portfolio.png" alt="Bad portfolio" title="bad-portfolio" width="500" height="284" class="size-full wp-image-3429" /><p class="wp-caption-text">Bad portfolio</p></div><br />
Going from a <strong>CAGR / MaxDD</strong> combination of 26.73% / 34.9% to -3.20% / -63.3% is fairly drastic.<br />
&nbsp;<br />
This is not a big surprise, knowing that 20/20 hindsight was used in picking both sets of instruments. But bearing in mind that the results above come from the exact same system and parameters, using the same number of instruments, it does illustrate the point even more clearly on portfolio selection and how they can impact performance results.</p>
<h3>Robustness Testing</h3>
<p>If anything, I believe this illustrates that testing over several portfolio sets might be a good way to identify <strong>robustness in system results</strong>. If the system only shows good results on specific portfolios, it might simply be a &#8220;lucky&#8221; outlier.</p>
<h3>On Diversification</h3>
<p>Finally, there were a few comments on the last post with regards to how to implement diversification. I had only focused on diversification from a portfolio point of view. However I believe that ideally one would diversify with a large set of instruments to trade, different systems covering different timeframes.</p>
<p>One problem is that diversification on all these levels bring on an increase in required starting capital (one likely reason why most Trend Following Wizards have a minimum managed account size in the millions).</p>
<p>So you might have to make a choice in how to apply diversification.</p>
<p>As diversification is really beneficial thanks to the non-correlation it brings, diversifying across different systems could also be a good idea, as systems can be more or less &#8220;engineered&#8221; to be un-correlated to each other (ie a Trend Following system with a Mean Reversion system).<br />
It is also possible to &#8220;trade&#8221; a large portfolio without taking all the signals (by using filters or an overall risk/size limiter).<br />
After all, this is something that the Turtles used to do (when they were at full position size they had to skip signals)<br />
Some ideas to think about&#8230;<br />
&nbsp;<br />
&nbsp;<br />
Credits: Thanks to Trading Blox forum member sluggo for the reminder of how the Turtles used to skip trades, and how filtering trades could enable small accounts to trade a large portfolio &#8211; on <a href="http://www.tradingblox.com/forum/viewtopic.php?p=44931&#038;highlight=skip+turtles#44931" target="_blank">this thread</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/the-good-the-bad-and-the-ugly-portfolios/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Trading Diversification: A Free Lunch?</title>
		<link>http://www.automated-trading-system.com/trading-diversification-free-lunch/</link>
		<comments>http://www.automated-trading-system.com/trading-diversification-free-lunch/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 15:25:41 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[Money Management]]></category>
		<category><![CDATA[Strategies]]></category>
		<category><![CDATA[Trend Following]]></category>
		<category><![CDATA[diversification]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=3370</guid>
		<description><![CDATA[&#160; The more I think about system design, the more I get convinced that diversification is a key to great performance. As the cliche goes: Diversification is the only free lunch on Wall Street. This is a concept equally shared by Modern Portfolio Theorists and Trend Following Wizards, who usually emphasise the concept &#8211; and [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/11/diversified-hats-maiostra.jpg" alt="diversified hats" title="diversified hats" width="450" height="250" class="alignnone size-full wp-image-3372" /><br />
&nbsp;<br />
The more I think about system design, the more I get convinced that <strong>diversification </strong>is a key to great performance.</p>
<p>As the cliche goes:</p>
<blockquote><p>Diversification is the only free lunch on Wall Street.</p></blockquote>
<p>This is a concept equally shared by Modern Portfolio Theorists and <a href="http://www.automated-trading-system.com/resources/trend-following-wizards-fund-performance/">Trend Following Wizards</a>, who usually emphasise the concept &#8211; and are often quoted as trading around 100 different types of instrument, if not more.</p>
<p>The <a href="http://www.automated-trading-system.com/state-of-trend-following-october-2010/">State of Trend Following report</a> contains a decent level of diversification with around <a href="http://www.automated-trading-system.com/wp-content/uploads/2010/08/Instruments.html" target="_blank">50 instruments</a> and I wanted to use this as a base to check the <strong>impact of diversification on performance</strong>.</p>
<p>The idea is to run the same strategy using a subset of the portfolio (ie less instruments = less diversification) and see how it performs.</p>
<p>The problem, though, in selecting a subset of instruments out of the 51 in the original portfolio is that it could affect performance in the same way as any portfolio selection can (ie you could obtain vastly different results in trading the same system with two different sets of instruments, just by virtue of a &#8220;lucky&#8221; pick of strong performers).<span id="more-3370"></span></p>
<h3>Historical Performance</h3>
<p>First, let&#8217;s get a reference point and look at the historical performance of the system chosen for this test: the <strong>20-50 Moving Average system</strong>. Below is the performance back-test of that system over the last 20 years with the original portfolio:</p>
<p><a href="http://www.automated-trading-system.com/wp-content/uploads/2010/11/equity-curve-log.png"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/11/equity-curve-log.png" alt="equity-curve-log" title="equity-curve-log" width="500" height="303" class="alignnone size-full wp-image-3382" /></a></p>
<table style="border:1px solid #c3c3c3; border-collapse:collapse;">
<tr>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3; padding:5px;" colspan="2">
Performance Stats
    </th>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;">
CAGR
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">29.68%</div>
</td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;">
Max DD
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;" align = "right">
<div style="color:black">43.60%</div>
</td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;">
MAR
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
0.68
    </td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;">
Sharpe Ratio
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:5px;" align = "right">
0.59
    </td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;">
Trade Number
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:5px;" align = "right">
3629
    </td>
</tr>
</table>
<p>&nbsp;</p>
<h3>Tests with Less Diversification</h3>
<p>As mentioned below, the idea is to work on a subset of instruments and compare the results with the initial portfolio. To avoid any sort of data mining/hindsight bias in the portfolio selection, I decided to run a <em>Monte-Carlo</em>-like approach to test the system with multiple instrument subset combinations: instead of picking a single portfolio subset of 25 instruments, I&#8217;ll run the system over <strong>1,000 different sub-portfolios, chosen randomly</strong>.</p>
<p>In order to get an idea of how gradually diversification affects the performance, I ran the test in three steps:</p>
<ul>
<li>sub-portfolio of 15 instruments</li>
<li>sub-portfolio of 25 instruments</li>
<li>sub-portfolio of 40 instruments</li>
</ul>
<p>All instruments are picked <strong>at random from the list of 51 instruments</strong> in the original portfolio.</p>
<p>Each of the 3,000 runs generated a full system performance record. Below are plotted the CAGR and Max Drawdown for each instance:</p>
<div id="attachment_3375" class="wp-caption alignnone" style="width: 454px"><a href="http://www.automated-trading-system.com/wp-content/uploads/2010/11/diversification-scatterplot-big.png"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/11/diversification-scatterplot.png" alt="Click to zoom in" title="diversification scatterplot" width="444" height="342" class="size-full wp-image-3375" /></a><p class="wp-caption-text">Click to zoom in</p></div>
<p>The original system is also represented as the yellow dot.</p>
<p>Note that the &#8220;portfolio randomizer&#8221; did not account for any logic in terms of sector allocation. The original portfolio is balanced over several sectors (currencies, energies, rates, agriculturals, etc.) and there is no account for <strong>correlation </strong>between the different instruments (obviously correlation plays a big role in diversification: there is not much point in having dozens of instruments if they are all strongly correlated). However, over the large number of simulations, the main ideas of the test still come through.</p>
<p>Another point is that the only difference between the different runs were regarding the <strong>position sizing</strong> of each trade (fixed fractional), which were adjusted to obtain results of similar magnitude in each test (a portfolio with less instruments will require a slightly higher position size to match the return/drawdown rate of a portfolio with more instruments).</p>
<p>Looking at the plot chart, there are two main observations:</p>
<ul>
<li>We can see the <strong>gradual effect of diversification</strong> improving the system results by &#8220;moving&#8221; the cloud of performance points towards the left (less drawdown) and up (more return).</li>
<li>The other observation is that the <strong>more diversification</strong> there is, the <strong>lower the deviation</strong> in the system results &#8211; therefore providing more <strong>robustness </strong> and less chance of data mining impact from portfolio selection on your back-tests.</li>
</ul>
<h3>Diversification or Why the Coffee Cup Never Jumps</h3>
<p>That last point makes me think of an example discussed by Nassim Taleb in his <a href="http://www.amazon.com/exec/obidos/ASIN/1400063515/autotradblog-20" target="_blank" rel="nofollow">Black Swan</a> explaining the averaging of randomness:</p>
<blockquote><p>
Yet physical reality makes it possible for my coffee cup to jump &#8211; very unlikely, but possible. Particles jump around all the time. How come the coffee cup, itself composed of jumping particles, does not? The reason is, simply, that for the cup to jump would require all of the several trillion particles to jump in the same direction, and do so in lockstep several times in a row. This is not going to happen in the lifetime of this universe</p></blockquote>
<p>Every trade/instrument can be seen as a particle composed of a (large) random element and a smaller edge that we try to extract via a mechanical system.</p>
<p>A portfolio composed of too few instruments would be like drinking your coffee or tea from a cup made up of only a few particles: cups would be jumping around everywhere, making coffee drinking a perilous venture. Same concept applies to trading.</p>
<p>This is the way I see diversification: by adding a <strong>large number of mostly random elements</strong>, you can ensure that random moves have some <strong>cancelling effect</strong> on each other so that your &#8220;trading cup&#8221; never jumps. All that is left is to collect the small edge from all the instruments via your preferred trading strategy(ies).</p>
<p>In effect, this is how casinos operate &#8211; and with diversification you somehow get to be the house!<br />
&nbsp;<br />
&nbsp;<br />
Credits: The use of a portfolio randomizer and the display of results in a CAGR/MaxDD scatterplot was directly inspired from user sluggo on this <a href="http://www.tradingblox.com/forum/viewtopic.php?p=44839&#038;highlight=randomly#44839" target="_blank">Trading Blox forum thread</a>.<br />
&nbsp;<br />
&nbsp;</p>
<div style="font-size: 0.8em;">Hats picture credits: maiostra via flickr (CC)</div>
]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/trading-diversification-free-lunch/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Profit Targets and Trend Following</title>
		<link>http://www.automated-trading-system.com/profit-targets-trend-following/</link>
		<comments>http://www.automated-trading-system.com/profit-targets-trend-following/#comments</comments>
		<pubDate>Thu, 30 Sep 2010 08:27:22 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[Trend Following]]></category>
		<category><![CDATA[profit target]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=3028</guid>
		<description><![CDATA[OK, Profit Targets. You&#8217;ll tell me this is the anti-thesis of Trend Following, with one of its strongest mantra being: Cut you losses short, let your winners run&#8230; Indeed, Trend Following relies on a few positive outlier trades (from a fat-tailed distribution) to derive most of its gains. Stopping trades from running as high as [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/09/target-iksuokaz.jpg" alt="target-iksuokaz" title="target-iksuokaz" width="350" height="235" class="aligncenter size-full wp-image-3040" /></p>
<p>OK, <strong>Profit Targets</strong>. You&#8217;ll tell me this is the anti-thesis of Trend Following, with one of its strongest <em>mantra</em> being:</p>
<blockquote><p>Cut you losses short, let your winners run&#8230;</p></blockquote>
<p>Indeed, Trend Following relies on a <strong>few positive outlier trades</strong> (from a <a href="http://www.automated-trading-system.com/why-trend-following-works-look-at-the-distribution/">fat-tailed distribution</a>) to derive most of its gains. Stopping trades from running as high as they could might not sound like a good idea.</p>
<p>But it is also a tempting idea to try and exit the trade before the typical <strong>Trend Following reversal</strong>, if only to try and smooth the equity curve.</p>
<p>I know about it: I have been there before with my discretionary trading. It is so easy to fall into these two traps (let your losers run and cut your winners short!). That is one of the reasons I decided to trade in a systematic fashion.</p>
<p>Anyway, I digress&#8230; Despite hearing many times over that take-profit orders are detrimental to a Trend Following strategy, I wanted to test this for myself (<em>always double-check your sources&#8230;</em>).</p>
<h3>Profit Target Test</h3>
<p>I ran a quick test using a dual Moving Average cross-over system (the medium-term one from the <a href="http://www.automated-trading-system.com/the-state-of-trend-following-in-august-good-performance/">State of Trend Following report</a>)</p>
<p>The test involved stepping through two different parameters:</p>
<ul>
<li>Target profit level (expressed in multiples of entry ATR).</li>
<li>Percentage of position to sell upon hitting the target profit.</li>
</ul>
<p><span id="more-3028"></span></p>
<p>There are three main cases driven by the position reduction percentage:</p>
<ul>
<li>0% &#8211; no profit target: the position runs as per its normal course (ie. normal system exit signal)</li>
<li>100% &#8211; position is fully exited at the profit target level</li>
<li>a value between 0% and 100%: position is partially exited at the profit target level</li>
</ul>
<p>When partial take-profit orders are executed (eg cut 50% of position after price has risen/fallen by 6x ATR), the rest of the position gets liquidated when price rises/falls by another ATR-multiple.</p>
<h3>The Results</h3>
<p>Below are the results in graphical 2D and 3D form. Each surface chart represents the metric output (CAGR or MAR) for each stepped parameter pair.</p>
<p><strong>CAGR results in 3D and 2D</strong> &#8211; click to expand the charts:<br />
<a href="http://www.automated-trading-system.com/wp-content/uploads/2010/09/ScreenShot004.jpg"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/09/ScreenShot004-300x217.jpg" alt="CAGR-3d" title="CAGR-3d" width="300" height="217" class="alignnone size-medium wp-image-3027" /></a></p>
<p><a href="http://www.automated-trading-system.com/wp-content/uploads/2010/09/ScreenShot003.jpg"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/09/ScreenShot003-300x218.jpg" alt="CAGR-2d" title="CAGR-2d" width="300" height="218" class="alignnone size-medium wp-image-3029" /></a></p>
<p><strong>MAR results in 3D and 2D</strong> &#8211; click to expand the charts:<br />
<a href="http://www.automated-trading-system.com/wp-content/uploads/2010/09/ScreenShot385.jpg"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/09/ScreenShot385-300x218.jpg" alt="MAR-3d" title="MAR-3d" width="300" height="218" class="alignnone size-medium wp-image-3031" /></a></p>
<p><a href="http://www.automated-trading-system.com/wp-content/uploads/2010/09/ScreenShot001.jpg"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/09/ScreenShot001-300x218.jpg" alt="MAR-2d" title="MAR-2d" width="300" height="218" class="alignnone size-medium wp-image-3030" /></a><br />
&nbsp;<br />
Both CAGR and MAR clearly display their <strong>maximum</strong> at the 0% level for position reduction &#8211; which means <strong>no profit target</strong>.</p>
<p>This is probably just one more example of the benefits of letting winners run.</p>
<p>Of course this is just a one-off, very simplified example and should not necessarily be used for generalisation&#8230; But it should not be a surprise that Trend Following&#8217;s performance is negatively impacted when breaking one of its fundamental principles&#8230;.</p>
<p>There might be still some benefits in trying to identify potential reversal points &#8211; as is sometimes being advertised by some CTAs (BlueTrend comes to mind) &#8211; in order to cut positions early. But I believe the approach needs to be more specific/sophisticated than a blanket ATR-multiple Take-Profit order.</p>
<h3>EDIT: Updated Test Results</h3>
<p>I realised after writing the post that there was a &#8220;trend&#8221; in the results with performance seemingly improving as the profit target moved higher. I decided to complete the test by running it all the way to 40x ATR as profit target. Below are the results:<br />
<a href="http://www.automated-trading-system.com/wp-content/uploads/2010/09/ScreenShot006.jpg"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/09/ScreenShot006-300x218.jpg" alt="CAGR-40x-3D" title="CAGR-40x-3D" width="300" height="218" class="alignnone size-medium wp-image-3051" /></a><br />
<a href="http://www.automated-trading-system.com/wp-content/uploads/2010/09/ScreenShot005.jpg"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/09/ScreenShot005-300x218.jpg" alt="MAR-40x-3D" title="MAR-40x-3D" width="300" height="218" class="alignnone size-medium wp-image-3052" /></a><br />
&nbsp;<br />
We can see some small pockets of over-performance on areas outside of the 0%/no profit-taking orders, but given the variability within the results, they may well be down to random variation&#8230;<br />
&nbsp;</p>
<div style="font-size: 0.8em;">Target picture credits: iksuokaz via flickr (CC)</div>
]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/profit-targets-trend-following/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>A Different Application of the Bootstrap</title>
		<link>http://www.automated-trading-system.com/a-different-application-of-the-bootstrap/</link>
		<comments>http://www.automated-trading-system.com/a-different-application-of-the-bootstrap/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 08:27:44 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[bootstrap]]></category>
		<category><![CDATA[volatility]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=2998</guid>
		<description><![CDATA[In the last volatility filters post we saw that trades from a simple Trend Following system (20-50 MA cross-over) had different expectancy based on the relative level of volatility at trade entry. This suggested that a filter blocking trades most volatile at entry (in the top decile: 90 to 100% of past volatility) would raise [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/09/random-numbers-artnoose.jpg" alt="random-numbers-artnoose" title="random-numbers-artnoose" width="255" height="190" class="alignleft size-full wp-image-3012" />In the last <a href="http://www.automated-trading-system.com/volatility-filters/">volatility filters</a> post we saw that trades from a simple Trend Following system (20-50 MA cross-over) had  <strong>different expectancy based on the relative level of volatility</strong> at trade entry. This suggested that a filter blocking trades most volatile at entry (in the top decile: 90 to 100% of past volatility) would raise the expectancy per trade.</p>
<p>However, this conclusion was obtained via a <strong>single observation</strong> (ie. one back-test sample). Ideally we want many samples, to be able to establish more robust conclusions &#8211; or at least be able to calculate a <strong>level of confidence</strong> in the result from our one observation.</p>
<p>And this is where the <a href="http://www.automated-trading-system.com/bootstrap-test/"><strong>bootstrap test</strong></a> comes in handy. In this post I&#8217;ll try and illustrate how we can apply the bootstrap concept to a slightly different problem, in order to strengthen back-testing research results.</p>
<h3>Bootstrap to compare two populations</h3>
<p>Instead of using the bootstrap test to check if the profitability of a single back-test is statistically significant, we use it to check whether the <strong>difference between 2 sample groups</strong> is statistically significant. Here, the 2 sample groups are:<span id="more-2998"></span></p>
<ol>
<li>Trades with entry volatility at 0-90% of historical levels (lower-volatility group)</li>
<li>Trades with entry volatility at 90-100% of historical levels (high-volatility group)</li>
</ol>
<p>The difference between the 2 groups can be measured by the difference of the means of each group. In the original samples, the difference between the <strong>R-multiple mean values</strong> was fairly high with a ratio of nearly 3-to-1::</p>
<ol>
<li>Lower-volatility group: Average R-multiple = 0.27</li>
<li>High-volatility group: Average R-multiple = 0.10</li>
</ol>
<p>However, this difference could be down to <strong>random variation</strong>. Running a statistical test such as a bootstrap will enable us to determine a <strong>level of confidence</strong> in the results.</p>
<p>Similarly to a <a href="http://en.wikipedia.org/wiki/Student%27s_t-test#Unpaired_and_paired_two-sample_t-tests<br />
" target="_blank" rel="nofollow">two-sample t-test</a>, we need to formulate the null hypothesis (H0):</p>
<blockquote><p>H0: the mean of each group is identical (mean1 = mean2). This is equivalent to the difference of the means being nil (mean1 &#8211; mean2 = 0)</p></blockquote>
<p>with the alternative hypothesis (Ha):</p>
<blockquote><p>Ha: the mean of group 1 (lower volatility group) is higher than the mean of group 2</p></blockquote>
<p>The goal of the bootstrap test is to generate the <strong>sampling distribution of the difference of the means</strong> and to calculate a p-value for rejecting the null hypothesis.</p>
<p>Here are the steps to follow:</p>
<ol>
<li>Form two samples. Each sample contains all trades&#8217; R-multiple values for one of the group.</li>
<li>For each resample, select random instances (with replacement) of R-multiples from each group (same number of instances as the group count). Calculate the mean for each group and compute their difference (bootstrapped statistic).</li>
<li>Perform a large number of resamples to generate a large number of bootstrapped statistics (difference of the means between the 2 group resamples).</li>
<li>Form the sampling distribution of the difference of means generated in the step above.</li>
<li>Derive the p-value of the difference of the means being 0 or less</li>
</ol>
<p>For the case under study, the bootstrap gave us this sampling distribution (10,000 resamples):</p>
<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/09/sampling-distribution.png" alt="sampling-distribution" title="sampling-distribution" width="467" height="317" class="aligncenter size-full wp-image-3001" /></p>
<p>We can calculate the <strong>p-value</strong>, which is <strong>0.0276</strong> (97.24% of the observations are positive, leaving only 2.76% zero or negative). We can therefore reject the null hypothesis.</p>
<p>The conclusion is that the result is statistically significant at the 5% level (p-value less than 0.05): there is only a slim chance (2.74%) that the null hypothesis is true (<a href="http://en.wikipedia.org/wiki/Type_I_and_type_II_errors#Type_I_error" target="_blank" rel="nofollow">Type I error</a>).</p>
<p>So, the filter seems to markedly improve the performance of the system. But of course, this is not a panacea&#8230; It is very well possible that a filtered trade might end up being a large runner.<br />
With Trend Following&#8217;s dependency on infrequent large winners, missing a major trade because it has been filtered out could make a big difference to that year&#8217;s performance.<br />
&nbsp;</p>
<div style="font-size: 0.8em;">Random Numbers picture credits: artnoose via flickr (CC)</div>
]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/a-different-application-of-the-bootstrap/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Volatility Filters</title>
		<link>http://www.automated-trading-system.com/volatility-filters/</link>
		<comments>http://www.automated-trading-system.com/volatility-filters/#comments</comments>
		<pubDate>Thu, 23 Sep 2010 16:47:12 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[Trend Following]]></category>
		<category><![CDATA[Trading Blox]]></category>
		<category><![CDATA[volatility]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=2971</guid>
		<description><![CDATA[I have touched on trading regimes before; and looking at volatility-based regime switching was in my research stack since then. Today, I&#8217;m looking at a practical example: Trend Following results based on entry vs. past volatility. System Code Concept I developed a simple Trading Blox filter, which calculates the current volatility (via the Average True [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/09/filter-noortje.jpg" alt="filter-noortje" title="filter-noortje" width="240" height="300" class="alignleft size-full wp-image-2990" />I have touched on <a href="http://www.automated-trading-system.com/trading-regimes-strategy-filters/">trading regimes</a> before; and looking at <strong>volatility-based regime switching</strong> was in my research stack since then. Today, I&#8217;m looking at a practical example: <strong>Trend Following</strong> results based on <strong>entry vs. past volatility</strong>.</p>
<div></div>
<h3>System Code Concept</h3>
<p>I developed a simple Trading Blox filter, which calculates the <strong>current volatility</strong> (via the Average True Range) and its <a href="http://en.wikipedia.org/wiki/Percentile_rank" target="_blank" rel="nofollow"><strong>percentile rank</strong></a> over the past data.</p>
<p>The filter defines a range of accepted volatility ranking values, for which a trade can be taken. This would allow for a system to reject all trades for which volatility is too high (eg. in the top decile) or too low, or a mix of both.</p>
<p>The filter code is available for download at the end of this article. The parameters I used were 39 days for the (exponential) ATR and a lookback of 250 days for the percentile ranking.</p>
<p>The actual system tested here is a classic 20/50 <strong>Moving Average cross-over</strong> used in the <a href="http://www.automated-trading-system.com/category/trend-following/the-state-of-trend-following/">State of TF report</a>, using the same <a href="http://www.automated-trading-system.com/wp-content/uploads/2010/05/Instruments.html" target="_blank">diversified portfolio</a>.</p>
<h3>Volatility: Good or Bad?</h3>
<p>Trend Following is often thought of as a <strong>&#8220;long volatility&#8221;</strong> strategy, but could high volatility prior to trade entry be detrimental?<span id="more-2971"></span></p>
<p>In effect, Trend Following usually generates lots of small losers balanced out by small and medium winners, the positive performance coming from some large winners (from the <a href="http://www.automated-trading-system.com/why-trend-following-works-look-at-the-distribution/">fat-tails</a>). That&#8217;s one way of looking at it &#8211; which can be illustrated with this distribution of R-multiples for the 20/50 MA cross-over system:</p>
<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/09/R-multiple.png" alt="R-multiple" title="R-multiple" width="480" height="486" class="aligncenter size-full wp-image-2974" /></p>
<p>All winning trades from 0R to 7R can be seen as balancing out the losing trades (mostly between 0R and 1R), whereas the &#8220;big hitter&#8221; trades (8R+) make up the profitability of the system.</p>
<p>If using a classic <strong>fixed fractional money management</strong> based on volatility (for example R = trade entry risk = 3 ATR = 1% equity), the R-multiple is akin to a volatility multiple. And with relatively high entry volatility, it is less likely that the volatility multiple can reach high values, and therefore the system is less likely to generate &#8220;big hitting&#8221; trades.</p>
<p>This is what we&#8217;re going to check.</p>
<h3>System Test Results</h3>
<p>In order to test the impact of trade entry volatility levels on <strong>trade profitability</strong>, I ran the system in steps, with the volatility filter boundaries covering each distinct decile (ie.  between 0 and 10%, 10% and 20%, etc.)</p>
<p>The results are below:</p>
<table style="border:1px solid #c3c3c3; border-collapse:collapse;">
<tr>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
      ATR Rank
    </th>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
      # Trades
    </th>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
      Win %
    </th>
</th>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
      Pct Profit factor
    </th>
</th>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
      R-multiple
    </th>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
0-10
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1511
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.234
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1.76
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.47
    </td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
10-20
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1615
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.272
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1.82
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.52
    </td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
20-30
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1671
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.281
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1.67
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.42
    </td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
30-40
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1676
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.262
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1.55
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.36
    </td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
40-50
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1698
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.276
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1.48
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.31
    </td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
50-60
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1663
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.283
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1.53
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.34
    </td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
60-70
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1587
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.301
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1.71
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.43
    </td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
70-80
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1583
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.312
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1.47
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.3
    </td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
80-90
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1452
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.293
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1.36
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.23
    </td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
90-100
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1295
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.275
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1.18
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.12
    </td>
</tr>
</table>
<p>&nbsp;<br />
There does seem to be a negative trend between trade average R-multiple and relative volatility value:</p>
<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/09/Trade-Stats1.png" alt="Trade-Stats" title="Trade-Stats" width="371" height="251" class="aligncenter size-full wp-image-2976" /></p>
<p>What is quite striking is that the Win % does not change much across all deciles (and if anything goes slightly up), unlike the average R-multiple. This seems to indicate that the winning trades simply fail to hit these high R-values when volatility is high at time of entry.</p>
<p>Below are the results when zooming in on the top decile:</p>
<table style="border:1px solid #c3c3c3; border-collapse:collapse;">
<tr>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
      ATR Rank
    </th>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
      # Trades
    </th>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
      Win %
    </th>
</th>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
      Pct Profit factor
    </th>
</th>
<th style="background-color:#e5eecc; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
      R-multiple
    </th>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
91-100
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1254
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.257
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1.11
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.07
    </td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
92-100
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1215
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.255
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1.11
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.07
    </td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
93-100
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1169
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.243
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1.02
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.01
    </td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
94-100
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1135
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.234
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1.02
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.01
    </td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
95-100
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1068
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.23
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.98
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
-0.01
    </td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
96-100
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1021
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.231
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.98
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
-0.02
    </td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
97-100
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
914
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.228
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0
    </td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
98-100
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
882
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.221
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.98
    </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
-0.01
    </td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;">
99-100
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
814
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.211
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
1.06
    </td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3;  padding:2px; font-size: 0.8em;" align = "right">
0.05
    </td>
</tr>
</table>
<p>&nbsp;<br />
Adding these high volatility trades might result in extra diversification (if one is to adopt the logic of &#8220;<em>the more the merrier</em>&#8220;) but they definitely do not seem to be the best use of your (probably precious) margin. If your available margin allows you to trade 50 instruments with no volatility filter, you might be able to trade 55 instruments at 90% max volatility instead, and get a better trade profitability.</p>
<p>In any case I ran a quick test by filtering the high volatility trades at 90%, 95% and 100% (no filtering) and the results show an improvement when filtering:</p>
<ul>
<li>90%: CAGR = 53.65%, MAR = 0.73</li>
<li>95%: CAGR = 52.90%, MAR = 0.68</li>
<li>100%: CAGR = 46.08%, MAR = 0.5</li>
</ul>
<h3>Code Download</h3>
<p>The Trading Blox code is composed of 2 blox:
<ul>
<ul>
<li>Auxiliary Blox, which calculates the percent rank for the ATR</li>
<li>Portfolio Filter Blox, which stops trades from being entered if they breach the acceptable percent rank range.</li>
</ul>
<p>These could be added to any standard system without modifications.</p>
<p><a href='http://www.automated-trading-system.com/wp-content/uploads/2010/09/Aux_ATRPctRank1.tbx'>Aux_ATRPctRank</a><br />
<a href='http://www.automated-trading-system.com/wp-content/uploads/2010/09/Port_ATRRankFilter.tbx'>Port_ATRRankFilter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/volatility-filters/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Walk-Forward in Trading Blox: Back-Testing Adaptive Trading</title>
		<link>http://www.automated-trading-system.com/walk-forward-trading-blox/</link>
		<comments>http://www.automated-trading-system.com/walk-forward-trading-blox/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 13:58:11 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Trading Blox]]></category>
		<category><![CDATA[walk-forward]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=2866</guid>
		<description><![CDATA[A few months ago, I got quite interested when Trading Blox announced that they introduced a new walk-forward functionality in their latest version. I just got round to upgrading, and giving that walk-forward testing a go. Amongst other things, some of the chart features have been improved &#8211; as can be seen in the eye [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/09/surface-chart.png" alt="surface-chart" title="surface-chart" width="480" height="394" class="aligncenter size-full wp-image-2867" /></p>
<p>A few months ago, I got quite interested when Trading Blox announced that they introduced a <strong>new walk-forward functionality</strong> in their latest version. I just got round to upgrading, and giving that walk-forward testing a go. Amongst other things, some of the chart features have been improved &#8211; as can be seen in the <em>eye candy</em> above.</p>
<h3>How it works</h3>
<p>You can check this previous <a href="http://www.automated-trading-system.com/walk-forward-testing/">post for an explanation of how walk-forward works</a>, from a general point of view. Robert Pardo (usually credited with the invention of walk-forward) has also written <a href="http://www.amazon.com/exec/obidos/ASIN/0470128011/autotradblog-20" target="_blank" rel="nofollow">his book</a>few books</a> on the subject.</p>
<p>This new feature is a combination of small enhancements to the core application (ie. silent tests, dynamic date and starting equity settings, etc.) and a semi-custom script implementing the walk-forward testing procedure. It feels more like a (good) hack leveraging the core stepping functionality, rather than a functionality built from the ground up, but it does the job rather well (I looked at the underlying code and its ingenuity is actually pretty cool).<span id="more-2866"></span></p>
<p>A minor issue is that you have to work out the number of optimization/out-of-sample cycles. If you get that wrong, the test will not cover the desired time interval and it makes the process less automated. Apart from that, the settings are pretty straight-forward, you can choose lengths of optimization and out-of-sample phases as well as other options:</p>
<div id="attachment_2871" class="wp-caption aligncenter" style="width: 418px"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/09/walk-forward-options.png" alt="In the setting above, there are 8 cycles, each having a 5-year optimization phase and 1-year out-of-sample phase" title="walk-forward-options" width="408" height="246" class="size-full wp-image-2871" /><p class="wp-caption-text">In the settings above, there are 8 cycles, each having a 5-year optimization phase and 1-year out-of-sample phase</p></div>
<h3>Objective Function</h3>
<p>At the end of the <strong>optimization phase</strong> of each cycle, the system picks the best set of parameters to be used in the <strong>out-of-sample phase</strong>. However there are many ways to determine the <strong><em>best</em> system</strong>. Do you use raw CAGR, MAR, Sharpe ratio, etc.?</p>
<p>There is a need to define the <strong>objective function</strong> (also called <a href="http://www.automated-trading-system.com/bliss-function-quantify-trading-system-objective/">bliss function, as explained here</a>, which will be used to determine the best system performance.</p>
<p>Trading Blox calculates standard statistics (MAR, CAGR, Drawdown, etc.) which can all be used as the objective function, but also allows the implementation of custom statistics calculations. These <strong>custom statistics</strong> can then be used as the objective function.</p>
<h3>Output</h3>
<p>This is where you realise the functionality is not fully integrated into the app. The system shows the individual results of each out-of-sample runs:</p>
<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/09/wf-results1.png" alt="wf-results" title="wf-results" width="480" height="112" class="aligncenter size-full wp-image-2874" /></p>
<p>The stats calculated relate to each out-of-sample run (1 year in my example), whereas ideally these should all be spliced together, to form <strong>one system</strong> with its own stats. Same applies to equity curves, which are charted year by year (as individual charts). It is still possible to access the Daily Equity log file to do this yourself but it would be nice to have it better automated. The fact that it is a script and not compiled core code might make it possible to customize it to implement this automation.</p>
<p>Another log file also allows you to investigate the results of each optimization run and check their performance:</p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;">Starting optimization run ,225,2005-01-03, <span style="color: #8D38C9; font-weight: bold;">to</span> ,2010-01-01, <span style="color: #8D38C9; font-weight: bold;">with</span> starting equity ,166470686.069881530,
&nbsp;
Run ,225, of ,256, Stepped Parameters: ,
Name,<span style="color: #8D38C9; font-weight: bold;">Step</span> Value,Goodness Measure of ,64.497285767,
Run ( Index ),8.000000000,
Optimization Run,1.000000000,
Entry Breakout (days),20.000000000,
<span style="color: #E56717; font-weight: bold;">Exit</span> Breakout (days),10.000000000,
Starting optimization run ,226,2005-01-03, <span style="color: #8D38C9; font-weight: bold;">to</span> ,2010-01-01, <span style="color: #8D38C9; font-weight: bold;">with</span> starting equity ,166470686.069881530,
&nbsp;
&nbsp;
----------------------------------------,
Best goodness of ,64.497285767, was <span style="color: #151B8D; font-weight: bold;">on</span> run ,1.000000000,
----------------------------------------,
&nbsp;
Starting out of sample test ,241,2010-01-01, <span style="color: #8D38C9; font-weight: bold;">to</span> ,2010-09-07, <span style="color: #8D38C9; font-weight: bold;">with</span> starting equity ,166470686.069881530,</pre></div></div>

<h3>Test Results</h3>
<p>For my first &#8220;test ride&#8221; of the walk-forward functionality, I used the <em>good ol&#8217;</em> <strong>Donchian system</strong>.</p>
<p>The system parameters being tested are the Entry and Exit breakout lengths ranging from 20 to 50 days for the entry and 10 to 25 days for the exit.</p>
<p>The parameters for the walk-forward procedure are a <strong>5-year optimization phase and 1-year out-of-sample phase</strong> with the plain CAGR stat being used as the objective/bliss/goodness function. The dates of the test go from 1998 to 2010 (but bear in mind that the first out-of-sample result is from 2003, ie. 1998 to 2002 are used as first optimization period).</p>
<p>The results (year by year) are the ones shown in the section above.</p>
<p>For an interesting comparison, I ran a standard stepped test using the same Donchian system and parameter values. Check below how the walk-forward system performance stacks up against the range of outputs from the stepped test:</p>
<div id="attachment_2878" class="wp-caption aligncenter" style="width: 462px"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/09/perf-results.png" alt="walk-forward in yellow" title="perf-results" width="452" height="325" class="size-full wp-image-2878" /><p class="wp-caption-text">All test results with the walk-forward result in yellow</p></div>
<p>In hindsight, it would have been better to pick other systems that performed better, but the advantage of the walk-forward process is that it adapts itself to pick a system.</p>
<h3>In Closing</h3>
<p>The walk-forward functionality is definitely not a fully-fledged feature of Trading Blox (yet?) &#8211; however it does allow for some automation of the process. The fact that it is &#8220;open&#8221; is probably a good thing as it can be tinkered with and improved easily. A nice addition to the product&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/walk-forward-trading-blox/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Monte Carlo Permutation: Test your Back-Tests</title>
		<link>http://www.automated-trading-system.com/monte-carlo-permutation/</link>
		<comments>http://www.automated-trading-system.com/monte-carlo-permutation/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 13:18:25 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[aronson]]></category>
		<category><![CDATA[monte-carlo]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=2770</guid>
		<description><![CDATA[&#160; The second method to evaluate the statistical significance of a back-test result presented by Aronson (in EBTA) is the Monte Carlo Permutation. This is an extension of the classic Monte Carlo method, applied to rule testing. The concept behind the Monte Carlo Permutation is similar to the Bootstrap method: Generate multiple random outputs based [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/08/MC-Kristian-Golding.jpg" alt="MC-Kristian Golding" title="MC-Kristian Golding" width="500" height="219" class="alignnone size-full wp-image-2800" /><br />
&nbsp;<br />
The second method to evaluate the <strong>statistical significance</strong> of a back-test result presented by Aronson (in <a href="http://www.automated-trading-system.com/evidence-based-technical-analysis-aronson-book/" target="_blank">EBTA</a>) is the <strong>Monte Carlo Permutation</strong>. This is an extension of the classic <a href="http://en.wikipedia.org/wiki/Monte_Carlo_method" target="_blank" rel="nofollow">Monte Carlo method</a>, applied to rule testing.</p>
<p>The concept behind the Monte Carlo Permutation is similar to the <a href="http://www.automated-trading-system.com/bootstrap-test/">Bootstrap method</a>:</p>
<ul>
<li>Generate multiple random outputs based on the single sample data from the back-test.</li>
<li>compare the random Monte Carlo outputs to the back-test output to evaluate its statistical significance.</li>
</ul>
<p>The difference lies in how the multiple random outputs are generated. Whereas the bootstrap generates a sampling distribution for the back-tested rule return, the Monte Carlo Permutation focuses on the <strong>pairing</strong> of the <strong>rule positions</strong> with the <strong>instrument daily return</strong>. Its resampling randomly associates the rule positions with the market returns, without replacement.</p>
<p>The H0 hypothesis in the Monte Carlo Permutation test asserts that the returns of the rule evaluated are a sample from a non-profitable population, or, in other words, that rule positions are randomly correlated to market returns.</p>
<h3>Monte Carlo Illustration</h3>
<p>Imagine the following back-test result, presented day by day:<span id="more-2770"></span></p>
<table style="border-collapse:collapse;">
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;"><strong>Day</strong></td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">1</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">2</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">3 </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">4</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">5</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">6</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">7</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">8</td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;"><strong>Rule&nbsp;Position</strong></td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">Long</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">Long</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">Long</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">No&nbsp;Pos</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">No&nbsp;Pos</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">Short</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">Short</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">Short</td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;"><strong>Market&nbsp;Return</strong></td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">0.54%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:red">-0.32%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">1.54%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">0.69%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:red">-1.02%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:red">-0.68%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">1.20%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:red">-2.50%</div>
</td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;"><strong>Output</strong></td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">0.54%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:red">-0.32%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">1.54%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">0.00%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">0.00%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">0.68%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:red">-1.20%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">2.50%</div>
</td>
</tr>
<tr>
<td style="background-color:#eeeeee; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;"><strong>Mean&nbsp;Return</strong></td>
<td style="background-color:#eeeeee; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black"><strong>0.47%</strong></div>
</td>
<td colspan=7 style="background-color:#ffffff; border:#ffffff;"></td>
</table>
<p>&nbsp;</p>
<p>There are effectively two <em>input</em> time series:</p>
<ul>
<li>Rule Positions</li>
<li>Market Returns</li>
</ul>
<p>The way these two time series are linked (by date) produces the daily output for the rule return &#8211; and a mean return can be calculated.</p>
<p>The permutation of the Monte Carlo method will reshuffle one time series to produce random links, or pairing, and produce a different rule output.</p>
<p>Two examples can be found below. The market return time series has been randomly reshuffled to produce two different sample outputs:</p>
<table style="border-collapse:collapse;">
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;"><strong>Day</strong></td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">1</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">2</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">3 </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">4</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">5</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">6</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">7</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">8</td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;"><strong>Rule&nbsp;Position</strong></td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">Long</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">Long</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">Long</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">No&nbsp;Pos</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">No&nbsp;Pos</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">Short</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">Short</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">Short</td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;"><strong>Market&nbsp;Return</strong></td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">1.20%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">0.17%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">0.54%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">1.54%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:red">-0.32%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:red">-0.68%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:red">-0.33%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:red">-1.02%</div>
</td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;"><strong>Output</strong></td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">1.20%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">0.17%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">0.54%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">0.00%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">0.00%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">0.68%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">0.33%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">1.02%</div>
</td>
</tr>
<tr>
<td style="background-color:#eeeeee; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;"><strong>Mean&nbsp;Return</strong></td>
<td style="background-color:#eeeeee; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black"><strong>0.49%</strong></div>
</td>
<td colspan=7 style="background-color:#ffffff; border:#ffffff;"></td>
</table>
<p>&nbsp;</p>
<table style="border-collapse:collapse;">
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;"><strong>Day</strong></td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">1</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">2</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">3 </td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">4</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">5</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">6</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">7</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">8</td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;"><strong>Rule&nbsp;Position</strong></td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">Long</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">Long</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">Long</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">No&nbsp;Pos</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">No&nbsp;Pos</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">Short</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">Short</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;">Short</td>
</tr>
<tr>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;"><strong>Market&nbsp;Return</strong></td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:red">-0.68%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:red">-0.32%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">1.20%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:red">-0.33%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">0.17%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">0.54%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">0.69%</div>
</td>
<td style="background-color:#f3f3f3; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:red">-2.50%</div>
</td>
</tr>
<tr>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;"><strong>Output</strong></td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:red">-0.68%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:red">-0.32%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">1.20%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">0.00%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">0.00%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:red">-0.54%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:red">-0.69%</div>
</td>
<td style="background-color:#ffffff; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black">2.50%</div>
</td>
</tr>
<tr>
<td style="background-color:#eeeeee; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;"><strong>Mean&nbsp;Return</strong></td>
<td style="background-color:#eeeeee; border:1px solid #c3c3c3; padding:2px; font-size: 0.8em;" align = "right">
<div style="color:black"><strong>0.18%</strong></div>
</td>
<td colspan=7 style="background-color:#ffffff; border:#ffffff;"></td>
</table>
<p>&nbsp;</p>
<p>The Monte Carlo Permutation produces a large number of these random outputs. The <strong>p-value</strong> of the original back-testing sample can then be computed (it is equal to the fraction of random rule returns equal or greater to the back-tested rule return).</p>
<p>Note that Aronson once again recommends to run the back-test evaluated by the Monte Carlo Permutation on <strong>detrended data</strong>. It is also mentioned that Timothy Masters (who got the idea of applying the Monte Carlo method to rule testing) has performed tests showing that the bootstrap and Monte Carlo Permutation methods produce similar results <em>when using detrended data</em>.</p>
<h3>Step by Step with Data Mining Bias Handling</h3>
<p>Of course when applying this method to more than one rule, <strong>data mining bias</strong> comes into play.</p>
<p>The methodology for the Monte Carlo Permutation for data mining back-testing can be broken down as follows:</p>
<ol>
<li><em>N </em>back-tests are  run on detrended data. Both <strong>rule position</strong> and <strong>market return time series</strong> are collected for the back-tested rules.</li>
<li>The <strong>market return time series is randomly reshuffled and paired with each of the <em>N </em>rule position time series</strong> to produce a new daily rule output time series for each rule. The same pairings must be used for all rules to ensure that the potential correlation structure present in the rules is preserved.</li>
<li>A <strong>mean daily return</strong> is calculated for each of the <em>N </em>rules &#8211; the best return is selected as the value for the sampling distribution in this iteration</li>
<li>Repeat steps 2 and 3 a large number of times</li>
<li>Form the sampling distribution of the best means generated in the steps above.</li>
<li>Derive the <strong>p-value</strong> of the best back-test mean return based on the sampling distribution.</li>
</ol>
<h3>Some &#8220;Criticisms&#8221;</h3>
<p>Aronson mentions that since the Monte Carlo Permutation does not test a hypothesis about the rule&#8217;s mean return (H0 is about random correlation of positions and market returns) it is not possible to use it to derive <strong>confidence intervals</strong> &#8211; as could be done with the bootstrap sampling distribution.</p>
<p>The method also requires <strong>access to more information</strong> than the bootstrap (which only needs the daily rule returns). It makes it impossible to apply to &#8220;black box&#8221; systems or programs. For example, the Monte Carlo Permutation method would not enable us to check the statistical significance of a Trend following Wizard as was done in <a href="http://www.automated-trading-system.com/bootstrap-take-2-data-mining-bias-code-and-using-geometric-mean/">bootstrap post #2</a>.</p>
<p>The same remark concerning the use of <strong>arithmetic mean return</strong> instead of geometric mean return applies here also, but that can be easily modified.</p>
<p>Finally, the method, as formulated, only considers <strong>extremely simple cases of money management</strong> with identical size for all positions. The method would need to be adapted to be used for rules with more complex money management strategies.</p>
<p>I&#8217;ll let you come to your conclusions and experimentations but it does seem like the Monte Carlo Permutation method has more weak points than the Bootstrap test.<br />
&nbsp;<br />
&nbsp;</p>
<div style="font-size: 0.8em;">Monte Carlo picture credits: Kristian Golding via flickr (CC)</div>
]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/monte-carlo-permutation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

