<?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>Wed, 08 Sep 2010 20:32:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<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 [...]


Related posts:<ol><li><a href='http://www.automated-trading-system.com/walk-forward-testing/' rel='bookmark' title='Permanent Link: How can Walk-Forward testing keep your system a step ahead?'>How can Walk-Forward testing keep your system a step ahead?</a></li>
<li><a href='http://www.automated-trading-system.com/mmdi-portfolio-filter-trading-blox/' rel='bookmark' title='Permanent Link: MMDI Portfolio Filter in Trading Blox'>MMDI Portfolio Filter in Trading Blox</a></li>
<li><a href='http://www.automated-trading-system.com/tradersstudio-systems-testing-software/' rel='bookmark' title='Permanent Link: TradersStudio: the best Systems testing software?'>TradersStudio: the best Systems testing software?</a></li>
</ol>]]></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: #000080;">to</span> ,2010-01-01, <span style="color: #000080;">with</span> starting equity ,166470686.069881530,
&nbsp;
Run ,225, of ,256, Stepped Parameters: ,
Name,<span style="color: #000080;">Step</span> Value,Goodness Measure of ,64.497285767,
Run ( Index ),8.000000000,
Optimization Run,1.000000000,
Entry Breakout (days),20.000000000,
<span style="color: #000080;">Exit</span> Breakout (days),10.000000000,
Starting optimization run ,226,2005-01-03, <span style="color: #000080;">to</span> ,2010-01-01, <span style="color: #000080;">with</span> starting equity ,166470686.069881530,
&nbsp;
&nbsp;
----------------------------------------,
Best goodness of ,64.497285767, was <span style="color: #000080;">on</span> run ,1.000000000,
----------------------------------------,
&nbsp;
Starting out of sample test ,241,2010-01-01, <span style="color: #000080;">to</span> ,2010-09-07, <span style="color: #000080;">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>
<img src="http://www.automated-trading-system.com/?ak_action=api_record_view&id=2866&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.automated-trading-system.com/walk-forward-testing/' rel='bookmark' title='Permanent Link: How can Walk-Forward testing keep your system a step ahead?'>How can Walk-Forward testing keep your system a step ahead?</a></li>
<li><a href='http://www.automated-trading-system.com/mmdi-portfolio-filter-trading-blox/' rel='bookmark' title='Permanent Link: MMDI Portfolio Filter in Trading Blox'>MMDI Portfolio Filter in Trading Blox</a></li>
<li><a href='http://www.automated-trading-system.com/tradersstudio-systems-testing-software/' rel='bookmark' title='Permanent Link: TradersStudio: the best Systems testing software?'>TradersStudio: the best Systems testing software?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/walk-forward-trading-blox/feed/</wfw:commentRss>
		<slash:comments>2</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 on the single [...]


Related posts:<ol><li><a href='http://www.automated-trading-system.com/bootstrap-test/' rel='bookmark' title='Permanent Link: The Bootstrap Test: How significant are your back-testing results?'>The Bootstrap Test: How significant are your back-testing results?</a></li>
<li><a href='http://www.automated-trading-system.com/evidence-based-technical-analysis-aronson-book/' rel='bookmark' title='Permanent Link: Evidence-Based Technical Analysis'>Evidence-Based Technical Analysis</a></li>
<li><a href='http://www.automated-trading-system.com/au-tra-sy-blog-summer-break/' rel='bookmark' title='Permanent Link: Au.Tra.Sy blog Summer Break'>Au.Tra.Sy blog Summer Break</a></li>
</ol>]]></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>
<img src="http://www.automated-trading-system.com/?ak_action=api_record_view&id=2770&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.automated-trading-system.com/bootstrap-test/' rel='bookmark' title='Permanent Link: The Bootstrap Test: How significant are your back-testing results?'>The Bootstrap Test: How significant are your back-testing results?</a></li>
<li><a href='http://www.automated-trading-system.com/evidence-based-technical-analysis-aronson-book/' rel='bookmark' title='Permanent Link: Evidence-Based Technical Analysis'>Evidence-Based Technical Analysis</a></li>
<li><a href='http://www.automated-trading-system.com/au-tra-sy-blog-summer-break/' rel='bookmark' title='Permanent Link: Au.Tra.Sy blog Summer Break'>Au.Tra.Sy blog Summer Break</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/monte-carlo-permutation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bootstrap &#8211; Take 2: Data Mining bias, Code and using geometric mean</title>
		<link>http://www.automated-trading-system.com/bootstrap-take-2-data-mining-bias-code-and-using-geometric-mean/</link>
		<comments>http://www.automated-trading-system.com/bootstrap-take-2-data-mining-bias-code-and-using-geometric-mean/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 06:45:53 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[aronson bootstrap data mining]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=2714</guid>
		<description><![CDATA[
In part 1 of this bootstrap post, we looked at how to apply the method to establish the statistical significance of a single trading rule. In Part 2, we&#8217;ll look at how to deal with the data mining bias, the impact of geometric vs. arithmetic mean return. The code implementing the bootstrap test is available [...]


Related posts:<ol><li><a href='http://www.automated-trading-system.com/bootstrap-test/' rel='bookmark' title='Permanent Link: The Bootstrap Test: How significant are your back-testing results?'>The Bootstrap Test: How significant are your back-testing results?</a></li>
<li><a href='http://www.automated-trading-system.com/monte-carlo-permutation/' rel='bookmark' title='Permanent Link: Monte Carlo Permutation: Test your Back-Tests'>Monte Carlo Permutation: Test your Back-Tests</a></li>
<li><a href='http://www.automated-trading-system.com/evidence-based-technical-analysis-aronson-book/' rel='bookmark' title='Permanent Link: Evidence-Based Technical Analysis'>Evidence-Based Technical Analysis</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/08/bootstrap2.png" alt="bootstrap2" title="bootstrap2" width="411" height="119" class="aligncenter size-full wp-image-2715" /></p>
<p>In part 1 of this <a href="http://www.automated-trading-system.com/bootstrap-test/">bootstrap post</a>, we looked at how to apply the method to establish the statistical significance of a single trading rule. In Part 2, we&#8217;ll look at how to deal with the <strong>data mining bias</strong>, the impact of <strong>geometric vs. arithmetic</strong> mean return. The <strong>code</strong> implementing the bootstrap test is <strong>available for download</strong> at the bottom of this post.</p>
<h3>Dealing with Data Mining Bias</h3>
<p>The approach described in the single rule test is not valid when performing data mining (whether testing different rules or different parameter values of the same rule). As per the <strong>data mining bias</strong> (<a href="http://www.automated-trading-system.com/evidence-based-technical-analysis-aronson-book/#DataMining">explained previously</a>), the (best) rule selected from the data mining process will invariably owe a large part of its over-performance to random (good) luck. </p>
<p>The way the bootstrap test deals with the data mining bias is by implementing a concept introduced in <strong>White&#8217;s Reality Check</strong>. The Reality Check derives the <span id="more-2714"></span>sampling distribution appropriate to test the statistical significance of the <strong>best rule</strong> found by data mining.</p>
<p>In effect, the concept is fairly simple &#8211; and similar to the single-rule bootstrap: assuming N rules have been tested in the data mining process, each resample iteration will perform a resample with replacement for each rule and the best mean return will be kept as this resample iteration&#8217;s test statistic:</p>
<ol>
<li><em>N </em>back-tests are  run on detrended data. The mean daily return, based on <em>x observations</em>, is calculated for each back-tested rule.</li>
<li>Each rule&#8217;s mean daily return is substracted from the rule&#8217;s set of daily returns (zero-centering), This gives a set of adjusted returns for each rule.</li>
<li>For each &#8220;higher-level&#8221; resample (to form the sampling distribution of the best-performing rule in a universe of N rules), perform a &#8220;lower-level&#8221; resample with replacement on every rule. For each rule select <em>x instances</em> of adjusted returns at random and calculate their mean daily return (rule bootstrapped mean). Compare each rule bootstrapped mean and select the highest one: this is the test statistic of this &#8220;higher level&#8221; resample (bootstrapped best mean).</li>
<li>Perform a large number of &#8220;higher level&#8221; resamples to generate a large number of bootstrapped best means.</li>
<li>Form the sampling distribution of the best means generated in the step above.</li>
<li>Derive the p-value of the best back-test mean return (non zero-centered) based on the sampling distribution derived above</li>
</ol>
<p>In effect: <strong>for each iteration, resample each rule, take the best return, keep it as this iteration test statistic and move on to the next iteration. The sampling distribution is formed of each iteration&#8217;s best return</strong>.</p>
<h3>White Reality Check Related Papers</h3>
<p>I have not yet <del datetime="2010-08-13T00:10:57+00:00">found</del> searched <em>hard </em>for White&#8217;s paper on the Reality Check but I did find the two following papers which seem to be worth a read:<br />
<a href="http://papers.ssrn.com/sol3/papers.cfm?abstract_id=563209" target="_blank">Stepwise Multiple Testing as Formalized Data Snooping &#8211; Romano &#038; Wolf</a></p>
<p><strong>Abstract</strong>:</p>
<blockquote><p>It is common in econometric applications that several hypothesis tests are carried out at the same time. The problem then becomes how to decide which hypotheses to reject, accounting for the multitude of tests. In this paper, we suggest a stepwise multiple testing procedure which asymptotically controls the familywise error rate at a desired level. Compared to related single-step methods, our procedure is more powerful in the sense that it often will reject more false hypotheses.</p>
<p>Unlike some stepwise methods, our method implicitly captures the joint dependence structure of the test statistics, which results in increased ability to detect alternative hypotheses. We prove our method asymptotically controls the familywise error rate under minimal assumptions. Some simulation studies show the improvements of our methods over previous proposals. We also provide an application to a set of real data. </p></blockquote>
<p><a href="http://papers.ssrn.com/sol3/papers.cfm?abstract_id=685361" target="_blank">Re-Examining the Profitability of Technical Analysis with White&#8217;s Reality Check and Hansen&#8217;s SPA Test</a><br />
<strong>Abstract</strong>:<br />
<blockquote>
In this paper, we re-examine the profitability of technical analysis using White&#8217;s Reality Check and Hansen&#8217;s SPA test that correct the data snooping bias. Comparing to previous studies, we study a more complete universe of trading techniques, including not only simple rules but also investor&#8217;s strategies, and we test the profitability of these rules and strategies with four main indices. It is found that significantly profitable simple rules and investor&#8217;s strategies do exist in the data from relatively young markets (NASDAQ Composite and Russell 2000) but not in the data from relatively mature markets (DJIA and S&#038;P 500). Moreover, after taking transaction costs into account, we find that the best rules for NASDAQ Composite and  Russell 2000 outperform the buy-and-hold strategy in most in- and out-of-sample periods. Our results thus suggest that the degree of market efficiency may be related to market maturity. It is also found that investor&#8217;s strategies are able to improve on the profits of simple rules and may even generate significant profits from unprofitable simple rules.</p></blockquote>
<h3>Geometric or Arithmetic Mean?</h3>
<p>In part 1, I introduced the idea that the mean arithmetic return being positive is not equivalent to the strategy being profitable (ie. this is not a <em>sufficient</em> condition). On the other hand, the <strong>mean geometric return being positive is a necessary and sufficient condition to the strategy being profitable</strong> (ie. both conditions are <em>equivalent</em>).</p>
<p>Therefore <strong>bootstrapping using the mean geometric return as the test statistic</strong> should provide a better evaluation of the system&#8217;s profitability statistical siginificance.</p>
<p>I will not go into detail of how the calculation is done as it is very similar to the arithmetic mean return, but using <strong>log of returns</strong> instead. Note that the geometric mean will be a stricter test than the arithmetic mean (a rules can have a significantly positive arithmetic return but a negative geometric return).</p>
<p>To illustrate the multiple applications of the bootstrapping methodology, I decided to run the test on one of the <a href="http://www.automated-trading-system.com/resources/trend-following-wizards-fund-performance/">Trend Following Wizards</a> track record (set of monthly returns). I picked <strong>Chesapeake </strong>and ran the monthly returns (from 1988 to 2009) through the bootstrap test.</p>
<p>The <strong>p-value</strong> calculated using the <strong>arithmetic </strong>mean is <strong>0.000098</strong> (less than 1 chance in 10,000 that this kind of results are due to random luck). Using the <strong>geometric </strong>mean, the <strong>p-value</strong> is <strong>0.00022</strong>. The values are extremely low, which is not surprising given Jerry Parker&#8217;s 20-year track record with only one losing year and a monthly average return of 1.7%.</p>
<p>Many people would point out that survivorship bias should be considered, and obviously it depends on how you look at it. The main point of this dual test is that the <strong>geometric p-value is higher than the arithmetic p-value</strong>, verifying that it is a stricter test of statistical significance.</p>
<h3>Bootstrap Code</h3>
<p>Finally, here is a tool coded to implement the bootstrap test for a single strategy &#8211; available for download. Note that this is distributed &#8220;as is&#8221;, with no guarantee (but that&#8217;s the one I have been using so I still think it does the job&#8230;). It should run on any Windows machine with the .Net framework installed (XP or higher should do fine). </p>
<p>It simply takes three parameters (separated by space): </p>
<ol>
<li>Returns file path and name</li>
<li>Number of resamples</li>
<li>Flag for Arithmetic (A) or Geometric (G) mean calculation</li>
</ol>
<p>It also generates a file in the same directory with all of the resamples test-statistic values (to draw the histogram).</p>
<p>Simply place the bootstrap.exe in your directory of choice and run it from the command prompt as below:</p>
<div id="attachment_2716" class="wp-caption alignnone" style="width: 502px"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/08/cmd.png" alt="Run the bootstrap.exe from the command line" title="cmd" width="492" height="176" class="size-full wp-image-2716" /><p class="wp-caption-text">Run the bootstrap.exe from the command line</p></div>
<p>Download here:<br />
<a href="http://www.automated-trading-system.com/wp-content/uploads/2010/08/Bootstrap.exe">bootstrap.exe</a><br />
<a href="http://www.automated-trading-system.com/wp-content/uploads/2010/08/Bootstrap.exe"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/08/bootstrap.exe.png" alt="bootstrap.exe" title="bootstrap.exe" width="104" height="122" class="alignnone size-full wp-image-2720" /></a></p>
<img src="http://www.automated-trading-system.com/?ak_action=api_record_view&id=2714&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.automated-trading-system.com/bootstrap-test/' rel='bookmark' title='Permanent Link: The Bootstrap Test: How significant are your back-testing results?'>The Bootstrap Test: How significant are your back-testing results?</a></li>
<li><a href='http://www.automated-trading-system.com/monte-carlo-permutation/' rel='bookmark' title='Permanent Link: Monte Carlo Permutation: Test your Back-Tests'>Monte Carlo Permutation: Test your Back-Tests</a></li>
<li><a href='http://www.automated-trading-system.com/evidence-based-technical-analysis-aronson-book/' rel='bookmark' title='Permanent Link: Evidence-Based Technical Analysis'>Evidence-Based Technical Analysis</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/bootstrap-take-2-data-mining-bias-code-and-using-geometric-mean/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>The Bootstrap Test: How significant are your back-testing results?</title>
		<link>http://www.automated-trading-system.com/bootstrap-test/</link>
		<comments>http://www.automated-trading-system.com/bootstrap-test/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 11:03:34 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[Books]]></category>
		<category><![CDATA[aronson]]></category>
		<category><![CDATA[bootstrap]]></category>
		<category><![CDATA[data mining]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=2689</guid>
		<description><![CDATA[
As mentioned in the Evidence-based Technical Analysis review post, the main value of the book lies in the presentation of the two methods allowing for computing the statistical significance of trading strategy results, despite having a single sample of data:
Both methods solve the problem of estimating the degree of random variation in a test statistic [...]


Related posts:<ol><li><a href='http://www.automated-trading-system.com/bootstrap-take-2-data-mining-bias-code-and-using-geometric-mean/' rel='bookmark' title='Permanent Link: Bootstrap &#8211; Take 2: Data Mining bias, Code and using geometric mean'>Bootstrap &#8211; Take 2: Data Mining bias, Code and using geometric mean</a></li>
<li><a href='http://www.automated-trading-system.com/monte-carlo-permutation/' rel='bookmark' title='Permanent Link: Monte Carlo Permutation: Test your Back-Tests'>Monte Carlo Permutation: Test your Back-Tests</a></li>
<li><a href='http://www.automated-trading-system.com/evidence-based-technical-analysis-aronson-book/' rel='bookmark' title='Permanent Link: Evidence-Based Technical Analysis'>Evidence-Based Technical Analysis</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/08/bootstrap.jpg" alt="bootstrap" title="bootstrap" width="452" height="89" class="aligncenter size-full wp-image-2690" /></p>
<p>As mentioned in the Evidence-based Technical Analysis <a href="http://www.automated-trading-system.com/evidence-based-technical-analysis-aronson-book/">review post</a>, the main value of the book lies in the presentation of the two methods allowing for computing the statistical significance of trading strategy results, despite having a single sample of data:</p>
<blockquote><p>Both methods solve the problem of estimating the degree of random variation in a test statistic when there is only a single sample of data and, therefore, only a single value of the test statistic.</p></blockquote>
<p>Today, let&#8217;s look at the <strong>bootstrap</strong> test, with a practical application of it.<span id="more-2689"></span></p>
<p>In very brief terms, the concept uses <a href="http://en.wikipedia.org/wiki/Statistical_hypothesis_testing" target="_blank" rel="nofollow">hypothesis testing</a> to verify whether the test statistic (such as mean return of the back-testing sample) is <strong>statistically significant</strong>. This is done by establishing the p-value of the test statistic based on the sampling distribution. (Aronson covers the basics of statistical analysis earlier in the book. I have also mentioned previously <a href="http://www.automated-trading-system.com/Gonick-Cartoon-Statistics" target="_blank" rel="nofollow">The Cartoon Guide to Statistics</a>, which covers these concepts too)</p>
<p>The problem with <strong>back-testing</strong> is that the results generated represent a <strong>single sample</strong>, which does not provide any information on the sample statistic&#8217;s variability and its sampling distribution. This is where <strong>bootstrapping</strong> comes in: by systematically and randomly resampling the single available sample many times, it is possible to <strong>approximate the shape of the sampling distribution</strong> (and therefore calculate the p-value of the test statistic).</p>
<h3>Bootstrap on Single Rule Back-Test</h3>
<p>In the context of hypothesis testing, the bootstrap tests for the null hypothesis that the rule does not have any predictive power. In practical terms, this is translated to <em>the population distribution of rule returns having an expected value of zero or less</em>.</p>
<p>The bootstrap uses the <strong>daily returns</strong> of a back-test (run on detrended data) and performs a resampling with replacement. </p>
<p>In practice:</p>
<ol>
<li>A back-test is run on detrended data and the mean daily return, based on <em>n observations</em>, is calculated.</li>
<li>The mean daily return is substracted from each day&#8217;s return (zero-centering), This gives a set of adjusted returns.</li>
<li>For each resample, select <em>n instances</em> of adjusted returns, at random (with replacement), and calculate their mean daily return (bootstrapped mean).</li>
<li>Perform a large number of resamples to generate a large number of bootstrapped means.</li>
<li>Form the sampling distribution of the means generated in the step above.</li>
<li>Derive the p-value of the initial back-test mean return (non zero-centered) based on the sampling distribution</li>
</ol>
<h3>A Practical Application</h3>
<p>To illustrate the concept, we can look at a back-test and apply the bootstrap method to its daily return series. I decided to look at a back-test I presented in <a href="http://www.automated-trading-system.com/better-trend-following-improved-roll-yield/">Better Trend Following via improved Roll Yield</a>. Remember: a standard 50/20 Moving Average cross-over system applied to Crude Oil was improved by adding a roll yield optimisation process. </p>
<p>In that instance, the benchmark is the standard strategy and we want to check that the strategy improvement was not the result of random chance. In Aronson&#8217;s book, benchmarking is achieved by <a href="http://www.automated-trading-system.com/detrending-for-trend-following/">detrending the data</a>. However, this case is different as the benchmark is the standard strategy. The improved strategy results can be thought of 2 distinct parts: </p>
<ul>
<li>Results from standard Trend Following strategy</li>
<li>Results from Roll Yield Optimisation</li>
</ul>
<p>I therefore generated a composite, &#8220;Roll Yield-only&#8221; equity curve (by removing from the improved strategy equity curve the returns that could be attributed to the Trend Following component). I then computed the daily returns based on that equity curve.</p>
<ol>
<li>This set of daily returns is the original sample of 5120 observations, with an arithmetic mean of 0.216%.</li>
<li>Substracting 0.216% to all 5120 returns adjusts those returns (zero-centering), ready to be picked for resampling.</li>
<li>The 10,000 resamples all pick at random, with replacement, 5120 observations from the zero-centered, adjusted returns. A mean is computed for each resample.</li>
<li>Each of the resample means are used to form the sampling distribution of the mean return:<br />
&nbsp;<br />
<img src="http://www.automated-trading-system.com/wp-content/uploads/2010/08/SamplingDistribution1.png" alt="SamplingDistribution" title="SamplingDistribution" width="467" height="319" class="alignnone size-full wp-image-2697" /></p>
</li>
<li>The last step is the comparison of the non-adjusted original sample mean (0.216%) to the sampling distribution to establish the p-value, which is 0.006 in this example.</li>
</ol>
<p>Once the p-value is obtained, it is simply a matter of deciding which threshold qualifies for statistical significance. Scientists usually determine the statistical significance threshold at 0.05 (ie. the null hypothesis would be rejected for any p-value less or equal to 0.05).</p>
<h3>Note on Arithmetic Mean vs. Geometric Mean</h3>
<p>As discussed above, the assumption that the rule does not have predictive power is translated to the arithmetic mean of its returns being equal to zero. In the bootstrap method, rejecting the null hypothesis occurs when the <strong>mean arithmetic return is statistically significantly positive</strong>. </p>
<p>I am usually no big fan of arithmetic mean of returns as it is a flawed indicator of profitability.  In effect, a system can have a positive mean arithmetic return and still be unprofitable &#8211; think about a return of 50% followed by a return of -40%: arithmetic mean return is +10%, yet the overall return is <strong>minus</strong> 10%</p>
<p>Proving that the mean arithmetic return is significantly positive, and deducing that the trading system is therefore profitable is flawed. It is ironically amusing that Aronson spends quite a lot of time talking about logic reasoning and usual traps people fall into, to actually present a flawed deduction logic. To use an example from the book:</p>
<blockquote><p>A dog having four legs (a profitable rule having a positive mean arithmetic return) does not imply that any four-legged animal is a dog (ie. any rule with a positive mean arithmetic return is not necessarily profitable).</p></blockquote>
<p>On the other hand, any profitable rule has a positive mean geometric return, and any rule with positive mean geometric return is profitable. On that basis, using the <strong>mean geometric return as the test-statistic</strong> in the bootstrap must be more appropriate.</p>
<p>I&#8217;ll be running this post in 2 parts, and this concludes part 1&#8230;<br />
In part 2, we&#8217;ll look at how the bootstrap method can be modified to handle the data mining process and its associated bias. I&#8217;ll also make the code used for the practical application above available for download (this will be a simple bootstrap resample tool developed on the .net platform for Windows). Finally we&#8217;ll explore the idea of using the geometric mean return as the test-statistic instead of its arithmetic cousin.</p>
<img src="http://www.automated-trading-system.com/?ak_action=api_record_view&id=2689&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.automated-trading-system.com/bootstrap-take-2-data-mining-bias-code-and-using-geometric-mean/' rel='bookmark' title='Permanent Link: Bootstrap &#8211; Take 2: Data Mining bias, Code and using geometric mean'>Bootstrap &#8211; Take 2: Data Mining bias, Code and using geometric mean</a></li>
<li><a href='http://www.automated-trading-system.com/monte-carlo-permutation/' rel='bookmark' title='Permanent Link: Monte Carlo Permutation: Test your Back-Tests'>Monte Carlo Permutation: Test your Back-Tests</a></li>
<li><a href='http://www.automated-trading-system.com/evidence-based-technical-analysis-aronson-book/' rel='bookmark' title='Permanent Link: Evidence-Based Technical Analysis'>Evidence-Based Technical Analysis</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/bootstrap-test/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Evidence-Based Technical Analysis</title>
		<link>http://www.automated-trading-system.com/evidence-based-technical-analysis-aronson-book/</link>
		<comments>http://www.automated-trading-system.com/evidence-based-technical-analysis-aronson-book/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 11:20:21 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[Books]]></category>
		<category><![CDATA[aronson]]></category>
		<category><![CDATA[book]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=2640</guid>
		<description><![CDATA[Evidence-Based Technical Analysis: Applying the Scientific Method and Statistical Inference to Trading Signals

&#160;
Today I&#8217;ll be talking about an excellent book, which was recommended on several &#8220;quant&#8221; blogs I read: Evidence-Based Technical Analysis by David Aronson. One of the main reasons I picked this book is because it teaches you to fish (instead of giving you [...]


Related posts:<ol><li><a href='http://www.automated-trading-system.com/bootstrap-test/' rel='bookmark' title='Permanent Link: The Bootstrap Test: How significant are your back-testing results?'>The Bootstrap Test: How significant are your back-testing results?</a></li>
<li><a href='http://www.automated-trading-system.com/monte-carlo-permutation/' rel='bookmark' title='Permanent Link: Monte Carlo Permutation: Test your Back-Tests'>Monte Carlo Permutation: Test your Back-Tests</a></li>
<li><a href='http://www.automated-trading-system.com/bootstrap-take-2-data-mining-bias-code-and-using-geometric-mean/' rel='bookmark' title='Permanent Link: Bootstrap &#8211; Take 2: Data Mining bias, Code and using geometric mean'>Bootstrap &#8211; Take 2: Data Mining bias, Code and using geometric mean</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<h4>Evidence-Based Technical Analysis: Applying the Scientific Method and Statistical Inference to Trading Signals</h4>
<p><a href="http://www.automated-trading-system.com/Evidence-Based-Technical-Analysis-Aronson" target="_blank" rel="nofollow"><img src="http://www.automated-trading-system.com/wp-content/uploads/library/images/book-covers/Aronson-EBTA.jpg" style="margin-left:10px;"></a><br />
&nbsp;<br />
Today I&#8217;ll be talking about an excellent book, which was recommended on several &#8220;quant&#8221; blogs I read: <a href="http://www.automated-trading-system.com/Evidence-Based-Technical-Analysis-Aronson" target="_blank" rel="nofollow"><strong>Evidence-Based Technical Analysis</strong> by David Aronson</a>. One of the main reasons I picked this book is because <em>it teaches you to fish</em> (instead of <em>giving you a fish</em>). So, if you&#8217;re after a book with great trading strategies or indicators, this might not be the ideal one, however if you want to learn about <strong>strategy testing and methodology</strong>, it&#8217;s probably a great addition to your <a href="http://www.automated-trading-system.com/library/" target="_blank">trading library</a>. It had been on my list for a while and I wish I&#8217;d read it earlier as it has the potential to add cornerstone methods to trading research and testing procedures. Read on for a summary with a review right at the end&#8230;</p>
<h3>Intro</h3>
<p>One of the early quotes from the book defines the concept it covers:</p>
<blockquote><p>The scientific method is the only rational way to extract useful knowledge from market data and the only rational approach for determining which TA methods have predictive power. I call this evidence-based technical analysis (EBTA).
</p></blockquote>
<p>Aronson introduces early on the concept of <strong>objective</strong> (TA) vs. <strong>subjective</strong> (TA). An objective claim is a meaningful proposition, which can be unambiguously verified. For us mechanical system trading developers: a set of rules that can be back-tested. On the other hand, subjective technical analysis would consist of approaches such as Elliot Wave Analysis. </p>
<p>However, objective technical analysis is not sufficient on its own: you still need <strong>rigourous statistical inference</strong> to draw conclusions on its predictive power.<span id="more-2640"></span></p>
<h3>Part One: the Foundations</h3>
<p>Part one of the book establishes the methodological, philosophical, psychological and statistical foundations of EBTA.</p>
<p>The first topic covered is the need for <strong>benchmarking</strong> to evaluate <strong>objective</strong> rules and introduces the concept of <a href="http://www.automated-trading-system.com/detrending-for-trend-following/">detrending</a>, which I have previously discussed.</p>
<p>The second topic deals with cognitive psychology and gives examples of different types of behavioral biases that can fool us and make us believe in subjective technical analysis:</p>
<ul>
<li>Pattern recognition</li>
<li>Confirmation bias</li>
<li>Hindsight bias</li>
<li>Over-confidence</li>
<li>Illusory correlations</li>
<li>Mis-perception of randomness</li>
</ul>
<p>The antidote for these &#8220;mind traps&#8221; is the <strong>scientific method</strong>. The generic scientific method is covered in the third chapter with some history and philosophy of science and logic reasoning. The scientific method &#8211; which can and should be applied to Technical Analysis &#8211; contains 5 stages:</p>
<ol>
<li>Observation</li>
<li>Hypothesis</li>
<li>Prediction</li>
<li>Verification</li>
<li>Conclusion</li>
</ol>
<p>Subjective TA does not conform to the scientific method and the author presents an interesting study of objectification of a subjective TA pattern (Head and Shoulders) to make it testable (it shows that Head and Shoulders is worthless on stocks and has doubtful value on currencies).</p>
<h3>Statistical Analysis of Back-Test Results</h3>
<p>The next three chapters introduce and cover <strong>statistical analysis</strong>. The beginning of this part gives a good refresher on statistical inference, starting with concepts such as frequency distribution, standard deviation, probabilities and p-values. The example of sampling and statistical inference using beads in a box makes for a good illustration and a fairly clear parallel with the world of trading rules back-testing.</p>
<p>The book moves on to concepts such as hypothesis testing, statistical significance and confidence interval, etc. and how they relate to rule testing.</p>
<p>One of the main issue of back-testing results is that they only represent <strong>one</strong> sample of how the systems/rule(s) perform. Aronson presents the classical statistical approach to derive the sampling distribution (required to perform the statistical inference) based on a single observation/sample. However this assumes normality of the distribution, which is unlikely to be correct when dealing with financial data.</p>
<h3>New Scientific Methods for Back-Testing</h3>
<p>This last concept leads to the introduction of the two alternative methods to derive the sampling distribution and perform statistical inference on the back-tested results. These are two computer-based methods:</p>
<ul>
<li>The <strong>Bootstrap</strong></li>
<li>The <strong>Monte Carlo permutation</strong></li>
</ul>
<blockquote><p>
Both methods estimate the sampling distribution by randomly resampling (reusing) the original sample of observation. A test statistic is then computed for each resample.</p></blockquote>
<p>In practice, the bootstrap method uses resampling with replacement of the daily strategy returns to generate numerous random test statistics used to approximate a sampling distribution.<br />
The Monte Carlo permutation method achieves the same result by decoupling and permuting the position direction (ie. long or short) with the daily instrument returns.</p>
<p>Using the statistical inference covered in earlier chapters, one can decide whether results found in the back-test are statistically significant or the product of random chance.</p>
<p><strong>These two methods are the main take-away from the book</strong>, as they are valuable to identify the degree of randomness in a back-tested rule. This should probably be part of a standard trading system research methodology and I will cover these two methods in more detail in later posts.</p>
<p><a name="DataMining"></a></p>
<h3>On Data Mining</h3>
<p>The methods above only deal with one rule/back-test. However, we rarely test the one rule in isolation: most back-testing would test multiple parameter values, rules and combinations to try and identify the best performing ones: this is <strong>data mining</strong>. </p>
<p>It is however wrong to expect future performance of the best performing systems to keep in line with past, back-tested results. The best performing systems might have intrinsic value, but some of their over-performance is due to <strong>random variations</strong>. If you run 1,000 different rules with no predictive power, all of them will contain some random chance producing a  variable departure from the zero-mean. The <strong>&#8220;most lucky&#8221; rule</strong> will be furthest away on the right-hand side of the zero-mean (and therefore picked up by the data miner), despite having no <strong>intrinsic value</strong>.</p>
<p>Data mining introduces a <strong>bias</strong>, which overstates the value of the &#8220;best&#8221; rule compared to expected random variations. The data mining bias is linked to several factors:</p>
<ul>
<li>Increases with the number of rules back-tested</li>
<li>Decreases with sample size used in back-testing.</li>
<li>Decreases with the correlation of back-tested rules results.</li>
<li>Increases with the frequency of outliers in the back-test sample.</li>
<li>Decreases with the variation in back-tested returns among rules considered.</li>
</ul>
<p>This is illustrated with examples and charts. The rest of the chapter concentrate on methods to reduce/correct for the data mining bias and adapts the bootstrap method (using <em>White&#8217;s reality check</em>) and Monte Carlo permutation to be used in &#8220;data mining&#8221; mode (instead of single rule testing).</p>
<p>In conclusion, data mining is a valid method to discover the best rule(s) but the researcher should ensure that the results are statistically significant to avoid the risk of discovering &#8220;most lucky&#8221; rules.</p>
<h3>A Tour of the EMH and Application of Methods</h3>
<p>The following chapter deals with the <strong>Efficient Market Hypothesis</strong>, which takes a bit of a beating by the author. The main point is that both from an empirical and theoretical point of view, the EMH contains flaws, which supports the idea of <strong>succesful TA</strong>.</p>
<p>The last part of the book presents a diverse set of rules and parameters (6,402 combinations) and attempts to test for their statistical significance. The rules are fairly simple and the results do not highlight significant predictive power in any rule.</p>
<h3>Review Conclusion</h3>
<p>This book is a very interesting read, on the long side, with 450+ pages. Even though I enjoyed it throughout, I was sometimes finding myself hoping for the author not to expand so much on some introductory topics (the history and philosophy of science is quite interesting but could well be skim-read to get to the &#8220;juicier&#8221; parts quicker). If you&#8217;re in a rush I&#8217;d advise to concentrate on chapters 4, 5 and 6 where the actual bootstrap and Monte Carlo methods get presented and discussed, and the discussion on data mining bias is interesting and very relevant. For a reader new to these concepts, the initial chapters would provide a comprehensive introduction of the foundational concepts of scientific reasoning and statistical analysis before putting them all together in application.</p>
<p>For more info, some of the reviews on <a href="http://www.automated-trading-system.com/Evidence-Based-Technical-Analysis-Aronson" target="_blank" rel="nofollow">amazon</a> are quite insightful (mostly positive &#8211; although the book&#8217;s got its share of 1-star reviews). There is also a <a href="http://www.evidencebasedta.com" target="_blank" rel="nofollow">companion website</a> to the book with more info and detailed results of the tests performed in the last part of the book.</p>
<img src="http://www.automated-trading-system.com/?ak_action=api_record_view&id=2640&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.automated-trading-system.com/bootstrap-test/' rel='bookmark' title='Permanent Link: The Bootstrap Test: How significant are your back-testing results?'>The Bootstrap Test: How significant are your back-testing results?</a></li>
<li><a href='http://www.automated-trading-system.com/monte-carlo-permutation/' rel='bookmark' title='Permanent Link: Monte Carlo Permutation: Test your Back-Tests'>Monte Carlo Permutation: Test your Back-Tests</a></li>
<li><a href='http://www.automated-trading-system.com/bootstrap-take-2-data-mining-bias-code-and-using-geometric-mean/' rel='bookmark' title='Permanent Link: Bootstrap &#8211; Take 2: Data Mining bias, Code and using geometric mean'>Bootstrap &#8211; Take 2: Data Mining bias, Code and using geometric mean</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/evidence-based-technical-analysis-aronson-book/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Slippage &#8211; Take 3: Stop-Limit Orders</title>
		<link>http://www.automated-trading-system.com/slippage-take-3-stop-limit-orders/</link>
		<comments>http://www.automated-trading-system.com/slippage-take-3-stop-limit-orders/#comments</comments>
		<pubDate>Thu, 20 May 2010 07:54:43 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=2307</guid>
		<description><![CDATA[Another slippage post inspired by a reader&#8217;s comment (thanks to Eventhorizon this time).
Stop-Limit Orders
The idea is to use stop-limit orders in the Donchian Channel system to avoid slippage. The stop-limit orders would prevent the system from buying/selling above/below the entry breakout level &#8211; thus reducing entry slippage.
Of course, with daily data, it is impossible to [...]


Related posts:<ol><li><a href='http://www.automated-trading-system.com/follow-up-on-slippage/' rel='bookmark' title='Permanent Link: Follow-up on Slippage'>Follow-up on Slippage</a></li>
<li><a href='http://www.automated-trading-system.com/slippage-backtesting-realistic/' rel='bookmark' title='Permanent Link: Slippage: Are your back-testing results realistic?'>Slippage: Are your back-testing results realistic?</a></li>
<li><a href='http://www.automated-trading-system.com/get-out-locked-limit-situation/' rel='bookmark' title='Permanent Link: How to get out of a locked-limit situation'>How to get out of a locked-limit situation</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Another slippage post inspired by a reader&#8217;s comment (thanks to Eventhorizon this time).</p>
<h3>Stop-Limit Orders</h3>
<p>The idea is to <strong>use stop-limit orders in the Donchian Channel system</strong> to avoid slippage. The stop-limit orders would prevent the system from buying/selling above/below the entry breakout level &#8211; thus reducing entry slippage.</p>
<p>Of course, with daily data, it is impossible to know and test whether the price <em>sails past</em> the breakout stop level and never <em>pulls back</em> (stop-limit order not executed) or whether it revisits these levels later throughout the trading session (and triggers the order execution).</p>
<p>However if the instrument trades again at the same level a few days later (ie. the price has retraced from the breakout), the limit order should be executed.<span id="more-2307"></span></p>
<p>BlueEventHorizon ran a quick test (published on his <a href="http://beyondtheblueeventhorizon.blogspot.com/2010/05/slippage.html" target="_blank" rel="nofollow">blog</a>) and calculated that around <strong>85% of such breakout signals retrace in the following 5 days</strong> (excluding the day of the actual breakout).</p>
<h3>Retrace System</h3>
<p>However this stat alone is not a very good indicator of how well a system based on the same logic would perform: the original system has 62% losing trades &#8211; most of them would probably be &#8220;caught&#8221; by the new system, when the losers start to retrace. Of the 38% original winning trades, the system would probably only capture just over half of them (85% &#8211; 62% = 23% vs. 38%).</p>
<p>The system would probably suffer from missing out on these winning trades but would benefit from improved slippage for all the remaining trades.</p>
<p>This caught my interest and I decided to code up and test a &#8220;Donchian Retrace&#8221; system: the breakout acts as an End-of-Day signal and trigger a tentative limit order (at the breakout level) for the next five days.</p>
<p>The rest of the system is identical to the one tested in the original <a href="http://www.automated-trading-system.com/slippage-backtesting-realistic/">slippage post</a>:</p>
<ul>
<li>Entry breakout: 20 days</li>
<li>Exit breakout: 10 days</li>
<li>Entry Stop: 2 x 39-day exponential ATR, risking 1% of Total Equity</li>
</ul>
<h3>Results Comparison</h3>
<p>Testing the retrace system with 0% slippage produces a CAGR of 35.51% with a MAR ratio of 0.48, whereas running the original system gave us a CAGR of 57.62% and a MAR ratio of 1.11. The percentage of winning trades goes up, as expected, for the retrace system (72% vs. 62%).</p>
<p>However, this is not a fair comparison, as the original Donchian system will be subject to slippage on entry, whereas the new retrace system should not. Adding 5% slippage to the original Donchian system gives a CAGR of 33.55% and MAR of 0.53:</p>
<p><a href="http://www.automated-trading-system.com/wp-content/uploads/2010/05/System-comparison.png"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/05/System-comparison.png" alt="System-comparison" title="System-comparison" width="488" height="349" class="alignnone size-full wp-image-2310" /></a></p>
<p>The comparison does not look too bad for the retrace system, but it is obviosuly dependent on the real level of slippage suffered by the system.</p>
<h3>Negative Slippage</h3>
<p>Since the system does not perform so badly when waiting for a retrace, it might be interesting to test the impact of waiting for an even stronger retrace, past the original breakout level. By adding an &#8220;extra retrace&#8221; parameter to the system, we can decide and test by how much the retrace must overshoot the initial breakout level to enter the position. The higher the &#8220;extra retrace&#8221; parameter, the more trades are likely to be missed, but the better the execution on all the other trades.</p>
<p>Below are the results of a stepped simulation with different values for the extra retrace (expressed in ATR multipliers):</p>
<table border=1 frame=above rules=rows bordercolor=black cellpadding=2 cellspacing=0>
<caption><strong>Stepped Parameter Summary Performance</strong></caption>
<tr>
<td bgcolor="#CCFFCC">&nbsp;&nbsp;Retrace ATR multiplier</td>
<td width=55 bgcolor="#CCFFCC">CAGR%</td>
<td width=40 bgcolor="#CCFFCC">MAR</td>
<td width=60 bgcolor="#CCFFCC">Modified Sharpe</td>
<td width=50 bgcolor="#CCFFCC">Annual Sharpe</td>
<td width=80 bgcolor="#CCFFCC">Max Total Equity DD</td>
<td width=80 bgcolor="#CCFFCC">Longest Drawdown</td>
<td width=60 bgcolor="#CCFFCC"># Trades</td>
</tr>
<tr>
<td style="font-size:1pt" colspan=14 height = 1><img src="spacer.gif" width=1 height=1></td>
</tr>
<tr>
<td>0.0</td>
<td>35.51%</td>
<td>0.48</td>
<td>0.77</td>
<td>0.30</td>
<td>73.3%</td>
<td>55.1</td>
<td>8,369</td>
</tr>
<tr>
<td>0.1</td>
<td>37.36%</td>
<td>0.54</td>
<td>0.80</td>
<td>0.34</td>
<td>69.5%</td>
<td>54.8</td>
<td>8,017</td>
</tr>
<tr>
<td>0.2</td>
<td>37.88%</td>
<td>0.54</td>
<td>0.81</td>
<td>0.36</td>
<td>69.8%</td>
<td>54.9</td>
<td>7,747</td>
</tr>
<tr>
<td>0.3</td>
<td>38.88%</td>
<td>0.60</td>
<td>0.83</td>
<td>0.40</td>
<td>64.6%</td>
<td>49.5</td>
<td>7,469</td>
</tr>
<tr>
<td>0.4</td>
<td>42.95%</td>
<td>0.73</td>
<td>0.90</td>
<td>0.45</td>
<td>58.6%</td>
<td>48.1</td>
<td>7,244</td>
</tr>
<tr>
<td>0.5</td>
<td>42.48%</td>
<td>0.69</td>
<td>0.89</td>
<td>0.46</td>
<td>61.1%</td>
<td>49.5</td>
<td>7,039</td>
</tr>
<tr>
<td>0.6</td>
<td>45.30%</td>
<td>0.76</td>
<td>0.93</td>
<td>0.50</td>
<td>60.0%</td>
<td>43.1</td>
<td>6,827</td>
</tr>
<tr>
<td>0.7</td>
<td>44.51%</td>
<td>0.71</td>
<td>0.96</td>
<td>0.51</td>
<td>62.3%</td>
<td>43.0</td>
<td>6,636</td>
</tr>
<tr>
<td>0.8</td>
<td>39.81%</td>
<td>0.64</td>
<td>0.90</td>
<td>0.49</td>
<td>62.1%</td>
<td>43.1</td>
<td>6,436</td>
</tr>
<tr>
<td>0.9</td>
<td>36.27%</td>
<td>0.60</td>
<td>0.86</td>
<td>0.48</td>
<td>60.1%</td>
<td>27.9</td>
<td>6,250</td>
</tr>
<tr>
<td>1.0</td>
<td>32.19%</td>
<td>0.56</td>
<td>0.82</td>
<td>0.52</td>
<td>57.6%</td>
<td>27.2</td>
<td>6,014</td>
</tr>
</table>
<p>&nbsp;<br />
There is a notable improvement in the system by waiting for an extra retrace, which seems to simulate some negative slippage &#8211; although more in more trades are missed as the extra retrace increases.</p>
<p>Note that all these simulation results are still subject to slippage assumptions. However, they should also be slightly over-pessimistic in the fact that they cannot test for same-day retraces (and simply ignore them), therefore potentially missing out more winning trades than in reality (all those trades that retrace on the day but not in the next 5 days).</p>
<p>Limit orders could be another tool to reduce slippage. After all, if they were recommended to the Turtle traders, they must be a useful tool&#8230;</p>
<img src="http://www.automated-trading-system.com/?ak_action=api_record_view&id=2307&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.automated-trading-system.com/follow-up-on-slippage/' rel='bookmark' title='Permanent Link: Follow-up on Slippage'>Follow-up on Slippage</a></li>
<li><a href='http://www.automated-trading-system.com/slippage-backtesting-realistic/' rel='bookmark' title='Permanent Link: Slippage: Are your back-testing results realistic?'>Slippage: Are your back-testing results realistic?</a></li>
<li><a href='http://www.automated-trading-system.com/get-out-locked-limit-situation/' rel='bookmark' title='Permanent Link: How to get out of a locked-limit situation'>How to get out of a locked-limit situation</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/slippage-take-3-stop-limit-orders/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Follow-up on Slippage</title>
		<link>http://www.automated-trading-system.com/follow-up-on-slippage/</link>
		<comments>http://www.automated-trading-system.com/follow-up-on-slippage/#comments</comments>
		<pubDate>Mon, 17 May 2010 10:52:29 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=2287</guid>
		<description><![CDATA[
The previous post on slippage generated very good comments and I decided to address some of the points discussed in a follow-up post.
Slippage and Long-Term Systems
Last post concluded with a question:
How can you reduce slippage as a small trader?
You might not be able to reduce slippage in absolute terms, but you can still reduce the [...]


Related posts:<ol><li><a href='http://www.automated-trading-system.com/slippage-backtesting-realistic/' rel='bookmark' title='Permanent Link: Slippage: Are your back-testing results realistic?'>Slippage: Are your back-testing results realistic?</a></li>
<li><a href='http://www.automated-trading-system.com/slippage-take-3-stop-limit-orders/' rel='bookmark' title='Permanent Link: Slippage &#8211; Take 3: Stop-Limit Orders'>Slippage &#8211; Take 3: Stop-Limit Orders</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.automated-trading-system.com/wp-content/uploads/2010/05/banana-slippage-Coal-Miki-2.jpg"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/05/banana-slippage-Coal-Miki-2.jpg" alt="banana-slippage-Coal-Miki-2" title="banana-slippage-Coal-Miki-2" width="296" height="284" class="aligncenter size-full wp-image-2294" /></a></p>
<p>The previous post on slippage generated very good comments and I decided to address some of the points discussed in a follow-up post.</p>
<h3>Slippage and Long-Term Systems</h3>
<p>Last post concluded with a question:</p>
<blockquote><p>How can you reduce slippage as a small trader?</p></blockquote>
<p>You might not be able to reduce slippage in absolute terms, but you can still reduce the impact of slippage on your system performance.</p>
<p>By <strong>going &#8220;long-term&#8221;</strong>, a system will be less subject to the impact of slippage. Longer-term systems usually generate trades with larger average profits and the slippage costs consequently represent a smaller percentage of the overall trade P&#038;L.</p>
<p>Let&#8217;s look at a longer timeframe of the Donchian Channel system studied in the initial post:</p>
<ul>
<li>Entry breakout: 100 days (vs. 20 days)</li>
<li>Exit breakout: 50 days (vs. 10 days)</li>
<li>Entry Stop: 5 x 199-day exponential ATR, risking 2% of Total Equity</li>
</ul>
<p>And its stepped simulation results:<span id="more-2287"></span></p>
<table border=1 frame=above rules=rows bordercolor=black cellpadding=2 cellspacing=0 style="font-size: 0.8em;">
<caption><strong>Stepped Parameter Summary Performance</strong></caption>
<tr>
<td bgcolor="#CCFFCC">&nbsp;&nbsp;Slippage (%)</td>
<td width=120 bgcolor="#CCFFCC">Ending Balance</td>
<td width=55 bgcolor="#CCFFCC">CAGR%</td>
<td width=40 bgcolor="#CCFFCC">MAR</td>
<td width=60 bgcolor="#CCFFCC">Modified Sharpe</td>
<td width=50 bgcolor="#CCFFCC">Annual Sharpe</td>
<td width=80 bgcolor="#CCFFCC">Max Total Equity DD</td>
<td width=80 bgcolor="#CCFFCC">Longest DD</td>
<td width=60 bgcolor="#CCFFCC"># Trades</td>
</tr>
<tr>
<td style="font-size:1pt" colspan=14 height = 1><img src="spacer.gif" width=1 height=1></td>
</tr>
<tr>
<td>0%</td>
<td>1,144,374,575.19</td>
<td>39.19%</td>
<td>0.66</td>
<td>0.87</td>
<td>0.45</td>
<td>59.7%</td>
<td>22.1</td>
<td>1,276</td>
</tr>
<tr>
<td>5%</td>
<td>786,815,664.15</td>
<td>35.60%</td>
<td>0.57</td>
<td>0.82</td>
<td>0.41</td>
<td>62.0%</td>
<td>22.3</td>
<td>1,276</td>
</tr>
<tr>
<td>10%</td>
<td>631,156,919.59</td>
<td>33.53%</td>
<td>0.53</td>
<td>0.79</td>
<td>0.39</td>
<td>63.7%</td>
<td>23.6</td>
<td>1,276</td>
</tr>
<tr>
<td>15%</td>
<td>503,215,137.40</td>
<td>31.44%</td>
<td>0.49</td>
<td>0.76</td>
<td>0.37</td>
<td>64.8%</td>
<td>24.0</td>
<td>1,276</td>
</tr>
<tr>
<td>20%</td>
<td>369,037,673.74</td>
<td>28.63%</td>
<td>0.43</td>
<td>0.72</td>
<td>0.33</td>
<td>66.8%</td>
<td>24.2</td>
<td>1,276</td>
</tr>
<tr>
<td>25%</td>
<td>286,924,641.30</td>
<td>26.39%</td>
<td>0.39</td>
<td>0.68</td>
<td>0.31</td>
<td>67.7%</td>
<td>24.2</td>
<td>1,275</td>
</tr>
<tr>
<td>30%</td>
<td>222,789,279.06</td>
<td>24.18%</td>
<td>0.35</td>
<td>0.65</td>
<td>0.29</td>
<td>69.3%</td>
<td>24.4</td>
<td>1,274</td>
</tr>
<tr>
<td>35%</td>
<td>182,038,244.01</td>
<td>22.44%</td>
<td>0.32</td>
<td>0.62</td>
<td>0.27</td>
<td>70.0%</td>
<td>24.8</td>
<td>1,272</td>
</tr>
</table>
<p>The number of trades drastically decreases (compared to the 20-day breakout system) while trade length increases: <strong>average trade duration is 119 days</strong>, while the average winning trade lasts 203 days.</p>
<p>Slippage obviously still has a detrimental impact on the performance &#8211; however its effect is much less felt than with the 20-day breakout system. The system keeps producing positive results across the whole slippage-stepped simulation. The MAR is &#8220;only&#8221; halved between the 0% slippage and 35% slippage cases.</p>
<p>Note that longer trades also occur rollover slippage, when having to move from one contract to the next. A &#8220;trade&#8221; lasting one year, could potentially involve buying and selling 12 times (if changing contract every month). However, rollover slippage is usually lower then entry/exit slippage, as it is less subject to price momentum and rollover can sometimes be traded as a calendar spread trade. </p>
<h3>More granular Slippage test</h3>
<p>The range of slippage over which the system above is tested is fairly wide and it might make sense to look at a smaller and more granular range &#8211; although if you re-read Bill Eckhardt&#8217;s interview in <a href="http://www.amazon.com/exec/obidos/ASIN/1592803377/autotradblog-20" target="_blank" rel="nofollow">New Market Wizards</a>, you will find that he advocates testing systems by trying to break them, to check their robustness (exaggerating slippage is one such way). If they still do not break, you might be onto <em>something</em></p>
<p>By testing the <strong>20-day breakout system</strong> over a range of <strong>slippage from 0% to 2%</strong> with 0.25% increments, I realised the impact of another Trading Blox system parameter: &#8220;Trade Always on Tick&#8221;. The performance drops much more between 0% and 0.25% slippage than for any other .25% increment.</p>
<p>The reason is that Trading Blox rounds up or down to the nearest tick (when the parameter is set to TRUE). Even if 0.25% represents much less than one tick, the slippage will be rounded up to one tick (this is of course more realistic). </p>
<p>Below are 2 stepped simulations with slippage ranging from 0% to 2%, with the &#8220;Trade Always on Tick&#8221; parameter swicthed from TRUE to FALSE</p>
<table border=1 frame=above rules=rows bordercolor=black cellpadding=2 cellspacing=0 style="font-size: 0.8em;">
<caption><strong>Stepped Parameter Summary Performance</strong></caption>
<tr>
<td bgcolor="#CCFFCC">&nbsp;&nbsp;Slippage (%)</td>
<td bgcolor="#CCFFCC">&nbsp;&nbsp;Trade on Tick</td>
<td width=120 bgcolor="#CCFFCC">Ending Balance</td>
<td width=55 bgcolor="#CCFFCC">CAGR%</td>
<td width=40 bgcolor="#CCFFCC">MAR</td>
<td width=60 bgcolor="#CCFFCC">Modified Sharpe</td>
<td width=50 bgcolor="#CCFFCC">Annual Sharpe</td>
<td width=80 bgcolor="#CCFFCC">Max Total Equity DD</td>
<td width=80 bgcolor="#CCFFCC">Longest DD</td>
<td width=60 bgcolor="#CCFFCC"># Trades</td>
</tr>
<tr>
<td style="font-size:1pt" colspan=15 height = 1><img src="spacer.gif" width=1 height=1></td>
</tr>
<tr>
<td>0.00%</td>
<td>TRUE</td>
<td>6,789,890,225.97</td>
<td>57.61%</td>
<td>1.11</td>
<td>1.04</td>
<td>0.50</td>
<td>52.1%</td>
<td>27.4</td>
<td>6,492</td>
</tr>
<tr>
<td>0.25%</td>
<td>TRUE</td>
<td>1,484,956,089.05</td>
<td>41.75%</td>
<td>0.73</td>
<td>0.85</td>
<td>0.38</td>
<td>57.5%</td>
<td>45.5</td>
<td>6,492</td>
</tr>
<tr>
<td>0.50%</td>
<td>TRUE</td>
<td>1,477,535,701.49</td>
<td>41.70%</td>
<td>0.72</td>
<td>0.85</td>
<td>0.38</td>
<td>57.5%</td>
<td>45.5</td>
<td>6,492</td>
</tr>
<tr>
<td>0.75%</td>
<td>TRUE</td>
<td>1,457,202,527.89</td>
<td>41.56%</td>
<td>0.72</td>
<td>0.85</td>
<td>0.38</td>
<td>57.5%</td>
<td>45.5</td>
<td>6,492</td>
</tr>
<tr>
<td>1.00%</td>
<td>TRUE</td>
<td>1,420,350,415.02</td>
<td>41.31%</td>
<td>0.71</td>
<td>0.85</td>
<td>0.38</td>
<td>58.0%</td>
<td>48.7</td>
<td>6,492</td>
</tr>
<tr>
<td>1.25%</td>
<td>TRUE</td>
<td>1,379,743,833.58</td>
<td>41.02%</td>
<td>0.71</td>
<td>0.84</td>
<td>0.38</td>
<td>58.1%</td>
<td>48.7</td>
<td>6,492</td>
</tr>
<tr>
<td>1.50%</td>
<td>TRUE</td>
<td>1,325,317,365.01</td>
<td>40.63%</td>
<td>0.70</td>
<td>0.84</td>
<td>0.38</td>
<td>58.2%</td>
<td>48.7</td>
<td>6,492</td>
</tr>
<tr>
<td>1.75%</td>
<td>TRUE</td>
<td>1,280,512,583.08</td>
<td>40.29%</td>
<td>0.69</td>
<td>0.83</td>
<td>0.37</td>
<td>58.3%</td>
<td>48.8</td>
<td>6,492</td>
</tr>
<tr>
<td>2.00%</td>
<td>TRUE</td>
<td>1,221,069,354.39</td>
<td>39.82%</td>
<td>0.67</td>
<td>0.83</td>
<td>0.37</td>
<td>59.0%</td>
<td>50.4</td>
<td>6,492</td>
</tr>
<tr>
<td>0.00%</td>
<td>FALSE</td>
<td>7,513,719,582.25</td>
<td>58.72%</td>
<td>1.12</td>
<td>1.05</td>
<td>0.51</td>
<td>52.2%</td>
<td>27.2</td>
<td>6,495</td>
</tr>
<tr>
<td>0.25%</td>
<td>FALSE</td>
<td>7,038,867,195.91</td>
<td>58.00%</td>
<td>1.11</td>
<td>1.04</td>
<td>0.50</td>
<td>52.3%</td>
<td>27.4</td>
<td>6,495</td>
</tr>
<tr>
<td>0.50%</td>
<td>FALSE</td>
<td>6,484,318,587.24</td>
<td>57.10%</td>
<td>1.09</td>
<td>1.03</td>
<td>0.50</td>
<td>52.4%</td>
<td>27.6</td>
<td>6,495</td>
</tr>
<tr>
<td>0.75%</td>
<td>FALSE</td>
<td>5,819,481,881.44</td>
<td>55.92%</td>
<td>1.06</td>
<td>1.01</td>
<td>0.49</td>
<td>52.5%</td>
<td>27.6</td>
<td>6,495</td>
</tr>
<tr>
<td>1.00%</td>
<td>FALSE</td>
<td>5,401,924,091.29</td>
<td>55.11%</td>
<td>1.05</td>
<td>1.01</td>
<td>0.49</td>
<td>52.6%</td>
<td>27.6</td>
<td>6,495</td>
</tr>
<tr>
<td>1.25%</td>
<td>FALSE</td>
<td>5,073,017,402.01</td>
<td>54.43%</td>
<td>1.04</td>
<td>1.00</td>
<td>0.48</td>
<td>52.6%</td>
<td>27.7</td>
<td>6,495</td>
</tr>
<tr>
<td>1.50%</td>
<td>FALSE</td>
<td>4,700,521,306.73</td>
<td>53.61%</td>
<td>1.01</td>
<td>0.99</td>
<td>0.48</td>
<td>52.9%</td>
<td>27.7</td>
<td>6,495</td>
</tr>
<tr>
<td>1.75%</td>
<td>FALSE</td>
<td>4,389,089,937.85</td>
<td>52.88%</td>
<td>1.00</td>
<td>0.98</td>
<td>0.47</td>
<td>52.8%</td>
<td>27.7</td>
<td>6,495</td>
</tr>
<tr>
<td>2.00%</td>
<td>FALSE</td>
<td>4,152,589,943.43</td>
<td>52.29%</td>
<td>0.99</td>
<td>0.97</td>
<td>0.47</td>
<td>52.9%</td>
<td>27.7</td>
<td>6,495</td>
</tr>
</table>
<p>The combined impact of slippage and Always Trade on Tick show that backtesting results can be greatly affected by assumptions made about trading. Once again, bear in mind that this is a fairly short-term trading system.</p>
<h3>&#8220;Slippage is pathological&#8221;</h3>
<p>Finally, it was highlighted in the <a href="http://www.automated-trading-system.com/slippage-backtesting-realistic/#comments">previous post comments</a> that real-life slippage is a complicated &#8220;beast&#8221;, hard to model accurately. </p>
<p>This interesting <a href='http://www.automated-trading-system.com/wp-content/uploads/2010/05/THFJ-CTAs-article.pdf' target="_blank">article about CTAs</a> highlights how large CTAs focus their R&#038;D on reducing their market impact and the resulting slippage.<br />
&nbsp;<br />
&nbsp;<br />
For the small trader, taking the long-term system route seems to be the easiest way to reduce the impact of slippage on the system performance<br />
&nbsp;<br />
&nbsp;<br />
PS: thanks to Pumpernickel, Motomoto and Erik for their comments and thoughts on the initial post.</p>
<p><sup>Picture credits: Coal Miki@flickr</sup></p>
<img src="http://www.automated-trading-system.com/?ak_action=api_record_view&id=2287&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.automated-trading-system.com/slippage-backtesting-realistic/' rel='bookmark' title='Permanent Link: Slippage: Are your back-testing results realistic?'>Slippage: Are your back-testing results realistic?</a></li>
<li><a href='http://www.automated-trading-system.com/slippage-take-3-stop-limit-orders/' rel='bookmark' title='Permanent Link: Slippage &#8211; Take 3: Stop-Limit Orders'>Slippage &#8211; Take 3: Stop-Limit Orders</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/follow-up-on-slippage/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Slippage: Are your back-testing results realistic?</title>
		<link>http://www.automated-trading-system.com/slippage-backtesting-realistic/</link>
		<comments>http://www.automated-trading-system.com/slippage-backtesting-realistic/#comments</comments>
		<pubDate>Mon, 10 May 2010 12:25:49 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[slippage]]></category>
		<category><![CDATA[Trading Blox]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=2259</guid>
		<description><![CDATA[
Slippage can make or break your trading system.
Hard to believe? Read on and check the tests and charts further below&#8230;
We recently talked about some data pitfalls that can affect your trading and testing of mechanical systems. Slippage was not mentioned. However, this is a critical piece of data to integrate in your back-testing parameters (and [...]


Related posts:<ol><li><a href='http://www.automated-trading-system.com/slippage-take-3-stop-limit-orders/' rel='bookmark' title='Permanent Link: Slippage &#8211; Take 3: Stop-Limit Orders'>Slippage &#8211; Take 3: Stop-Limit Orders</a></li>
<li><a href='http://www.automated-trading-system.com/follow-up-on-slippage/' rel='bookmark' title='Permanent Link: Follow-up on Slippage'>Follow-up on Slippage</a></li>
<li><a href='http://www.automated-trading-system.com/walk-forward-trading-blox/' rel='bookmark' title='Permanent Link: Walk-Forward in Trading Blox: Back-Testing Adaptive Trading'>Walk-Forward in Trading Blox: Back-Testing Adaptive Trading</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.automated-trading-system.com/wp-content/uploads/2010/05/slippage_eek-the-cat2.jpg"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/05/slippage_eek-the-cat2.jpg" alt="slippage_eek the cat2" title="slippage_eek the cat2" width="280" height="370" class="aligncenter size-full wp-image-2260" /></a></p>
<p>Slippage can <strong>make or break</strong> your trading system.<br />
Hard to believe? Read on and check the tests and charts further below&#8230;</p>
<p>We recently talked about some <a href="http://www.automated-trading-system.com/data-pitfalls/">data pitfalls</a> that can affect your trading and testing of mechanical systems. <strong>Slippage </strong>was not mentioned. However, this is a <em>critical</em> piece of data to integrate in your back-testing parameters (and to get right if you want to get accurate backtest results).</p>
<p>I decided to study the impact of slippage on one of the trading systems from the suite used for the <a href="http://www.automated-trading-system.com/state-of-trend-following-draft-20100/">State of Trend Following report</a>.</p>
<h3>Impact of Slippage on Donchian System</h3>
<p>The system under study is the simple Donchian Channel with the following parameters:</p>
<ul>
<li>Entry breakout: 20 days</li>
<li>Exit breakout: 10 days</li>
<li>Entry Stop: 2 x 39-day exponential ATR, risking 1% of Total Equity</li>
</ul>
<p>One of the good things about Trading Blox is the wide range of parameters you can test in your simulation. There are over 30 simulation parameters such as interest, rollover, commissions, handling of lock-days, which can be tested to check their impact on the system performance. </p>
<p>So, I quickly fired up Trading Blox, and ran a stepped simulation with <strong>slippage varying from 0% to 35%</strong>.<span id="more-2259"></span></p>
<h3>Slippage in Trading Blox</h3>
<p>The slippage percentage is not an amount directly added/substracted to the entry/exit price. Instead it takes into account the range of the day of the order. From Trading Blox documentation:</p>
<blockquote><p>
For a long entry, the slippage factor is calculated by measuring the range from the theoretical entry price to the day&#8217;s highest price, and multiplying that amount by the Slippage Percent. (For short entries, the slippage factor is calculated by measuring the range from the theoretical entry price to the low). The slippage factor is then added to, or subtracted from the theoretical entry price, to obtain the simulated fill price.</p>
<p>Here&#8217;s how it works for a buy trade:</p>
<p><a href="http://www.automated-trading-system.com/wp-content/uploads/2010/05/TB-slippage.png"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/05/TB-slippage.png" alt="TB-slippage" title="TB-slippage" width="420" height="150" class="alignnone size-full wp-image-2261" /></a></p>
<p>Slippage percent: 25%<br />
Theoretical buy order price: 100<br />
High Price (for the day): 120<br />
Slippage Factor: (120 &#8211; 100) x 0.25 = (20 x 0.25) = 5<br />
Simulated fill price:  Order Price + Slippage Factor = (100 + 5) = 105</p>
<p>The distance between the high price and the order price is multiplied by the slippage factor. In this example, the difference between the high price and the order price is 20 points. The 20 points are multiplied by the 25% slippage to get an estimated slippage of 5 points. The fill price for the order will be 5 points worse than the stop order price of 100 simulating a fill at 105.</p></blockquote>
<h3>Slippage test results</h3>
<p>Here are the results of the stepped simulation and a chart of the resulting equity curves for each stepped test:</p>
<table border=1 frame=above rules=rows bordercolor=black cellpadding=2 cellspacing=0 style="font-size: 0.8em;">
<caption><strong>Stepped Parameter Summary Performance</strong></caption>
<tr>
<td bgcolor="#CCFFCC">&nbsp;&nbsp;Slippage (%)</td>
<td width=120 bgcolor="#CCFFCC">Ending Balance</td>
<td width=55 bgcolor="#CCFFCC">CAGR%</td>
<td width=40 bgcolor="#CCFFCC">MAR</td>
<td width=60 bgcolor="#CCFFCC">Modified Sharpe</td>
<td width=50 bgcolor="#CCFFCC">Annual Sharpe</td>
<td width=80 bgcolor="#CCFFCC">Max Total Equity DD</td>
<td width=80 bgcolor="#CCFFCC">Longest Drawdown</td>
<td width=60 bgcolor="#CCFFCC"># Trades</td>
</tr>
<tr>
<td style="font-size:1pt" colspan=14 height = 1><img src="spacer.gif" width=1 height=1></td>
</tr>
<tr>
<td>0%</td>
<td>6,002,394,255.23</td>
<td>56.26%</td>
<td>1.08</td>
<td>1.02</td>
<td>0.49</td>
<td>52.1%</td>
<td>27.4</td>
<td>6,483</td>
</tr>
<tr>
<td>5%</td>
<td>555,900,504.33</td>
<td>32.36%</td>
<td>0.51</td>
<td>0.73</td>
<td>0.31</td>
<td>63.6%</td>
<td>50.6</td>
<td>6,482</td>
</tr>
<tr>
<td>10%</td>
<td>166,197,092.85</td>
<td>21.66%</td>
<td>0.29</td>
<td>0.59</td>
<td>0.21</td>
<td>74.5%</td>
<td>58.5</td>
<td>6,473</td>
</tr>
<tr>
<td>15%</td>
<td>33,017,684.15</td>
<td>8.69%</td>
<td>0.11</td>
<td>0.40</td>
<td>0.07</td>
<td>82.1%</td>
<td>59.8</td>
<td>6,392</td>
</tr>
<tr>
<td>20%</td>
<td>8,004,611.35</td>
<td>-1.54%</td>
<td>-0.02</td>
<td>0.24</td>
<td>-0.06</td>
<td>91.5%</td>
<td>128.9</td>
<td>6,371</td>
</tr>
<tr>
<td>25%</td>
<td>1,914,036.01</td>
<td>-10.89%</td>
<td>-0.11</td>
<td>0.07</td>
<td>-0.22</td>
<td>96.1%</td>
<td>128.9</td>
<td>6,371</td>
</tr>
<tr>
<td>30%</td>
<td>455,560.44</td>
<td>-19.39%</td>
<td>-0.20</td>
<td>-0.13</td>
<td>-0.43</td>
<td>98.4%</td>
<td>128.9</td>
<td>6,349</td>
</tr>
<tr>
<td>35%</td>
<td>142,291.14</td>
<td>-25.67%</td>
<td>-0.26</td>
<td>-0.37</td>
<td>-0.86</td>
<td>99.3%</td>
<td>128.9</td>
<td>5,573</td>
</tr>
</table>
<p><a href="http://www.automated-trading-system.com/wp-content/uploads/2010/05/slippage.png"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/05/slippage.png" alt="slippage" title="slippage" width="492" height="353" class="aligncenter size-full wp-image-2272" /></a></p>
<p>The impact of slippage is rather dramatic. Even ignoring the extreme cases, consider the difference between a back-test with no slippage and the next one up, with a small 5% number: the performance is cut drastically to a point where the MAR ratio of the system is more than halved (1.08 v 0.51) as both CAGR and Drawdowns deteriorate sharply.</p>
<p>Imagine setting up a buy order for 100 tomorrow. If the price trades between 99 and 102, your order should be filled. However, with 5% slippage, the fill price would be 100.1 instead of the order price of 100. This is the difference between a good system and a not-so-good one&#8230;</p>
<h3>Slippage: fact of life for Trend Followers</h3>
<p>Most Trend Following systems get in and out in the same direction as the current price momentum. Therefore, this keeps them more exposed to slippage than a mean-reversion system, for example.</p>
<p>Unfortunately, this is not something that can be tested, apart from running tests in real markets (or having some more complete and granular data, such as tick data, complemented with some book depth information).</p>
<p>An idea to investigate would be to <strong>avoid the obvious price levels</strong> that every trader and their dog are watching (ie breakout of 20-day range, 50-day moving average, etc.). Alternative but close parameter values (19 or 21-day breakouts, 50-day MA + 1%, etc.) could possibly give similar results (they should if the system is robust) but trade at levels less watched and possibly expose the system to less slippage.</p>
<h3>Slippage at the &#8220;Pros&#8221;</h3>
<p>I was recently talking to an emergent Trend Following hedge fund in London. They mentioned their team of two traders to enter and manage positions. You could think that the need for two traders in a Long Term Trend Following fund managing under $20M is possibly superflous. However the result they were getting is <strong>negative slippage</strong>, which, as the backtest results show, can mean much more than just a nice little extra boost to the overall performance.</p>
<p>Aspect Capital, one of the <a href="http://www.automated-trading-system.com/resources/trend-following-wizards-fund-performance/">Trend Following Wizards</a>, is an example of a large fund having developed a research team and infrastructure to enhance their trade executions, with the use of algorithmic trading (execution) in combination with their trading desk. This is used in addition to their main alpha-generating automated trading signals. Their approach is discussed in an <a href="http://www.automatedtrader.net/articles/my-machine/614/empirical-execution-aspect-capital" target="_blank" rel="nofollow">interview with Automated Trader magazine</a>:</p>
<blockquote><p>
&#8220;At the moment about 90% of our electronic trading is managed by our algorithmic execution model&#8221;</p>
<p>&#8220;we see automation as being of value in [...] removing our footprint in the market by keeping our order flow under the radar&#8221;</p>
<p>&#8220;We have a team of three people mostly focused on the execution algorithms&#8221;
</p></blockquote>
<h3>Slippage: an essential part of a System</h3>
<p>Slippage might be considered as an after-thought in developing an automated trading system, However, the results of our tests point to slippage being a core contributor to the overall system performance. This is further highlighted by the effort professional fund managers put in to improve their executions.</p>
<p>The question is: how can you reduce slippage as a small trader? Sure, your footprint is much smaller than the big funds, but if you employ a Trend Following system you&#8217;re likely to occur slippage. Probably a case where it does not pay to be a <a href="http://www.automated-trading-system.com/small-fish-big-trading-pond/">small fish in a big pond</a> (with bigger fish having better market access).<br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />
<sup>Picture credits: eek-the-cat@flickr</sup></p>
<img src="http://www.automated-trading-system.com/?ak_action=api_record_view&id=2259&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.automated-trading-system.com/slippage-take-3-stop-limit-orders/' rel='bookmark' title='Permanent Link: Slippage &#8211; Take 3: Stop-Limit Orders'>Slippage &#8211; Take 3: Stop-Limit Orders</a></li>
<li><a href='http://www.automated-trading-system.com/follow-up-on-slippage/' rel='bookmark' title='Permanent Link: Follow-up on Slippage'>Follow-up on Slippage</a></li>
<li><a href='http://www.automated-trading-system.com/walk-forward-trading-blox/' rel='bookmark' title='Permanent Link: Walk-Forward in Trading Blox: Back-Testing Adaptive Trading'>Walk-Forward in Trading Blox: Back-Testing Adaptive Trading</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/slippage-backtesting-realistic/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>A trick to reduce Drawdowns</title>
		<link>http://www.automated-trading-system.com/trick-reduce-drawdowns/</link>
		<comments>http://www.automated-trading-system.com/trick-reduce-drawdowns/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 12:00:45 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[Strategies]]></category>
		<category><![CDATA[Trend Following]]></category>
		<category><![CDATA[drawdown]]></category>
		<category><![CDATA[equity]]></category>
		<category><![CDATA[heat]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=2188</guid>
		<description><![CDATA[Drawdowns represent the scary part of trading system statistics. The drawdown number emphasises the level of loss you might suffer while trading that system. It is risk to your trading capital.
Now, for a quick disclaimer: I do not have a magic trick to simply reduce drawdowns&#8230; but with this cheeky title, I wanted to draw [...]


Related posts:<ol><li><a href='http://www.automated-trading-system.com/get-out-locked-limit-situation/' rel='bookmark' title='Permanent Link: How to get out of a locked-limit situation'>How to get out of a locked-limit situation</a></li>
<li><a href='http://www.automated-trading-system.com/your-worst-drawdown-is-yet-to-come/' rel='bookmark' title='Permanent Link: Your worst Drawdown is yet to come'>Your worst Drawdown is yet to come</a></li>
<li><a href='http://www.automated-trading-system.com/state-of-trend-following-draft-201003/' rel='bookmark' title='Permanent Link: The State of Trend Following report &#8211; Draft V0.1'>The State of Trend Following report &#8211; Draft V0.1</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div id="attachment_2190" class="wp-caption alignleft" style="width: 310px"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/04/buddhabrot_jared-300x300.jpg" alt="Illustration by jared@flickr" title="buddhabrot_jared" width="300" height="300" class="size-medium wp-image-2190" /><p class="wp-caption-text">Illustration by jared@flickr</p></div>
<p>Drawdowns represent the <em>scary</em> part of trading system statistics. The drawdown number emphasises the level of loss you might suffer while trading that system. It is <em>risk</em> to your trading capital.</p>
<p>Now, for a <strong>quick disclaimer</strong>: I do not have a <em>magic trick</em> to simply reduce drawdowns&#8230; but with this cheeky title, I wanted to draw your attention to how you can interpret drawdowns with more nuance. We&#8217;ll still reduce the drawdwon of a system, but with no magic trick involved.</p>
<p>Obviously, you know that drawdown is the relative distance between the current equity and the highest past equity peak. And when considering using a system with a Max Drawdown of 30%, this is the amount potentially threatening your starting trading capital. Well, not necessarily so&#8230;</p>
<p>It all depends what you consider your <em>capital</em> and <strong>what equity you use to measure your drawdown</strong>. <span id="more-2188"></span>Total equity is the universal measure in terms of reporting (including drawdown figures). It is made up of both <em>closed and open</em> equities. Closed equity is your account balance after taking into account the starting balance and all closed trades. Open equity is the value of all open positions.</p>
<h3>Trend Following induces Drawdowns</h3>
<p>By nature, <strong>Trend Following is a strategy prone to drawdowns</strong> because of the way it waits for the trend to reverse before closing the position. On any winning Trend Following trade, there is often a lot of open equity &#8220;given back&#8221; to the market. </p>
<p>Below is an equity graph of the life of a hypothetical Trend Following trade:</p>
<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/04/EquityCurves.png" alt="EquityCurves" title="EquityCurves" width="455" height="297" class="alignnone size-full wp-image-2191" /></p>
<p>The closed equity only changes when the trade is closed out, while the total equity reflects the value of the open position (open equity) added to the closed equity. The non-risk equity represents that portion of equity if the trade hit its stop-loss and was closed out, effectively representing the locked-in equity from the trade. As we enter the trade, the locked-in equity is negative (stop-loss below trade entry price) but as we gradually raise the stop-loss level (or as the indicator used for the exit signal moves up) the locked-in equity becomes positive. When the trade ends, the three equity curves meet again.</p>
<h3>Does it make sense to look at Total/Open Equity?</h3>
<p>As mentioned earlier, total equity is the universal measure of system performance. You often hear that you should consider the value of open profits (open equity) in the same way as your hard-earned capital and defend it just the same (rather than gambling it away as if it was the <em>market&#8217;s money</em>). I do not believe this directly applies to Trend Following, which does not attempt to time tops and bottoms; and enters trades with the understanding that a large portion of each trade open profit will be left &#8220;on the table&#8221;, but that, on the long run, is the best way to benefit from these trends.</p>
<p>Trend Following&#8217;s open profit (open equity) is just potential profit &#8211; and as the saying goes: </p>
<blockquote><p>Don&#8217;t count your chicken before they hatch.</p></blockquote>
<p>It might be cautious to do the same thing with your trading system, and not bank on the open equity, or treat it the same way as actual, realized profits. </p>
<p>Looking at the hypothetical trade example and its associated equity curves, it might not make the most sense to look at your system&#8217;s performance through the green total equity curve &#8220;lens&#8221;. It is arguable whether the open equity and its highest point have much direct relevance to the system result if we accept that letting the open equity grow and subsequently shrink is &#8220;part of the game&#8221;. The open equity does not directly affect the bottom line. </p>
<p>What matters is how much of our capital (closed equity) we risk, and how much profit is actually made.</p>
<h3>Total Equity and System Statistics</h3>
<p>On the equity curves chart, representing only one winning trade, the relatively wide variations in open equity impact some system statistics:</p>
<p>Despite the fact that the trade never loses more than half the initial risk, it leaves us with a <strong>drawdown</strong> of three times the initial risk percentage.</p>
<p>Also, of interest, to monitor the risk taken, is the <strong>system heat</strong>. The typical heat calculation is the amount of equity at risk, basically the difference between the total equity and the non-risk equity. Every time we open a new trade, the heat is equal to the initial risk taken for that trade (ie. based on the position size). However, as the trade progresses, the heat increases to multiples of that amount, despite the real initial risk being unchanged.</p>
<p>Looking at raw drawdown and heat numbers from a total equity point of view would give a false impression of the actual dynamics of the system, which seems penalized for what is, in essence, a good Trend Following trade.</p>
<p>It could be argued (and I do) that looking at alternative equity curves might give a clearer picture.</p>
<p>In terms of drawdowns, we know that a large portion of the drawdown is actually due to giving back open profits, a necessary &#8220;evil&#8221; to implement a Trend Following strategy. <strong>Drawdown on closed equity</strong> is a better measure of how the system is going wrong by actually taking losing trades, and of how much capital might really be lost when trading the system.</p>
<p>Similarly, for the risk currently taken by the system, you might want to measure the heat by comparing closed equity to non-risk equity. The heat being the difference between the former and the latter (ie equal to the opposite of the locked-in equity when negative, zero when positive).</p>
<p>On the winning trade example, this would give drastically reduced drawdown and risk/heat figures.</p>
<h3>Real System Drawdown Reduction</h3>
<p>This is all well and good in a single theoritical trade example, but how does this actually affect a real system? To check this, I fired up <a href="http://www.automated-trading-system.com/trading-blox-teaser-review/">Trading Blox</a> and ran a standard Donchian system (50-day breakout) and calculated MaxDD on both total and closed equity curves. First, here is the chart of both curves. As expected they roughly follow the same path, spreading apart and joining again regularly &#8211; but they never diverge for too long (and never will):</p>
<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/04/TotalvClosedEquity.png" alt="TotalvClosedEquity" title="TotalvClosedEquity" width="499" height="370" class="alignnone size-full wp-image-2192" /></p>
<p>The curves do look similar, however the drawdown figures are quite different, with the Total Equity Drawdown being nearly 35% larger than the Closed Equity one:</p>
<ul>
<li>Total Equity Max Drawdown: 38.2%</li>
<li>Closed Equity Max Drawdown: 28.5%</li>
</ul>
<p>Would you have started trading this system at any time in the past, you could not have incurred a loss to your starting capital of more than 28.5%, despite the headline drawdown figure of 38.2% (note: I am assuming that when starting trading a system, one only takes new signals).</p>
<h3>In Closing</h3>
<p>I am sure this is a controversial point of view amongst trading system designers and total equity is necessarily the one to look at for accounting, tax and fund reporting reasons.</p>
<p>This post is not really advocating one way of measuring system performance over another but draws the attention to interpreting the right statistic for the right characteristic, when designing and monitoring your trading system. Now, it also depends whether you are designing a system for yourself or for potential investors&#8230;</p>
<p>PS: in place of &#8220;non-risk equity&#8221;, used in this post, you might also come across the term&#8221;core equity&#8221;.</p>
<img src="http://www.automated-trading-system.com/?ak_action=api_record_view&id=2188&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.automated-trading-system.com/get-out-locked-limit-situation/' rel='bookmark' title='Permanent Link: How to get out of a locked-limit situation'>How to get out of a locked-limit situation</a></li>
<li><a href='http://www.automated-trading-system.com/your-worst-drawdown-is-yet-to-come/' rel='bookmark' title='Permanent Link: Your worst Drawdown is yet to come'>Your worst Drawdown is yet to come</a></li>
<li><a href='http://www.automated-trading-system.com/state-of-trend-following-draft-201003/' rel='bookmark' title='Permanent Link: The State of Trend Following report &#8211; Draft V0.1'>The State of Trend Following report &#8211; Draft V0.1</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/trick-reduce-drawdowns/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>ALGODEAL: new horizons for retail quant traders?</title>
		<link>http://www.automated-trading-system.com/algodeal-retail-quant-traders/</link>
		<comments>http://www.automated-trading-system.com/algodeal-retail-quant-traders/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 10:39:20 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[algodeal]]></category>
		<category><![CDATA[fees]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=1996</guid>
		<description><![CDATA[Recently came across ALGODEAL, which aims to provide us, quant traders, a platform to backtest and implement live automated trading strategies, as well as access to institutional money. This appears to be a promising development in the world of retail quant traders.

Quant Fund Management meets Crowd-Sourcing
In an adaptation of the web 2.0 model, the company [...]


Related posts:<ol><li><a href='http://www.automated-trading-system.com/backtesting-trading-platform/' rel='bookmark' title='Permanent Link: How to decide on a Backtesting and Trading Platform'>How to decide on a Backtesting and Trading Platform</a></li>
<li><a href='http://www.automated-trading-system.com/balsara-money-management-strategies-for-futures-traders/' rel='bookmark' title='Permanent Link: Balsara: Money Management Strategies for Futures Traders'>Balsara: Money Management Strategies for Futures Traders</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Recently came across <a href="https://beta.algodeal.com/home.html" target="_blank">ALGODEAL</a>, which aims to provide us, quant traders, a platform to backtest and implement live automated trading strategies, as well as access to institutional money. This appears to be a promising development in the world of retail quant traders.</p>
<p><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/03/algodeal.png" alt="algodeal" title="algodeal" width="414" height="107" class="alignnone size-full wp-image-1997" /></p>
<h3>Quant Fund Management meets Crowd-Sourcing</h3>
<p>In an adaptation of the <em>web 2.0</em> model, the company aims to leverage the content (quant strategies) provided by their users. In order to attract these quant users, AlgoDeal do provide you the following:</p>
<ul>
<li>Free <strong>backtesting software</strong>: their proprietary java-based MarketRunner</li>
<li>Free <strong>infrastructure</strong>: computer grid to run backtests and optimizations and low-latency data/exchange connectivity</li>
<li>Free clean <strong>historical market data</strong>: covering 80 futures markets</li>
<li>Access to <strong>institutional funds</strong></li>
</ul>
<p>And in <em>good ol&#8217;</em> 2.0 fashion, this is still a <em>beta</em> platform&#8230;<span id="more-1996"></span></p>
<h3>The Business Model</h3>
<p>The access to the software, infrastructure and market data is completely free; but the guys at  AlgoDeal are not running a charity for <em>hedge-fund-less</em> quant traders&#8230;</p>
<p>For each backtest you receive a scorecard with each metrics evaluated (CAGR, Sharpe ratio, MaxDD, etc.) and a final score. AlgoDeal selects the best scoring systems and allocates its clients&#8217; funds to the selected strategies.</p>
<p>This is done via a legal agreement that ties you for a fixed-term, but the ownership of the strategy remains yours.<br />
And you get paid: 10% of the strategy profits (which would amount to 50% of the variable part in  a typical 2/20 fee arrangement).</p>
<h3>Techie&#8217;s corner</h3>
<p>So you&#8217;ll need java if you want to use AlgoDeal&#8217;s platform. There are 2 options, you can either edit the strategies directly on the website or download MarketRunner and run it in your favourite IDE (the only real viable option..) such as Eclipse, etc.</p>
<p>The whole grid aspect is hidden from you: it should just mean that the backtests and optimizations that you submit online should be parallelized and run faster.</p>
<p>Regarding the execution side of things for live trading, AlgoDeal have entered into an agreement with <a href="http://www.quanthouse.com/">QuantHouse</a> to provide fast access to markets (proximity hosting, exchange connectivity with proprietary fiber optic network, etc.).</p>
<p>Finally, the historical data is all continuous contracts, rolled automatically (no mention of what rolling algorithm is used). They currently only provide daily data going back from 1999 but expect to go down to 1-min frequency in the coming months.</p>
<h3>Beta version</h3>
<p>This is still a beta version and as a result things are still moving. AlgoDeal have a published Roadmap on the site which lists coming improvements over the next 3 months, such as risk management, improved money management, multi-strategy systems, etc.</p>
<p>The beta tag also means that this is not yet a final, stable release. One example of this last night: I could not get to run one of their canned quick start examples, simply getting the message:</p>
<blockquote><p>Something went wrong! some backtests failed</p></blockquote>
<p>However, the developers do seem to be responsive on the forum they maintain (they also communicate through their <a href="http://blog.algodeal.com/" target="_blank" rel="nofollow">blog</a>). There is also a fair deal of doc available.</p>
<h3>Free invites</h3>
<p>This beta release is by invite only and new registrations seem to be closed for now. However I contacted AlgoDeal directly to request a special &#8220;blogger&#8221; invite, which they kindly obliged. They also mentioned that they would allocate 100 invites for you, my readers:</p>
<blockquote><p>We can allocate an initial set of 100 logins to referrals from your blog, once they have left their email on our website ask them to send an email to support@algodeal.com with in the subject line &#8220;On behalf of Jez&#8217;s blog&#8221;</p></blockquote>
<p>Note: for the record, I am not associated with AlgoDeal in any way and I am not getting anything out of these invites. I just thought that sharing these might be of interest to you.</p>
<h3>First impressions</h3>
<p>It is obviously not as sophisticated (yet?) as a &#8220;proper&#8221; backtesting platform such as Trading Blox, and I only played with AlgoDeal and their simple canned examples on the online editor. I assume there will be lots of progress and improvements in the coming months, before their proper launch (Q2 2010?).</p>
<p>I think the real selling point for serious quant traders is the &#8220;easy&#8221; access to institutional money, provided that the platform is flexible enough to implement &#8220;sophisticated&#8221; strategies. I am not sure whether long-term Trend Following strategies are the best way to get selected on this platform (backtest market data only goes back to relatively recent 1999, typical higher return volatility might be an issue, etc.)</p>
<p>In any case, this is a &#8220;free&#8221; way to get access to a large quant fund infrastructure and capital raising without the hassles and headaches that come with setting up your own fund or working for one (and looking a much better option than covestor, KaChing or collective2). I do not know how much external capital AlgoDeal have secured for fund allocation, but each strategy could be allocated between $100k to $10M, and the 10% share of profits makes it potentially an attractive proposition.</p>
<p>A platform and space to watch&#8230;</p>
<img src="http://www.automated-trading-system.com/?ak_action=api_record_view&id=1996&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.automated-trading-system.com/backtesting-trading-platform/' rel='bookmark' title='Permanent Link: How to decide on a Backtesting and Trading Platform'>How to decide on a Backtesting and Trading Platform</a></li>
<li><a href='http://www.automated-trading-system.com/balsara-money-management-strategies-for-futures-traders/' rel='bookmark' title='Permanent Link: Balsara: Money Management Strategies for Futures Traders'>Balsara: Money Management Strategies for Futures Traders</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/algodeal-retail-quant-traders/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>
