<?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; Unfair Advantage</title>
	<atom:link href="http://www.automated-trading-system.com/tag/unfair-advantage/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>Tue, 07 Feb 2012 09:58:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>CSI Raw Contract Data Extractor</title>
		<link>http://www.automated-trading-system.com/csi-raw-contract-data-extractor/</link>
		<comments>http://www.automated-trading-system.com/csi-raw-contract-data-extractor/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 09:34:38 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[CSI]]></category>
		<category><![CDATA[Unfair Advantage]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=2374</guid>
		<description><![CDATA[I have mentioned before that I use CSI as my main provider for Futures data. Overall, I judge CSI&#8217;s service as good quality &#8211; however one drawback is the closed aspect of the data access. And I decided to write a utility to make it more &#8220;open&#8221;. To access the historical data, you have to [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_2376" class="wp-caption alignnone" style="width: 428px"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/06/CSIExtractor.png" alt="CSI Data Extractor: Utility tool to extract CSI data in plain text files" title="CSIExtractor" width="418" height="241" class="size-full wp-image-2376" /><p class="wp-caption-text">CSI Data Extractor: Utility tool to extract CSI data in plain text files</p></div>
<p>I have mentioned <a href="http://www.automated-trading-system.com/unfair-advantage-csi/">before</a> that I use CSI as my main provider for Futures data. Overall, I judge CSI&#8217;s service as good quality &#8211; however one drawback is the <em>closed</em> aspect of the data access. And I decided to write a utility to make it more &#8220;open&#8221;.</p>
<p>To access the historical data, you have to go through their software (Unfair Advantage), which extracts and decrypts it from their proprietary binary format. You can always &#8220;build&#8221; historical files to disk, but these are usually pre-processed with a special algorithm (ie. back-adjusted, etc.).</p>
<p>What more, if you decide to stop your subscription to CSI&#8217;s data services, you will not be able to access any data any more, even historical data downloaded under the subscription contract.</p>
<p>For some of the reasons above, it might be interesting to be able to extract/store CSI&#8217;s <em>raw data</em> in plain text files. This would allow for:</p>
<ul>
<li>Browsing the data outside of the CSI&#8217;s Unfair Advantage software</li>
<li>Applying back-adjustment or other manipulation algorithms not supported by CSI&#8217;s UA (such as calculating the <a href="http://www.automated-trading-system.com/crude-oil-contango-and-roll-yield-for-commodity-trading/">yield curve</a>)</li>
<li>Keep the historical data independently of your CSI subscription</li>
</ul>
<p><span id="more-2374"></span></p>
<p>Note: what I consider CSI raw data is the actual daily information for each contract traded on any day. For example, in the Corn market, there are currently 15 different contracts trading (with different maturities), each with their own Open, High, Low, Close, Volume and Open Interest.</p>
<h3>CSI API to the rescue</h3>
<p>Now, you could easily go to Unfair Advantage and pick every single historical contract that you want to extract&#8230; but this would be a fairly tedious job</p>
<p>Luckily for us, the API allows for programmatic access to CSI&#8217;s data to automate the process of extracting all contracts that we want &#8211; so I decided to write a little utility to do just that.  And now my data is really mine!</p>
<p>Below is a zip file containing the files to copy to &#8220;install&#8221; the utility:</p>
<p><a href='http://www.automated-trading-system.com/wp-content/uploads/2010/06/CSI-DataExtractor.zip'>CSI-DataExtractor.zip</a></p>
<p>Note that you need to have Unfair Advantage installed on the machine running this exe (which does not come with any guarantee by the way&#8230; but I have been using it fine so far).</p>
<p>The operation is very simple: just enter CSI&#8217;s number for the market you want to extract and choose which path the files need to be extracted to.</p>
<p>Hope you&#8217;re finding this tool useful&#8230;</p>
<p><strong>Note</strong>: You can receive a <a href="http://www.automated-trading-system.com/csi" target="_blank" rel="nofollow">10% discount on CSI data subscriptions</a> (use coupon code LIBERTY)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/csi-raw-contract-data-extractor/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>How-To: CSI Data into TradersStudio</title>
		<link>http://www.automated-trading-system.com/csi-data-into-tradersstudio/</link>
		<comments>http://www.automated-trading-system.com/csi-data-into-tradersstudio/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 13:34:09 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Data]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[CSI]]></category>
		<category><![CDATA[screenshots]]></category>
		<category><![CDATA[tradersstudio]]></category>
		<category><![CDATA[Unfair Advantage]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=1225</guid>
		<description><![CDATA[Dear readers, I hope you enjoyed the holiday break. I wish you a happy New Year &#8211; may it bring you progress and success in your automated trading endeavours! I wanted to start this year with an idea I left off last year, when investigating robustness: Using the median as a more robust tool than [...]]]></description>
			<content:encoded><![CDATA[<p>Dear readers, I hope you enjoyed the holiday break. I wish you a happy New Year &#8211; may it bring you progress and success in your automated trading endeavours!</p>
<p>I wanted to start this year with an idea I left off last year, when <a href="http://www.automated-trading-system.com/robustness-definitions/">investigating robustness</a>: <em>Using the median as a more robust tool than the ubiquitous mean (or average).</em> This will be covered in the next post via a TradersStudio simulation results. To do that, I had to re-import some data from <em>CSI Unfair Advantage</em> to <em>TradersStudio</em>. I thought a &#8220;how-to&#8221; post on this would be useful &#8211; if only as an aide-memoire for next time (note-taking and documentation are important after all&#8230;)</p>
<h3>Extract CSI Data</h3>
<p>The first step is to extract the data from the CSI database into text files<span id="more-1225"></span><br />
(by the way, CSI have a 20% discount running until the end of January &#8211; just check their <a href="http://www.csidata.com/" target="_blank" rel="nofollow">homepage</a>).<br />
This can be done with <a href="http://www.automated-trading-system.com/unfair-advantage-api-code-c-extract-futures-continuous-data/">code using the Unfair Advantage API</a>.</p>
<p>Pick all the instruments to be extracted and create a &#8220;contracts.param&#8221; file containing the CSI number for those instruments in the first column (comma-separated file with other columns being ignored). The CSI numbers can be found on their website (like <a href="http://www.csidata.com/cgi-bin/newspaperwrap.pl?file=/csiweb/ua/FactsheetHtml/CME.htm&#038;fmt=nomenu&#038;title=CME%20-%20Chicago%20Mercantile%20Exchange" rel="nofollow" target="_blank">here for the CME Futures</a>) or in their Unfair Advantage software UI. Running the EXE code will generate one file for each instrument (proportionally back-adjusted contract) in the following format:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #2400d9;">19900403</span>,<span style="color: #2400d9;">199006</span>,<span style="color: #2400d9;">0</span>,<span style="color: #2400d9;">240</span>,<span style="color: #2400d9;">110</span>,<span style="color: #2400d9;">918</span>,<span style="color: #2400d9;">503</span>,<span style="color: #2400d9;">2</span>,<span style="color: #2400d9;">0</span>,<span style="color: #2400d9;">1.59</span>,<span style="color: #2400d9;">1.655</span>,<span style="color: #2400d9;">1.58</span>,<span style="color: #2400d9;">1.635</span>,<span style="color: #2400d9;">1.635</span>,<span style="color: #2400d9;">1.635</span>,<span style="color: #2400d9;">1.635</span>
<span style="color: #2400d9;">19900404</span>,<span style="color: #2400d9;">199006</span>,<span style="color: #2400d9;">0</span>,<span style="color: #2400d9;">84</span>,<span style="color: #2400d9;">127</span>,<span style="color: #2400d9;">656</span>,<span style="color: #2400d9;">721</span>,<span style="color: #2400d9;">3</span>,<span style="color: #2400d9;">0</span>,<span style="color: #2400d9;">1.6</span>,<span style="color: #2400d9;">1.65</span>,<span style="color: #2400d9;">1.599</span>,<span style="color: #2400d9;">1.62</span>,<span style="color: #2400d9;">1.62</span>,<span style="color: #2400d9;">1.62</span>,<span style="color: #2400d9;">1.62</span>
<span style="color: #2400d9;">19900405</span>,<span style="color: #2400d9;">199006</span>,<span style="color: #2400d9;">0</span>,<span style="color: #2400d9;">57</span>,<span style="color: #2400d9;">112</span>,<span style="color: #2400d9;">554</span>,<span style="color: #2400d9;">885</span>,<span style="color: #2400d9;">4</span>,<span style="color: #2400d9;">0</span>,<span style="color: #2400d9;">1.615</span>,<span style="color: #2400d9;">1.635</span>,<span style="color: #2400d9;">1.61</span>,<span style="color: #2400d9;">1.615</span>,<span style="color: #2400d9;">1.615</span>,<span style="color: #2400d9;">1.615</span>,<span style="color: #2400d9;">1.615</span>
<span style="color: #2400d9;">19900406</span>,<span style="color: #2400d9;">199006</span>,<span style="color: #2400d9;">0</span>,<span style="color: #2400d9;">62</span>,<span style="color: #2400d9;">136</span>,<span style="color: #2400d9;">436</span>,<span style="color: #2400d9;">1092</span>,<span style="color: #2400d9;">5</span>,<span style="color: #2400d9;">0</span>,<span style="color: #2400d9;">1.615</span>,<span style="color: #2400d9;">1.635</span>,<span style="color: #2400d9;">1.61</span>,<span style="color: #2400d9;">1.625</span>,<span style="color: #2400d9;">1.625</span>,<span style="color: #2400d9;">1.625</span>,<span style="color: #2400d9;">1.625</span></pre></div></div>

<h3>Load in TradersStudio</h3>
<p>The second step is to load the files in TradersStudio. Copy all generated text files in a dedicated data directory (you might have to rename them as TradersStudio allowed filename length is fairly short, i.e. 10-15 characters).<br />
Create the relevant mapping file (<a href='http://www.automated-trading-system.com/wp-content/uploads/2010/01/txtinfo.txt' target="_blank">txtinfo.txt</a>) in the data directory. The mapping file should read:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;">delimit<span style="color: #002200;">=</span>,
skip<span style="color: #002200;">=</span><span style="color: #2400d9;">0</span>
dt<span style="color: #002200;">=</span><span style="color: #2400d9;">1</span>
ti<span style="color: #002200;">=</span><span style="color: #2400d9;">0</span>
op<span style="color: #002200;">=</span><span style="color: #2400d9;">10</span>
hi<span style="color: #002200;">=</span><span style="color: #2400d9;">11</span>
lo<span style="color: #002200;">=</span><span style="color: #2400d9;">12</span>
cl<span style="color: #002200;">=</span><span style="color: #2400d9;">13</span>
vol<span style="color: #002200;">=</span><span style="color: #2400d9;">6</span>
oi<span style="color: #002200;">=</span><span style="color: #2400d9;">7</span>
dtformat<span style="color: #002200;">=</span>CCYYMMDD
tiformat<span style="color: #002200;">=</span></pre></div></div>

<p>In TradersStudio, menu Data Manager/Add Data Links, point to the relevant data directory with the following options:</p>
<p><a href="http://www.automated-trading-system.com/wp-content/uploads/2010/01/DataManager.png" target="_blank"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/01/DataManager-300x259.png" alt="DataManager" title="DataManager" width="300" height="259" class="alignnone size-medium wp-image-1226" /></a></p>
<p><a href="http://www.automated-trading-system.com/wp-content/uploads/2010/01/InstrumentType.png" target="_blank"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/01/InstrumentType-300x195.png" alt="InstrumentType" title="InstrumentType" width="300" height="195" class="alignnone size-medium wp-image-1228" /></a></p>
<p>If all goes well, this will load the data in the system (errors I encountered were due to file names being too long).</p>
<h3>Data Universe: Contract meta-data</h3>
<p>The third step is to populate the meta-data (margin, min tick move, etc.) for each instrument in TradersStudio. This is done via the menu Data Manager/Data Universe.</p>
<p><a href="http://www.automated-trading-system.com/wp-content/uploads/2010/01/DataUniverse-MetaData.png" target="_blank"><img src="http://www.automated-trading-system.com/wp-content/uploads/2010/01/DataUniverse-MetaData-293x300.png" alt="DataUniverse-MetaData" title="DataUniverse-MetaData" width="293" height="300" class="alignnone size-medium wp-image-1227" /></a></p>
<p>Once done, the instruments can be used just by adding them to any session.</p>
<p>As mentioned earlier the next post will be a test comparing moving average and moving median indicators.</p>
<p><strong>Note</strong>: You can receive a <a href="http://www.automated-trading-system.com/csi" target="_blank" rel="nofollow">10% discount on CSI data subscriptions</a> (use coupon code LIBERTY)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/csi-data-into-tradersstudio/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>TradersStudio: the best Systems testing software?</title>
		<link>http://www.automated-trading-system.com/tradersstudio-systems-testing-software/</link>
		<comments>http://www.automated-trading-system.com/tradersstudio-systems-testing-software/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 09:45:48 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[CSI]]></category>
		<category><![CDATA[tradersstudio]]></category>
		<category><![CDATA[tradestation]]></category>
		<category><![CDATA[Unfair Advantage]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=642</guid>
		<description><![CDATA[I should say &#8220;Yes&#8221; as I decided to purchase, and now own TradersStudio. For the price ($499), it offers a very decent package for developing and testing automated trading systems. Why I chose TradersStudio I did consider a few options before buying TradersStudio (Amibroker, TradeStation, Trading Blox, WealthLab, NinjaTrader) and based on feature analysis, recommendations [...]]]></description>
			<content:encoded><![CDATA[<p>I should say &#8220;Yes&#8221; as I decided to purchase, and now own TradersStudio. For the price ($499), it offers a very decent package for developing and testing automated trading systems.</p>
<h3>Why I chose TradersStudio</h3>
<p>I did consider a few options before buying <a href="http://www.tradersstudio.com/" target="_blank" rel="nofollow">TradersStudio</a> (Amibroker, TradeStation, Trading Blox, WealthLab, NinjaTrader) and based on feature analysis, recommendations and actual testing, I settled on TradersStudio.<br />
My requirements were for a standalone platform that would allow me to test any system, with money management and multiple system interaction.<br />
I did hesitate with Trading Blox, which I enjoyed testing (demo version), but in the end the price sorted the argument (Trading Blox is $3,000 for similar functionality).<br />
For more info on what each product offers, I would definitely recommend heading to <a href="http://www.elitetrader.com/" target="_blank" rel="nofollow">EliteTrader</a> where many platform comparison posts can be found. Please also feel free to ask me questions in the Comments section below.</p>
<h3>First impressions</h3>
<p>Not so good&#8230; There is no<span id="more-642"></span> demo available on the website, you can not download the app from the website once purchased and the manuals you receive after waiting a few days seem quite unprofessional (despite being over 300 pages).<br />
However, the install is quite easy and you can be up and running following examples from the manual in a few minutes.</p>
<h3>Main Features</h3>
<p>The app offers some interesting features which help me take the decision:</p>
<h3>Integrated Systems testing</h3>
<p>TradersStudio uses different hierarchical levels: Instrument, System, Session, Trade Plan. This allows you to test a <em>complete</em> system (i.e. more than simple entry and exit testing). A Trade Plan can contain several sessions, which in turn can contain several systems and instruments with possible interaction between them. Additionally, Money Management options can be tested as part of the Trading Plan. This makes it much more realistic than a collection of independent strategy tests.<br />
There is also to the concept of <em>virtual systems</em> that allow you to run a system in &#8220;monitor&#8221; mode and only use it for decision making on other &#8220;live&#8221; systems (i.e. enter a trade in real system only after virtual system posts 3 losing trades).</p>
<h3>Customisation</h3>
<p>TradersStudio implements its own Macro language, which appears to be a cross between TradeStation EasyLanguage and Visual Basic. Theoritically you can implement whatever extra functionality you require (indicator, software add-in, etc.). Moreover there is an import tool that automatically converts TradeStation EasyLanguage code, which should allow to reuse available code.</p>
<h3>Data-independent</h3>
<p>You can basically load data from whatever source you wish in any supported format (any standard text file format will do). I personally use Unfair Advantage from CSI and getting it loaded to TradersStudio was a breeze (see <a href="http://www.automated-trading-system.com/tag/unfair-advantage/">Unfair Advantage posts</a> for more information on CSI UA -> TradersStudio)</p>
<h3>Walk Forward</h3>
<p>Walk forward is a useful concept to use in back-testing to avoid over-optimization and curve-fitting. TradersStudio implements this functionality and runs it automatically which means less manual workaround for you to deal with.</p>
<h3>Documentation issues</h3>
<p>My main grudge is about the manuals. Despite being over 300 pages it is still missing an essential reference guide for programming using their language (there are a few examples but they do not cover the whole range of functionality and much is left to be guessed by the user). It is a &#8220;Learning by Example&#8221; type of manual which can sound a bit patronising at times.<br />
For that reason I have found it hard to seriously get into TradersStudio&#8230; but I have just signed up for the yahoo group dedicated to it and will be spending many hours in front of it very soon!</p>
<p>I will explore TradersStudio in more details as I start using it and share in a later post if you are interested.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/tradersstudio-systems-testing-software/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Unfair Advantage API Code (C#): Extract Futures Continuous data</title>
		<link>http://www.automated-trading-system.com/unfair-advantage-api-code-c-extract-futures-continuous-data/</link>
		<comments>http://www.automated-trading-system.com/unfair-advantage-api-code-c-extract-futures-continuous-data/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 15:37:09 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Futures]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[CSI]]></category>
		<category><![CDATA[rollover]]></category>
		<category><![CDATA[screenshots]]></category>
		<category><![CDATA[Unfair Advantage]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=279</guid>
		<description><![CDATA[As mentioned in the previous post on retrieving Back-Adjusted Contracts using the RetrieveBackAdjustedContract2 function of the Unfair Advantage API, I have coded up this very simple project to read a list of Futures underlying instruments, retrieve a proportionally back-adjusted contract for each of the instruments and oputput it to a file. Getting started with the [...]]]></description>
			<content:encoded><![CDATA[<p>As mentioned in the previous post on <a href="http://www.automated-trading-system.com/unfair-advantage-api-retrieve-back-adjusted-contracts-function/" target="_blank">retrieving Back-Adjusted Contracts using the RetrieveBackAdjustedContract2 function of the Unfair Advantage API</a>, I have coded up this very simple project to read a list of Futures underlying instruments, retrieve a proportionally back-adjusted contract for each of the instruments and oputput it to a file.</p>
<h3>Getting started with the API</h3>
<p>Fire up your favourite IDE/language that supports COM Interoperability (I am using Visual C# 2008 Express Edition), start Console Application project and add a reference to the Unfair Advantage API. For this you just need to &#8220;Add reference&#8221; and browse to the Unfair Advantage installation folder and select the main EXE (uad.exe). This gives access to the CSI UA API.</p>
<div id="attachment_288" class="wp-caption aligncenter" style="width: 606px"><img src="http://www.automated-trading-system.com/wp-content/uploads/2009/09/UA-C-reference1.jpg" alt="Add UA into your project and &quot;Bob&#039;s your Uncle!&quot;" title="UA-C#-reference" width="500" height="457" class="size-full wp-image-288" /><p class="wp-caption-text">Add UA into your project and &quot;Bob's your Uncle!&quot;</p></div>
<h3>Simple extraction code</h3>
<p>The rest is fairly simple as long as you<span id="more-279"></span> <a href="http://www.automated-trading-system.com/unfair-advantage-api-retrieve-back-adjusted-contracts-function/" target="_blank">understand the RetrieveBackAdjustedContract2 parameters</a>.<br />
The code below takes 2 parameters: an input file name containing the list of markets to extract and a folder name to extract each continuous contract to. It sets specific UA session parameters and calls the RetrieveBackAdjustedContract2 with specific variables to obtain the concatenation desired. Each continuous contract is output to a folder in a .txt file.<br />
The file containing the list of markets is of the following format (CSI number, Symbol, Market name):<br />
&#8230;<br />
8,CT,Cotton<br />
&#8230;</p>
<h3>The code</h3>
<p>Please find the code <a href="http://www.automated-trading-system.com/pages/csharp-uaapi-continuouscontract.html" target="_blank">there</a> (very nicely formatted thanks to <a href="http://www.manoli.net/csharpformat/" target="_blank" rel="nofollow">this great tool by manoli</a>). You can also download the Program.cs file:<br />
<a href='http://www.automated-trading-system.com/wp-content/uploads/2009/09/Program.cs'><img src="http://www.automated-trading-system.com/wp-content/uploads/2009/09/Program.cs.jpg" alt="Program.cs" title="Program.cs" width="162" height="58" class="aligncenter size-full wp-image-287" /></a></p>
<p><strong>Note</strong>: You can receive a <a href="http://www.automated-trading-system.com/csi" target="_blank" rel="nofollow">10% discount on CSI data subscriptions</a> (use coupon code LIBERTY)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/unfair-advantage-api-code-c-extract-futures-continuous-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unfair Advantage API: Retrieve Back-Adjusted Contracts function</title>
		<link>http://www.automated-trading-system.com/unfair-advantage-api-retrieve-back-adjusted-contracts-function/</link>
		<comments>http://www.automated-trading-system.com/unfair-advantage-api-retrieve-back-adjusted-contracts-function/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 10:41:06 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Futures]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Continuous contract]]></category>
		<category><![CDATA[CSI]]></category>
		<category><![CDATA[Unfair Advantage]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=202</guid>
		<description><![CDATA[Let&#8217;s have fun with the CSI UA API! CSI main API document (word doc) is accessible publicly online from their document page along with other docs including the full 300 page manual (great for getting a feel of the app). Pivotal API function This post will focus on is the API function to retrieve Back-Adjusted [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s have fun with the CSI UA API!<img class="size-full wp-image-251" title="CSI-Unfair-Advantage-API" src="http://www.automated-trading-system.com/wp-content/uploads/2009/09/CSI-API1.jpg" alt="Let's have fun with the CSI UA API" width="450" height="185" /></p>
<p><a rel="nofollow" href="http://www.csidata.com/custserv/onlinehelp/uaapi/UaOleApi.doc" target="_blank">CSI main API document (word doc)</a> is accessible publicly online from their <a rel="nofollow" href="http://www.csidata.com/custserv/onlinehelp/index.html" target="_blank">document page</a> along with other docs including the full 300 page manual (great for getting a feel of the app).</p>
<h3>Pivotal API function</h3>
<p>This post will focus on is the API function to retrieve Back-Adjusted Contracts from the Unfair Advantage database.<br />
As the last post on <a href="http://www.automated-trading-system.com/continuous-contract-options/">Continuous Contract options</a> showed, there are multiple choices available and these all translate to parameters to <span id="more-202"></span>the API function: <strong>RetrieveBackAdjustedContract2</strong>. This is what I consider to be the <em>meat</em> of the API: it queries the proprietary UA database and applies the concatenation algorithms to produce a continuous contract.</p>
<h3>27 Parameters!</h3>
<p>Yes&#8230; that function&#8217;s behaviour is driven by the value of 27 properties or variables. There are actually 14 &#8220;Session&#8221; properties and another 13 variables passed to the function. The aim of these parameters is to reproduce exactly all the options covered in the previous post&#8230; and then some.</p>
<h3>My own doc</h3>
<p>Because I found the CSI doc not ideal (you have to keep flipping back and forth for a description of all 27 parameters) I decided to re-write my own &#8220;cheat-sheet&#8221; documentation for the <strong>RetrieveBackAdjustedContract2</strong> API function.<br />
The rest of this post is that document &#8211; formatted into HTML by M$ Word (so please excuse any formatting mishaps). The document contains 2 parts: the UA session properties and the function variables. Hope this helps.<br />
You can also <a href="http://www.automated-trading-system.com/wp-content/uploads/2009/09/CSI-UA-RetrieveBackAdjustedContract2-Doc.rtf" target="_blank">download the document in the RTF format.</a><br />
<a class="aligncenter href=" href="http://www.automated-trading-system.com/wp-content/uploads/2009/09/CSI-UA-RetrieveBackAdjustedContract2-Doc.rtf" target="_blank"><img class="aligncenter size-full wp-image-260" title="CSI UA API: RetrieveBackAdjustedContract2 function Cheat-Sheet" src="http://www.automated-trading-system.com/wp-content/uploads/2009/09/rtf_icon.png" alt="CSI UA API: RetrieveBackAdjustedContract2 function Cheat-Sheet" width="50" height="52" /></a></p>
<p>Stay tuned for the next episode, where I will share a sample code using the function above to extract a list of Futures contracts. This should illustrate how to use all these parameters.</p>
<h3>The document:</h3>
<h2>FUNCTION: RetrieveBackAdjustedContract2</h2>
<p><!--<br />
<!   /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	mso-bidi-font-size:12.0pt; 	font-family:Arial; 	mso-fareast-font-family:"Times New Roman"; 	mso-bidi-font-family:"Times New Roman"; 	mso-fareast-language:EN-US;} h1 	{mso-style-next:Normal; 	margin-top:12.0pt; 	margin-right:0cm; 	margin-bottom:16.0pt; 	margin-left:0cm; 	mso-pagination:widow-orphan; 	page-break-after:avoid; 	mso-outline-level:1; 	font-size:16.0pt; 	font-family:Arial; 	mso-font-kerning:14.0pt; 	mso-fareast-language:EN-US;} h2 	{mso-style-next:Normal; 	margin-top:12.0pt; 	margin-right:0cm; 	margin-bottom:12.0pt; 	margin-left:0cm; 	mso-pagination:widow-orphan; 	page-break-after:avoid; 	mso-outline-level:2; 	font-size:14.0pt; 	font-family:Arial; 	mso-font-kerning:14.0pt; 	mso-fareast-language:EN-US; 	mso-bidi-font-style:italic;} h4 	{mso-style-next:Normal; 	margin-top:12.0pt; 	margin-right:0cm; 	margin-bottom:12.0pt; 	margin-left:0cm; 	mso-pagination:widow-orphan; 	page-break-after:avoid; 	mso-outline-level:4; 	font-size:11.0pt; 	mso-bidi-font-size:14.0pt; 	font-family:Arial; 	mso-bidi-font-family:"Times New Roman"; 	mso-fareast-language:EN-US;} h5 	{mso-style-next:Normal; 	margin-top:12.0pt; 	margin-right:0cm; 	margin-bottom:6.0pt; 	margin-left:0cm; 	mso-pagination:widow-orphan; 	page-break-after:avoid; 	mso-outline-level:5; 	font-size:10.0pt; 	mso-bidi-font-size:13.0pt; 	font-family:Arial; 	mso-bidi-font-family:"Times New Roman"; 	mso-fareast-language:EN-US; 	mso-bidi-font-style:italic;} h6 	{mso-style-next:Normal; 	margin-top:12.0pt; 	margin-right:0cm; 	margin-bottom:3.0pt; 	margin-left:0cm; 	mso-pagination:widow-orphan; 	page-break-after:avoid; 	mso-outline-level:6; 	font-size:10.0pt; 	mso-bidi-font-size:11.0pt; 	font-family:Arial; 	mso-bidi-font-family:"Times New Roman"; 	mso-fareast-language:EN-US;} p.MsoHeader, li.MsoHeader, div.MsoHeader 	{margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	tab-stops:center 224.55pt right 449.9pt; 	font-size:10.0pt; 	mso-bidi-font-size:12.0pt; 	font-family:Arial; 	mso-fareast-font-family:"Times New Roman"; 	mso-bidi-font-family:"Times New Roman"; 	mso-fareast-language:EN-US;} p.MsoFooter, li.MsoFooter, div.MsoFooter 	{margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	tab-stops:center 224.55pt right 449.9pt; 	font-size:8.0pt; 	mso-bidi-font-size:12.0pt; 	font-family:Arial; 	mso-fareast-font-family:"Times New Roman"; 	mso-bidi-font-family:"Times New Roman"; 	mso-fareast-language:EN-US;} span.MsoPageNumber 	{mso-ansi-font-size:8.0pt; 	font-family:Arial; 	mso-ascii-font-family:Arial; 	mso-hansi-font-family:Arial;} pre 	{margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Courier New"; 	mso-fareast-font-family:"Times New Roman";} span.SpellE 	{mso-style-name:""; 	mso-spl-e:yes;} span.GramE 	{mso-style-name:""; 	mso-gram-e:yes;} @page Section1 	{size:595.3pt 841.9pt; 	margin:72.0pt 72.0pt 72.0pt 72.0pt; 	mso-header-margin:21.55pt; 	mso-footer-margin:21.55pt; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:-132; 	mso-list-type:simple; 	mso-list-template-ids:1225576648;} @list l0:level1 	{mso-level-tab-stop:74.6pt; 	mso-level-number-position:left; 	margin-left:74.6pt; 	text-indent:-18.0pt;} @list l1 	{mso-list-id:-131; 	mso-list-type:simple; 	mso-list-template-ids:1309295544;} @list l1:level1 	{mso-level-tab-stop:60.45pt; 	mso-level-number-position:left; 	margin-left:60.45pt; 	text-indent:-18.0pt;} @list l2 	{mso-list-id:-130; 	mso-list-type:simple; 	mso-list-template-ids:1505632560;} @list l2:level1 	{mso-level-tab-stop:46.3pt; 	mso-level-number-position:left; 	margin-left:46.3pt; 	text-indent:-18.0pt;} @list l3 	{mso-list-id:-129; 	mso-list-type:simple; 	mso-list-template-ids:-1342289230;} @list l3:level1 	{mso-level-tab-stop:32.15pt; 	mso-level-number-position:left; 	margin-left:32.15pt; 	text-indent:-18.0pt;} @list l4 	{mso-list-id:-128; 	mso-list-type:simple; 	mso-list-template-ids:275296686;} @list l4:level1 	{mso-level-number-format:bullet; 	mso-level-text:\F0B7; 	mso-level-tab-stop:74.6pt; 	mso-level-number-position:left; 	margin-left:74.6pt; 	text-indent:-18.0pt; 	font-family:Symbol;} @list l5 	{mso-list-id:-127; 	mso-list-type:simple; 	mso-list-template-ids:472812886;} @list l5:level1 	{mso-level-number-format:bullet; 	mso-level-text:\F0B7; 	mso-level-tab-stop:60.45pt; 	mso-level-number-position:left; 	margin-left:60.45pt; 	text-indent:-18.0pt; 	font-family:Symbol;} @list l6 	{mso-list-id:-126; 	mso-list-type:simple; 	mso-list-template-ids:1685721214;} @list l6:level1 	{mso-level-number-format:bullet; 	mso-level-text:\F0B7; 	mso-level-tab-stop:46.3pt; 	mso-level-number-position:left; 	margin-left:46.3pt; 	text-indent:-18.0pt; 	font-family:Symbol;} @list l7 	{mso-list-id:-125; 	mso-list-type:simple; 	mso-list-template-ids:-1116197236;} @list l7:level1 	{mso-level-number-format:bullet; 	mso-level-text:\F0B7; 	mso-level-tab-stop:32.15pt; 	mso-level-number-position:left; 	margin-left:32.15pt; 	text-indent:-18.0pt; 	font-family:Symbol;} @list l8 	{mso-list-id:-120; 	mso-list-type:simple; 	mso-list-template-ids:779395724;} @list l8:level1 	{mso-level-tab-stop:18.0pt; 	mso-level-number-position:left; 	margin-left:18.0pt; 	text-indent:-18.0pt;} @list l9 	{mso-list-id:-119; 	mso-list-type:simple; 	mso-list-template-ids:-1209384448;} @list l9:level1 	{mso-level-number-format:bullet; 	mso-level-text:\F0B7; 	mso-level-tab-stop:18.0pt; 	mso-level-number-position:left; 	margin-left:18.0pt; 	text-indent:-18.0pt; 	font-family:Symbol;} ol 	{margin-bottom:0cm;} ul 	{margin-bottom:0cm;} --><br />
&#8211;&gt;<br />
<!--[if gte mso 10]><br />
<mce:style><!<br />
/* Style Definitions */<br />
table.MsoNormalTable<br />
{mso-style-name:"Table Normal";<br />
mso-tstyle-rowband-size:0;<br />
mso-tstyle-colband-size:0;<br />
mso-style-noshow:yes;<br />
mso-style-parent:"";<br />
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;<br />
mso-para-margin:0cm;<br />
mso-para-margin-bottom:.0001pt;<br />
mso-pagination:widow-orphan;<br />
font-size:10.0pt;<br />
font-family:"Times New Roman";<br />
mso-ansi-language:#0400;<br />
mso-fareast-language:#0400;<br />
mso-bidi-language:#0400;}<br />
table.MsoTableContemporary<br />
{mso-style-name:"Table Contemporary";<br />
mso-tstyle-rowband-size:1;<br />
mso-tstyle-colband-size:0;<br />
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;<br />
mso-border-insideh:2.25pt solid white;<br />
mso-border-insidev:2.25pt solid white;<br />
mso-para-margin:0cm;<br />
mso-para-margin-bottom:.0001pt;<br />
mso-pagination:widow-orphan;<br />
text-autospace:none;<br />
font-size:10.0pt;<br />
font-family:"Times New Roman";<br />
mso-ansi-language:#0400;<br />
mso-fareast-language:#0400;}<br />
table.MsoTableContemporaryFirstRow<br />
{mso-style-name:"Table Contemporary";<br />
mso-table-condition:first-row;<br />
mso-tstyle-shading:white;<br />
mso-tstyle-pattern:gray-20 black;<br />
mso-tstyle-diagonal-down:0cm none windowtext;<br />
mso-tstyle-diagonal-up:0cm none windowtext;<br />
font-family:"Times New Roman";<br />
mso-bidi-font-family:"Times New Roman";<br />
color:windowtext;<br />
mso-ansi-font-weight:bold;<br />
mso-bidi-font-weight:bold;}<br />
table.MsoTableContemporaryOddRow<br />
{mso-style-name:"Table Contemporary";<br />
mso-table-condition:odd-row;<br />
mso-tstyle-shading:white;<br />
mso-tstyle-pattern:gray-5 black;<br />
mso-tstyle-diagonal-down:0cm none windowtext;<br />
mso-tstyle-diagonal-up:0cm none windowtext;<br />
font-family:"Times New Roman";<br />
mso-bidi-font-family:"Times New Roman";<br />
color:windowtext;}<br />
table.MsoTableContemporaryEvenRow<br />
{mso-style-name:"Table Contemporary";<br />
mso-table-condition:even-row;<br />
mso-tstyle-shading:white;<br />
mso-tstyle-pattern:gray-20 black;<br />
mso-tstyle-diagonal-down:0cm none windowtext;<br />
mso-tstyle-diagonal-up:0cm none windowtext;<br />
font-family:"Times New Roman";<br />
mso-bidi-font-family:"Times New Roman";<br />
color:windowtext;}<br />
--><br />
<!--[endif]--></p>
<div class="Section1">
<p class="MsoNormal"><strong style="mso-bidi-font-weight:normal">FUNCTION</strong>: <strong style="mso-bidi-font-weight:normal">RetrieveBackAdjustedContract2</strong></p>
<p class="MsoNormal">
<p class="MsoNormal"><strong style="mso-bidi-font-weight:normal">PROPERTIES:</strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight:normal"> </strong></p>
<p class="MsoNormal"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">IncludeSaturdays</strong></span>:“True” if Saturday data is desired.</p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight:normal"> </strong></p>
<p class="MsoNormal"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">IncludeHolidays</strong></span><strong style="mso-bidi-font-weight:normal">: </strong>If NOT TRUE, than all data records reflect actual trading.<span style="mso-spacerun:yes"> </span>If TRUE, then weekdays on which there is no record are recorded with a day of week value of 8 and no price information.</p>
<p class="MsoNormal">
<p class="MsoNormal" style="tab-stops:120.75pt"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">OnHolidaysUsePreviousData</strong></span><strong style="mso-bidi-font-weight:normal">: </strong>If<strong style="mso-bidi-font-weight: normal"> </strong>1, then the previous <span class="GramE">days</span> data is copied with the Date and <span class="SpellE">DayOfWeek</span> changed.</p>
<p class="MsoNormal" style="tab-stops:120.75pt">
<p class="MsoNormal" style="tab-stops:120.75pt"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">OnHolidaysUseCloseOnly</strong></span><strong style="mso-bidi-font-weight:normal">:</strong> If 1, then the price values are set to the previous close and the volumes are set to zero.</p>
<p class="MsoNormal" style="tab-stops:120.75pt">
<p class="MsoNormal" style="tab-stops:120.75pt"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">ShowDecimalPoint</strong></span><strong style="mso-bidi-font-weight:normal">: </strong>controls whether prices are listed as integers or as strings representing the number (see 4.1.2.6 for details &#8211; <span class="SpellE">ConversionFactor</span>.)</p>
<p class="MsoNormal" style="tab-stops:120.75pt">
<p class="MsoNormal" style="tab-stops:120.75pt"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">ConversionFactor</strong></span><strong style="mso-bidi-font-weight:normal">: </strong>Most CSI data formats present price values as integers, according to the CSI format found in the &#8220;WSJ Price/CSI Price&#8221; column of the CSI Commodity Data Fact Sheet.<span style="mso-spacerun:yes"> </span>Please note the CSI price and the WSJ price, and when dealing with the CSI price values, consult the conversion factor column on the right hand side of each page. A conversion factor of -1, for example, reflects that the final digit is in eighths.<span style="mso-spacerun:yes"> </span>A CSI value of 3746 for wheat would be equivalent to 374 and 6/8, or 374-3/4..)</p>
<pre><span style="mso-bidi-font-size:12.0pt;font-family:Arial;mso-bidi-font-family:"> </span></pre>
<pre>CONVERSION FACTOR<span style="mso-tab-count:1">      </span><span style="mso-spacerun:yes">  </span>CONVERSION ACTION REQUIRED</pre>
<pre><span style="mso-tab-count:1">        </span>+6<span style="mso-tab-count:2">             </span>Move decimal point 6 places left</pre>
<pre><span style="mso-tab-count:1">        </span>+5<span style="mso-tab-count:2">             </span>Move decimal point 5 places left</pre>
<pre><span style="mso-tab-count:1">        </span>+4<span style="mso-tab-count:2">             </span>Move decimal point 4 places left</pre>
<pre><span style="mso-tab-count:1">        </span>+3<span style="mso-tab-count:2">             </span>Move decimal point 3 places left</pre>
<pre><span style="mso-tab-count:1">        </span>+2<span style="mso-tab-count:2">             </span>Move decimal point 2 places left</pre>
<pre><span style="mso-tab-count:1">        </span>+1<span style="mso-tab-count:2">             </span>Move decimal point 1 place left</pre>
<pre><span style="mso-tab-count:1">        </span> 0<span style="mso-tab-count:2">             </span>Leave number as it is</pre>
<pre><span style="mso-tab-count:1">        </span>-1<span style="mso-tab-count:2">             </span>Terminal digit is in eighths</pre>
<pre><span style="mso-tab-count:1">        </span>-2<span style="mso-tab-count:2">             </span>Terminal 2 digits are in 16ths</pre>
<pre><span style="mso-tab-count:1">        </span>-3<span style="mso-tab-count:2">             </span>Terminal 2 digits are in 32nds</pre>
<pre><span style="mso-tab-count:1">        </span>-4<span style="mso-tab-count:2">             </span>Terminal 2 digits are in 64ths</pre>
<pre><span style="mso-tab-count:1">        </span>-5<span style="mso-tab-count:2">             </span>Terminal 3 digits are in 128ths</pre>
<pre><span style="mso-tab-count:1">        </span>-6<span style="mso-tab-count:2">             </span>Terminal 3 digits are in 256ths</pre>
<pre><span style="mso-tab-count:1">        </span>-7<span style="mso-tab-count:2">             </span>Terminal 3 digits are in 32nds &amp; 1/2 32nds.</pre>
<p class="MsoNormal" style="tab-stops:120.75pt">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">DetrendMethod</strong></span><strong style="mso-bidi-font-weight:normal">:</strong> Indicates how and whether to <span class="SpellE">detrend</span> data being retrieved. <span class="SpellE">Detending</span>takes two prices, the first close (of the earliest date) in the series and a pivot price.<span style="mso-spacerun:yes"> </span>The pivot price may either be the close of the last day for the second-to-the-last contract or the close of the second-to-the-last day on file.<span style="mso-spacerun:yes"> </span>All days within the range have an amount added so that afterward the first close in the series matches the pivot price.<span style="mso-spacerun:yes"> </span>Here are the valid values.</p>
<div>
<table class="MsoNormalTable" style="border-collapse:collapse;border:none;mso-border-top-alt:solid black 1.5pt; mso-border-bottom-alt:solid black 1.5pt;mso-padding-alt:0cm 5.4pt 0cm 5.4pt" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes">
<td style="padding: 0cm 5.4pt; background: #666666 none repeat scroll 0% 0%; width: 164.3pt; border: 1.5pt medium medium solid none none black -moz-use-text-color -moz-use-text-color;" width="219" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><strong><span style="color:white">Name</span></strong></p>
</td>
<td style="padding: 0cm 5.4pt; background: #666666 none repeat scroll 0% 0%; width: 45.4pt; border: 1.5pt medium 1pt solid none black -moz-use-text-color;" width="61" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span style="color:white">Value</span></p>
</td>
</tr>
<tr style="mso-yfti-irow:1">
<td style="border: medium none; padding: 0cm 5.4pt; background: #cccccc none repeat scroll 0% 0%; width: 164.3pt;" width="219" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span class="SpellE"><strong>Detrend</strong></span><strong> By Second Contract</strong></p>
</td>
<td style="border: medium none; padding: 0cm 5.4pt; width: 45.4pt;" width="61" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">-1</p>
</td>
</tr>
<tr style="mso-yfti-irow:2">
<td style="border: 1pt solid silver; padding: 0cm 5.4pt; background: #cccccc none repeat scroll 0% 0%; width: 164.3pt;" width="219" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><strong>Not <span class="SpellE">Detrended</span></strong></p>
</td>
<td style="border: medium none; padding: 0cm 5.4pt; width: 45.4pt;" width="61" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">0</p>
</td>
</tr>
<tr style="mso-yfti-irow:3;mso-yfti-lastrow:yes">
<td style="padding: 0cm 5.4pt; background: #cccccc none repeat scroll 0% 0%; width: 164.3pt; border: medium medium 1pt none none solid -moz-use-text-color -moz-use-text-color windowtext;" width="219" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span class="SpellE"><strong>Detrend</strong></span><strong> by Second Day</strong></p>
</td>
<td style="padding: 0cm 5.4pt; width: 45.4pt; border: medium medium 1.5pt none none solid -moz-use-text-color -moz-use-text-color black;" width="61" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">+1</p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal" style="tab-stops:120.75pt">
<p class="MsoNormal" style="tab-stops:120.75pt"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">FillInCashPrices</strong></span><strong style="mso-bidi-font-weight:normal">: </strong>Determines whether to retrieve Cash Prices.<strong style="mso-bidi-font-weight:normal"> </strong>The &#8220;cash&#8221; price may be an actual cash price, it may be lagged cash, which would only have been known the day after, or it may simply be the nearest future contract.</p>
<p class="MsoNormal" style="tab-stops:120.75pt">
<p class="MsoNormal" style="tab-stops:120.75pt"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">ApplyCommodityAdjustments</strong></span><strong style="mso-bidi-font-weight:normal">:</strong> “True” to have adjustments made for unit of contract specification changes.</p>
<p class="MsoNormal" style="tab-stops:120.75pt">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom:6.0pt; margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">UseAlternateBackAdjuster</strong></span><strong style="mso-bidi-font-weight:normal">:</strong> If 1, then the Alternate Back Adjuster is used for all series, (default is the non-portfolio chart option value in UA). Notice that the standard back adjuster is fundamentally backward looking while the alternate back adjuster is fundamentally forward-looking which is why the Proportional accumulation is different.</p>
<p class="MsoNormal" style="tab-stops:120.75pt">
<p class="MsoNormal" style="tab-stops:120.75pt"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">RaiseNegBackAdjustSeries</strong></span><strong style="mso-bidi-font-weight:normal">:</strong> controls whether UA automatically adds the smallest number of thousands of points to bring the back adjuster series into the non-negative domain</p>
<p class="MsoNormal" style="tab-stops:120.75pt">
<p class="MsoNormal" style="tab-stops:120.75pt"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">NumDaysConfirmation</strong></span><strong style="mso-bidi-font-weight:normal">:</strong> selects how many consecutive volume and/or open interest roll <span class="GramE">signals<span style="mso-spacerun:yes"> </span>are</span> required before the algorithm rolls.<span style="mso-spacerun:yes"> </span>For the Standard Back Adjuster which views the market backward in time from the most recent to the most distant, this argument is ignored and has an effective value of 1.<span style="mso-spacerun:yes"> </span>For the Nth Nearest Future and the Alternate Back Adjuster, a value of at least 1 is required.</p>
<p class="MsoNormal" style="tab-stops:120.75pt">
<p class="MsoNormal"><strong style="mso-bidi-font-weight:normal">CloseOutOfRangeAdjustmentMethod: </strong>When a series settles outside of the daily range some software required the data to be “adjusted”.<span style="mso-spacerun:yes"> </span>The following are allowed:</p>
<p class="MsoNormal"><span style="mso-spacerun:yes"> </span><span class="SpellE"><span class="GramE">typedef</span></span> <span class="SpellE">enum</span><br />
{</p>
<p class="MsoNormal"><span style="mso-spacerun:yes"> </span><span class="SpellE">LeaveAlone_CloseOutOfRangeAdjustmentMethod</span>=0,</p>
<p class="MsoNormal"><span style="mso-spacerun:yes"> </span><span class="SpellE">CompromiseHighLow_CloseOutOfRangeAdjustmentMethod</span>=1,</p>
<p class="MsoNormal"><span style="mso-spacerun:yes"> </span><span class="SpellE">CompromiseClose_CloseOutOfRangeAdjustmentMethod</span>=2,</p>
<p class="MsoNormal"><span style="mso-spacerun:yes"> </span>} <span class="SpellE">CloseOutOfRangeAdjustmentMethodType</span>;</p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight:normal"> </strong></p>
<p class="MsoNormal"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">RoundToTick</strong></span><strong style="mso-bidi-font-weight:normal">: </strong>controls whether UA rounds values to the nearest tick</p>
<p class="MsoNormal">
<p class="MsoNormal"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">UseTradeableTick</strong></span><strong style="mso-bidi-font-weight:normal">: </strong>if <span class="SpellE">RoundToTick</span> is TRUE,<strong style="mso-bidi-font-weight:normal"> </strong>determines whether the settlement price should be rounded as per the exchange or the same way as the other prices.</p>
<p class="MsoNormal">
<p class="MsoNormal"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">AggregateVolAs</strong></span><strong style="mso-bidi-font-weight:normal">, <span class="SpellE">AggregateOiAs</span>, and <span class="SpellE">AggregateCashAs</span>: </strong>When making weekly, monthly, quarterly, or annual Documents, how are these fields to be treated:</p>
<p class="MsoNormal"><span style="mso-spacerun:yes"> </span><span class="SpellE">AggregateAsLargest</span>,</p>
<p class="MsoNormal"><span style="mso-spacerun:yes"> </span><span class="SpellE">AggregateAsSmallest</span>,</p>
<p class="MsoNormal"><span style="mso-spacerun:yes"> </span><span class="SpellE">AggregateAsAverage</span>,</p>
<p class="MsoNormal"><span style="mso-spacerun:yes"> </span><span class="SpellE">AggregateAsLast</span>,</p>
<p class="MsoNormal"><span style="mso-spacerun:yes"> </span><span class="SpellE">AggregateAsTotal</span></p>
<p class="MsoNormal">
<p class="MsoNormal"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">AggregateDateAsLastRecord</strong></span><strong style="mso-bidi-font-weight:normal">:</strong> TRUE if weekly, monthly, quarterly, and annual Documents should end on the date of the last data available.<span style="mso-spacerun:yes"> </span>For a weekly file generated after the close on Tuesday, the records would be Friday, Friday<span class="GramE">, …,</span> Friday, Tuesday.<span style="mso-spacerun:yes"> </span>If not TRUE, all records are on the same day of the week.</p>
<p class="MsoNormal">
<p class="MsoNormal"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">AggregateDayOfWeekAs</strong></span><strong style="mso-bidi-font-weight:normal">: </strong>If <span class="SpellE">AggregateDateAsLastRecord</span> is not TRUE, then what day of the week should the aggregate data <span class="GramE">be</span> assigned to:</p>
<p class="MsoNormal"><span style="mso-spacerun:yes"><br />
</span>&#8220;Sunday&#8221;,</p>
<p class="MsoNormal"><span style="mso-spacerun:yes"><br />
</span>&#8220;Monday&#8221;,</p>
<p class="MsoNormal"><span style="mso-spacerun:yes"><br />
</span>&#8220;Tuesday&#8221;,</p>
<p class="MsoNormal"><span style="mso-spacerun:yes"><br />
</span>&#8220;Wednesday&#8221;,</p>
<p class="MsoNormal"><span style="mso-spacerun:yes"><br />
</span>&#8220;Thursday&#8221;,</p>
<p class="MsoNormal"><span style="mso-spacerun:yes"><br />
</span>&#8220;Friday&#8221;,</p>
<p class="MsoNormal"><span style="mso-spacerun:yes"><br />
</span>&#8220;Saturday&#8221;</p>
<p class="MsoNormal">
<p class="MsoNormal"><strong style="mso-bidi-font-weight:normal">PARAMETERS</strong></p>
<p class="MsoNormal">
<p class="MsoNormal"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">MarketNumber</strong></span><strong style="mso-bidi-font-weight:normal">: </strong>integer assigned by CSI to identify a contract underlying.</p>
<p class="MsoNormal">
<p class="MsoNormal"><span class="SpellE"><span class="GramE"><strong style="mso-bidi-font-weight: normal">rollLogicType</strong></span></span><strong style="mso-bidi-font-weight:normal">: </strong>Identifies the logic to be used in deciding when to ignore a near contract:</p>
<p class="MsoNormal"><span style="mso-tab-count:1"> </span><span class="SpellE">RollOnOpenInterest</span> (-1)</p>
<p class="MsoNormal"><span style="mso-tab-count:1"> </span><span class="SpellE">RollOnVolume</span> (-2)</p>
<p class="MsoNormal"><span style="mso-tab-count:1"> </span><span class="SpellE">RollOnOpenInterestAndVolume</span> (-4)</p>
<p class="MsoNormal"><span style="mso-tab-count:1"> </span><span class="SpellE">RollOnOpenInterestOrVolume</span> (-3)</p>
<p class="MsoNormal"><span style="mso-tab-count:1"> </span><span class="SpellE">RollOnDayRelativeToStartOfMonth</span> (-5)</p>
<p class="MsoNormal"><span style="mso-tab-count:1"> </span><span class="SpellE">RollOnDayRelativeToEndOfMonth</span> (-6)</p>
<p class="MsoNormal">
<p class="MsoNormal"><span class="SpellE"><span class="GramE"><strong style="mso-bidi-font-weight: normal">rollWhen</strong></span></span><strong style="mso-bidi-font-weight:normal">: </strong>time delay between when the day&#8217;s prices are published and when the day&#8217;s volume and open interest are published is handled.<span style="mso-spacerun:yes"> </span>(There is almost always a one-day delay.)<strong style="mso-bidi-font-weight: normal"></strong></p>
<table class="MsoNormalTable" style="border-collapse:collapse;border:none;mso-border-alt:solid windowtext .5pt;  mso-padding-alt:0cm 5.4pt 0cm 5.4pt;mso-border-insideh:.5pt solid windowtext;  mso-border-insidev:.5pt solid windowtext" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes">
<td style="border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 131.4pt;" width="175" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Name</p>
</td>
<td style="padding: 0cm 5.4pt; width: 40.5pt; border: 1pt 1pt 1pt medium solid solid solid none windowtext windowtext windowtext -moz-use-text-color;" width="54" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Value</p>
</td>
<td style="padding: 0cm 5.4pt; width: 76.5pt; border: 1pt 1pt 1pt medium solid solid solid none windowtext windowtext windowtext -moz-use-text-color;" width="102" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Nth Nearest Rolls</p>
</td>
<td style="padding: 0cm 5.4pt; width: 76.5pt; border: 1pt 1pt 1pt medium solid solid solid none windowtext windowtext windowtext -moz-use-text-color;" width="102" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Alt Back Adjust</p>
</td>
<td style="padding: 0cm 5.4pt; width: 84.5pt; border: 1pt 1pt 1pt medium solid solid solid none windowtext windowtext windowtext -moz-use-text-color;" width="113" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Std Back Adjust</p>
</td>
</tr>
<tr style="mso-yfti-irow:1">
<td style="padding: 0cm 5.4pt; width: 131.4pt; border: medium 1pt 1pt none solid solid -moz-use-text-color windowtext windowtext;" width="175" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span class="SpellE">RollWhen_Anticipated</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 40.5pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="54" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">2</p>
</td>
<td style="padding: 0cm 5.4pt; width: 76.5pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="102" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Invalid</p>
</td>
<td style="padding: 0cm 5.4pt; width: 76.5pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="102" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Invalid</p>
</td>
<td style="padding: 0cm 5.4pt; width: 84.5pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="113" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">28<sup>th</sup></p>
</td>
</tr>
<tr style="mso-yfti-irow:2">
<td style="padding: 0cm 5.4pt; width: 131.4pt; border: medium 1pt 1pt none solid solid -moz-use-text-color windowtext windowtext;" width="175" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span class="SpellE">RollWhen_Reported</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 40.5pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="54" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">0</p>
</td>
<td style="padding: 0cm 5.4pt; width: 76.5pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="102" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">28<sup>th</sup></p>
</td>
<td style="padding: 0cm 5.4pt; width: 76.5pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="102" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">28<sup>th</sup></p>
</td>
<td style="padding: 0cm 5.4pt; width: 84.5pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="113" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">29<sup>th</sup></p>
</td>
</tr>
<tr style="mso-yfti-irow:3">
<td style="padding: 0cm 5.4pt; width: 131.4pt; border: medium 1pt 1pt none solid solid -moz-use-text-color windowtext windowtext;" width="175" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span class="SpellE">RollWhen_Known</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 40.5pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="54" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">1</p>
</td>
<td style="padding: 0cm 5.4pt; width: 76.5pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="102" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">29<sup>th</sup></p>
</td>
<td style="padding: 0cm 5.4pt; width: 76.5pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="102" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">29<sup>th</sup></p>
</td>
<td style="padding: 0cm 5.4pt; width: 84.5pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="113" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">30<sup>th</sup></p>
</td>
</tr>
<tr style="mso-yfti-irow:4;mso-yfti-lastrow:yes">
<td style="padding: 0cm 5.4pt; width: 131.4pt; border: medium 1pt 1pt none solid solid -moz-use-text-color windowtext windowtext;" width="175" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">RollWhen_Lagged2</p>
</td>
<td style="padding: 0cm 5.4pt; width: 40.5pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="54" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">3</p>
</td>
<td style="padding: 0cm 5.4pt; width: 76.5pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="102" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">30<sup>th</sup></p>
</td>
<td style="padding: 0cm 5.4pt; width: 76.5pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="102" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">30<sup>th</sup></p>
</td>
<td style="padding: 0cm 5.4pt; width: 84.5pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="113" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3;tab-stops: 66.75pt">Invalid</p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><strong style="mso-bidi-font-weight:normal"> </strong></p>
<p class="MsoNormal"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">DayOfMonthToRoll</strong></span><strong style="mso-bidi-font-weight:normal"> </strong><strong style="mso-bidi-font-weight:normal"><span style="mso-bidi-font-size:10.0pt">and <span class="SpellE">MonthsPriorToRoll</span></span>: </strong>used when the <span class="SpellE">rollLogicType</span> is a date roll to determine when the roll takes place.</p>
<p class="MsoNormal">
<p class="MsoNormal"><span class="SpellE"><span class="GramE"><strong style="mso-bidi-font-weight: normal">accumulationMethod</strong></span></span><strong style="mso-bidi-font-weight: normal">: </strong>Determines whether to adjust backward or forward.</p>
<table class="MsoNormalTable" style="border-collapse:collapse;border:none;mso-border-alt:solid windowtext .5pt; mso-padding-alt:0cm 5.4pt 0cm 5.4pt;mso-border-insideh:.5pt solid windowtext; mso-border-insidev:.5pt solid windowtext" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes">
<td style="border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 159.6pt;" width="213" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Name</p>
</td>
<td style="padding: 0cm 5.4pt; width: 48.3pt; border: 1pt 1pt 1pt medium solid solid solid none windowtext windowtext windowtext -moz-use-text-color;" width="64" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Valid</p>
</td>
<td style="padding: 0cm 5.4pt; width: 270.9pt; border: 1pt 1pt 1pt medium solid solid solid none windowtext windowtext windowtext -moz-use-text-color;" width="361" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Meaning</p>
</td>
</tr>
<tr style="mso-yfti-irow:1">
<td style="padding: 0cm 5.4pt; width: 159.6pt; border: medium 1pt 1pt none solid solid -moz-use-text-color windowtext windowtext;" width="213" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Proportional</p>
</td>
<td style="padding: 0cm 5.4pt; width: 48.3pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="64" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span style="mso-spacerun:yes"> </span>-1</p>
</td>
<td style="padding: 0cm 5.4pt; width: 270.9pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="361" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">(Deprecated)A multiplicative ratio factor is applied rather than an additive factor.<span style="mso-spacerun:yes"> </span>Because of the backward viewing perspective, the standard back adjuster brings the data to the current day contract level whereas because of the forward viewing perspective, the alternate back adjuster brings the data to the earliest contract level.<span style="mso-spacerun:yes"> </span>Prices cannot fall into negative territory in the past with this option.</p>
</td>
</tr>
<tr style="mso-yfti-irow:2">
<td style="padding: 0cm 5.4pt; width: 159.6pt; border: medium 1pt 1pt none solid solid -moz-use-text-color windowtext windowtext;" width="213" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Back</p>
</td>
<td style="padding: 0cm 5.4pt; width: 48.3pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="64" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span style="mso-spacerun:yes"> </span>0</p>
</td>
<td style="padding: 0cm 5.4pt; width: 270.9pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="361" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Adds adjustments to bring historical data to the current day contract level. This option can result in negative price readings into the past.</p>
</td>
</tr>
<tr style="mso-yfti-irow:3;mso-yfti-lastrow:yes">
<td style="padding: 0cm 5.4pt; width: 159.6pt; border: medium 1pt 1pt none solid solid -moz-use-text-color windowtext windowtext;" width="213" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Forward</p>
</td>
<td style="padding: 0cm 5.4pt; width: 48.3pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="64" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span style="mso-spacerun:yes"> </span>+1</p>
</td>
<td style="padding: 0cm 5.4pt; width: 270.9pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="361" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Subtracts adjustments to bring historical data to the earliest contract level.<span style="mso-spacerun:yes"> </span>Because of the effects of inflation, by using this option, prices are less likely to move negative into the future.</p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom:6.0pt; margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span class="SpellE"><span class="GramE"><strong style="mso-bidi-font-weight:normal">rollDeltaType</strong></span></span><strong style="mso-bidi-font-weight:normal">: </strong>identifies which contract values are used to measure the carrying charges for which the data is being adjusted.</p>
<table class="MsoNormalTable" style="border-collapse:collapse;border:none;mso-border-alt:solid windowtext .5pt; mso-padding-alt:0cm 5.4pt 0cm 5.4pt;mso-border-insideh:.5pt solid windowtext; mso-border-insidev:.5pt solid windowtext" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes">
<td style="border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 159.6pt;" width="213" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Name</p>
</td>
<td style="padding: 0cm 5.4pt; width: 52.8pt; border: 1pt 1pt 1pt medium solid solid solid none windowtext windowtext windowtext -moz-use-text-color;" width="70" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Value</p>
</td>
<td style="padding: 0cm 5.4pt; width: 266.4pt; border: 1pt 1pt 1pt medium solid solid solid none windowtext windowtext windowtext -moz-use-text-color;" width="355" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Effect</p>
</td>
</tr>
<tr style="mso-yfti-irow:1">
<td style="padding: 0cm 5.4pt; width: 159.6pt; border: medium 1pt 1pt none solid solid -moz-use-text-color windowtext windowtext;" width="213" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span class="SpellE">OpenToOpen</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 52.8pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="70" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span style="mso-spacerun:yes"> </span>-1</p>
</td>
<td style="padding: 0cm 5.4pt; width: 266.4pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="355" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Simulates rolling by an on-the-open spread order.</p>
</td>
</tr>
<tr style="mso-yfti-irow:2">
<td style="padding: 0cm 5.4pt; width: 159.6pt; border: medium 1pt 1pt none solid solid -moz-use-text-color windowtext windowtext;" width="213" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span class="SpellE">CloseToClose</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 52.8pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="70" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span style="mso-spacerun:yes"> </span>0</p>
</td>
<td style="padding: 0cm 5.4pt; width: 266.4pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="355" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Simulates rolling by an on-the-close spread order.</p>
</td>
</tr>
<tr style="mso-yfti-irow:3">
<td style="padding: 0cm 5.4pt; width: 159.6pt; border: medium 1pt 1pt none solid solid -moz-use-text-color windowtext windowtext;" width="213" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span class="SpellE">CloseToOpen</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 52.8pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="70" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span style="mso-spacerun:yes"> </span>+1</p>
</td>
<td style="padding: 0cm 5.4pt; width: 266.4pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="355" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Simulates an exit order on the close and an enter order on the next open.</p>
</td>
</tr>
<tr style="mso-yfti-irow:4">
<td style="padding: 0cm 5.4pt; width: 159.6pt; border: medium 1pt 1pt none solid solid -moz-use-text-color windowtext windowtext;" width="213" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span class="SpellE">CloseToOpenOldGap</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 52.8pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="70" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span style="mso-spacerun:yes"> </span>+2</p>
</td>
<td style="padding: 0cm 5.4pt; width: 266.4pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="355" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Mathematically equivalent to <span class="SpellE">OpenToOpen</span>.</p>
</td>
</tr>
<tr style="mso-yfti-irow:5;mso-yfti-lastrow:yes">
<td style="padding: 0cm 5.4pt; width: 159.6pt; border: medium 1pt 1pt none solid solid -moz-use-text-color windowtext windowtext;" width="213" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span class="SpellE">CloseToOpenNewGap</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 52.8pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="70" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom: 6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3"><span style="mso-spacerun:yes"> </span>+3</p>
</td>
<td style="padding: 0cm 5.4pt; width: 266.4pt; border: medium 1pt 1pt medium none solid solid none -moz-use-text-color windowtext windowtext -moz-use-text-color;" width="355" valign="top">
<p class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm;page-break-after:avoid;mso-outline-level:3">Mathematically equivalent to <span class="SpellE">CloseToClose</span>, except that the Alternate back adjuster requires one fewer days of existence for an explicit <span class="SpellE">CloseToClose</span>.</p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><strong style="mso-bidi-font-weight:normal"> </strong></p>
<p class="MsoNormal"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">ValidMonths</strong></span><strong style="mso-bidi-font-weight:normal">: </strong>Selects which delivery months to consider. The <span class="SpellE">ValidMonths</span> argument must be a string of 12 characters, one character for each month.<span style="mso-spacerun:yes"> </span>Each character determines whether contracts deliverable in that month <span class="GramE">are</span> included.<span style="mso-spacerun:yes"> </span>A contract is included if there is a &#8216;V&#8217; (for valid) in that position.<span style="mso-spacerun:yes"> </span>A value of &#8216;I&#8217; for invalid causes exclusion.</p>
<p class="MsoNormal">
<p class="MsoNormal"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">GenerateForward</strong></span><strong style="mso-bidi-font-weight:normal">: </strong>If the <span style="mso-no-proof: yes">UseAlternateBackAdjuster is zero</span> then <span class="SpellE">GenerateFoward</span> will have no effect. <span class="GramE">TRUE or 1 to begin with the earliest data and step day-by-day to the current day.</span> <span class="GramE">FLASE or 0 to begin with the current contract and <span class="SpellE">prepend</span> earlier data.</span></p>
<p class="MsoNormal">
<p class="MsoNormal"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">RollAtLeastNDaysBeforeExpiration</strong></span><strong style="mso-bidi-font-weight:normal">: </strong>definition a bit shaky…<strong style="mso-bidi-font-weight:normal"> </strong></p>
<p class="MsoNormal"><span class="GramE">causes</span> a roll to happen if necessary to avoid getting too close to expiration.</p>
<p class="MsoNormal">If you are not generating forward (zero), then the standard back adjuster is applied.<span style="mso-spacerun:yes"> </span>If the <span class="SpellE">RollAtLeastNDaysBeforeExpiration</span> is greater than zero, then the <span class="SpellE">rollLogicType</span> is overridden so that rolls happen based only on expiration.<span style="mso-spacerun:yes"> </span>(Like a roll relative to month end.).</p>
<p class="MsoNormal">
<p class="MsoNormal"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">StartDate</strong></span><strong style="mso-bidi-font-weight:normal"> and <span class="SpellE">EndDate</span>: </strong>These two long integers allow the user to limit the retrieval to a date range.<span style="mso-spacerun:yes"> </span>Use the values -1, -1 or <span class="GramE">0 ,0</span> if you want the full history available.<span style="mso-spacerun:yes"> </span>Can significantly improve performance, but for forward generated Nth Nearest Future and Back-Adjusted contracts can result in different contract choices.</p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight:normal"> </strong></p>
<p class="MsoNormal"><span class="SpellE"><strong style="mso-bidi-font-weight:normal">ProportionalAdjustment</strong></span><strong style="mso-bidi-font-weight:normal">:</strong> If the <span class="SpellE">ProportionalAdjustment</span> parameter is non-zero, then the Backward or Forward adjustments are applied by a multiplicative ratio factor rather than an additive factor. When the standard back adjuster is applied, only <span class="GramE">Backward</span> adjustments can be applied proportionally.<strong style="mso-bidi-font-weight:normal"></strong></p>
</div>
<p><strong>Note</strong>: You can receive a <a href="http://www.automated-trading-system.com/csi" target="_blank" rel="nofollow">10% discount on CSI data subscriptions</a> (use coupon code LIBERTY)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/unfair-advantage-api-retrieve-back-adjusted-contracts-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Continuous Contract options</title>
		<link>http://www.automated-trading-system.com/continuous-contract-options/</link>
		<comments>http://www.automated-trading-system.com/continuous-contract-options/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 19:26:19 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Futures]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Continuous contract]]></category>
		<category><![CDATA[CSI]]></category>
		<category><![CDATA[screenshots]]></category>
		<category><![CDATA[Unfair Advantage]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=188</guid>
		<description><![CDATA[As mentioned previously in What everybody ought to know about continuous Futures contracts, there are multiple ways to concatenate Futures contracts. Unfair Advantage offers a rich choice of concatenation algorithms &#8211; I will use UA as the base for this post. Please also refer to the Unfair Advantage online manual. Let&#8217;s look at the different [...]]]></description>
			<content:encoded><![CDATA[<p>As mentioned previously in <a href="http://www.automated-trading-system.com/what-everybody-ought-to-know-about-continous-futures-contracts" target="_blank">What everybody ought to know about continuous Futures contracts</a>, there are multiple ways to <strong>concatenate Futures contracts</strong>. Unfair Advantage offers a rich choice of concatenation algorithms &#8211; I will use UA as the base for this post.<br />
Please also refer to the <a rel="nofollow" href="http://www.csidata.com/custserv/onlinehelp/OnlineManual/" target="_blank">Unfair Advantage online manual</a>.</p>
<div id="attachment_224" class="wp-caption alignnone" style="width: 470px"><img class="size-full wp-image-224" title="Copper Continuous Contract" src="http://www.automated-trading-system.com/wp-content/uploads/2009/09/Corn-Continuous-Contract.jpg" alt="Continuous contracts allow you to chart Futures contract prices in one long time-series (here Copper ranging from 1965 to 2009)" width="460" height="193" /><p class="wp-caption-text">Continuous contracts allow you to chart Futures contract prices in one long time-series (here Copper ranging from 1965 to 2009)</p></div>
<p>Let&#8217;s look at the different possibilities:</p>
<h3>Non-adjusted contracts</h3>
<p>Take the front-month contract (nearest expiration date) and roll it over into the next one at expiration date. This generates a series of actual traded prices. But <span id="more-188"></span>as we discussed in our previous post, it does have negative impacts when used for back-testing because of the potential big gaps at roll-over times.</p>
<h3>Standard Back-Adjusted contracts</h3>
<p>A solution to this &#8220;big gap&#8221; problem is to move each contract up or down by a certain amount (the gap value) so that the rollover junction is continuous. This is <em>point-based adjustment</em> and is usualy performed &#8220;backwards&#8221;. You would start from the current contract, move the previous contract by a set amount, then subsequently move each of the anterior contracts to eliminate each gap you come across until the first contract of the timeseries.</p>
<h3>Proportionally Back-Adjusted contracts</h3>
<p>But as we saw in the last post, this <em>point-based adjustment</em> is not ideal either, as it loses the relative price differences and can even make past prices become negative. This is where <em>ratio-based adjustment</em> comes to the rescue.<br />
By applying a relative or <em>proportional</em> adjustment for each contract you will be able to maintain the historical price ratios and rid remove the gaps. This is equivalent to stock split adjustments in the Equities world. This is also done backwards &#8211; starting from the most recent contract going back, one by one, to the first contract in the series.<br />
Again, please check <a href="http://www.automated-trading-system.com/what-everybody-ought-to-know-about-continous-futures-contracts" target="_blank">the last post</a> for more details on the issues discussed above.</p>
<h3>Forward-Adjusted contracts</h3>
<p>Both <em>point-based adjustment</em> and <em>ratio-based adjustment</em> are usually worked out backwards &#8211; this allows to keep reference of the real/actual traded price in the current contract. However the same logic can be applied forward (start from the first contract and adjust your way up to the last contract). This will result in different contract values to back-adjusted contracts (but ratios would stay identical in case of proportional adjustments).</p>
<h3>Nth Nearest contracts</h3>
<p>This is a slight variation to all cases discussed above. Instead of always considering the nearest contract (ie front-month), you can decide to look at the <em>nth nearest</em> contract instead. For example, in Copper, the 3rd nearest contract is currently March 2010: HGH10. Once the current front-month contract expires (October 2009: HGV09), you would roll into the next available 3rd nearest contract which is May 2010: HGK10.<br />
This process should insulate you from possible more volatile price changes in the front-month contract around expiration time.</p>
<h3>Gann contract</h3>
<p>Gann contracts use a specific contract month and roll over only to the same contract in the next year. A March Gann contract, for example, consists of the nearest March contract for each day.</p>
<h3>Perpetual Contracts™</h3>
<p>This is an algorithm trademarked by CSI. To avoid the &#8220;gap&#8221; problem around rollover time, CSI have decided to smooth the transition phase out. The shift from one contract to the next one(s) spreads over time. The algorithm uses a time-weighted average of different expiration date contracts to gradually shift from the front-month to the further month as expiration date approaches. You can find more details <a rel="nofollow" href="http://www.csidata.com/cgi-bin/getManualPage.pl?URL=perpetualcontract(r)charts.htm" target="_blank">in the UA manual</a>.</p>
<h3>Other parameters: when to roll-over?</h3>
<p>You can roll-over right at expiration time. However this does not reflect actual trading activity, where physical roll-over (ie money flowing from one contract to the next) takes place earlier.<br />
You can decide to always roll-over n days before expiration but you can also decide to track actual market activity to trigger the roll-over. You would observe Open interest or Volume and roll-over when one of them shifts from one contract to another. This is a much more realistic approach.</p>
<p>Here is a screenshot of the settings I have used in Unfair Advantage to extract and concatenate the data, it is proportionally forward-adjusted with a roll-over triggered by a 2 consecutive shifts in Open Interest, but less than 5 days prior to expiration:</p>
<div id="attachment_196" class="wp-caption alignnone" style="width: 510px"><img class="size-full wp-image-196" title="Unfair Advantage Proportionally Forward-Adjusted Contract" src="http://www.automated-trading-system.com/wp-content/uploads/2009/09/UnfairAdvantage-Proportionally-Forward-Adjusted-Contract.jpg" alt="Unfair Advantage settings to generate a Proportionally Forward-Adjusted Contract " width="500" height="354" /><p class="wp-caption-text">Unfair Advantage settings to generate a Proportionally Forward-Adjusted Contract</p></div>
<h3>To be continued&#8230;</h3>
<p>There are many more options which will all be addressed in a further post detailing how to use the Unfair Advantage API to extract data directly from your own code (Exciting!).</p>
<p><strong>Note</strong>: You can receive a <a href="http://www.automated-trading-system.com/csi" target="_blank" rel="nofollow">10% discount on CSI data subscriptions</a> (use coupon code LIBERTY)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/continuous-contract-options/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>I just got myself an Unfair Advantage&#8230;</title>
		<link>http://www.automated-trading-system.com/unfair-advantage-csi/</link>
		<comments>http://www.automated-trading-system.com/unfair-advantage-csi/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 09:48:54 +0000</pubDate>
		<dc:creator>Jez Liberty</dc:creator>
				<category><![CDATA[Data]]></category>
		<category><![CDATA[Futures]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[CSI]]></category>
		<category><![CDATA[screenshots]]></category>
		<category><![CDATA[Unfair Advantage]]></category>

		<guid isPermaLink="false">http://www.automated-trading-system.com/?p=9</guid>
		<description><![CDATA[What is this Unfair Advantage? Well, I have just purchased End Of Day historical futures data from Commodity Systems Inc. and this is how they call their Software/Database! Admittedly it is supposed to be a very good data feed that Google and Yahoo use for their respective Finance portal. They are also recommended by back-testing [...]]]></description>
			<content:encoded><![CDATA[<h3>What is this Unfair Advantage?</h3>
<p>Well, I have just purchased End Of Day historical futures data from <a rel="nofollow" href="http://www.csidata.com/" target="_blank">Commodity Systems Inc.</a> and this is how they call their Software/Database!</p>
<p>Admittedly it is supposed to be a very good data feed that Google and Yahoo use for their respective Finance portal. They are also recommended by back-testing software companies (<a rel="nofollow" href="http://www.tradingblox.com/" target="_blank">Trading Blox</a>, <a rel="nofollow" href="http://www.amibroker.com/" target="_blank">Amibroker</a>, etc.). Futures magazine also ran a <a rel="nofollow" href="http://www.csidata.com/csi/reviews/reprintsep99.html" target="_blank">piece</a> listing them as the &#8220;cleanest&#8221; data around (back in 99).</p>
<div id="attachment_75" class="wp-caption alignnone" style="width: 130px"><a rel="nofollow" href="http://www.csidata.com/csi/reviews/reprintsep99.html" target="_blank"><img title="Futures article - CSI historical data" src="http://www.automated-trading-system.com/wp-content/uploads/2009/08/CSI-Futures-99.jpg" alt="Futures article - CSI historical data" width="120" height="150" /></a><p class="wp-caption-text">Futures article - CSI historical data</p></div>
<h3>Why CSI?</h3>
<p>I chose them because <span id="more-9"></span>they appear to have credibility, good quality data, compatibility with Trading Blox and <a rel="nofollow" href="http://www.tradersstudio.com/" target="_blank">TradersStudio</a> and I was interested in their Futures contracts splicing/concatenation algorithm choice. I am not really interested in all the &#8220;bells and whistles&#8221; that come with the software (charting, analysis, etc.) but they might become useful. My primary interest is to feed the data to a back-testing software.</p>
<h3>Getting up and running: in a breeze</h3>
<p>After downloading the install (500MB!) the software installs itself very quickly and starts downloading the latest database updates. You are supposed to run updates every so often to keep the database current. Once it is done you can start playing with the data within Unfair Advantage. The docs (both online and printed) are pretty good too.</p>
<h3>Wide choice of markets and contract types</h3>
<p>There are about 900 futures in the database and you can pretty much splice them as you want &#8211; to recreate different TimeSeries. I&#8217;ll explore futures contract concatenation in a later post but to give you a taster of the Unfair Advantage &#8220;menu&#8221; you can &#8220;order&#8221; a CBT Corn (Floor + Electronic trading) in a March Gann Series format as a &#8220;starter&#8221; followed by CME Lean Hogs (Floor Trading only) proportionally back-adjusted with roll-overs triggered by Open Interest shifts as your &#8220;main&#8221;; and finally a Perpetual Contract of Robusta Coffee on EuroNext. Of course these are just examples (I&#8217;ll explain all these type of contracts in a follow-up post). Full functionality can be found <a rel="nofollow" href="http://www.csidata.com/cgi-bin/getManualPage.pl?URL=perpetualcontract(r)charts.htm" target="_blank">here</a>, all Futures coverage can be found <a rel="nofollow" href="http://www.csidata.com/cgi-bin/newspaperwrap.pl?file=/csiweb/ua/FactsheetHtml/cdbfact.htm&amp;fmt=nomenu&amp;title=World%20Futures%20Factsheet" target="_blank">there</a> and finally <a href="https://csidata2.com/cgi-bin/ua_order_form.pl" target="_blank" rel="nofollow">pricing options</a>.</p>
<h3>Export functionality</h3>
<p>For each of these contracts that you add to the Unfair Advantage portfolio, you can define several export formats that will generate specific files ready to be imported to your favourite back-testing tool. There is also an API that allows you to access the data to allow for some automation &#8211; this will definitely prove handy further down the line.</p>
<h3>The User Interface &#8211; screenshots</h3>
<p>Here is what the software looks like:<br />
<img class="alignnone size-full wp-image-92" title="CSI Unfair Advantage Main window" src="http://www.automated-trading-system.com/wp-content/uploads/2009/08/CSI-UnfairAdvantage-1.jpg" alt="CSI Unfair Advantage Main window" width="500" height="298" /><br />
Main window &#8211; the portfolio on the left-hand side contains all contracts you would want to follow while the right-hand side displays the current contract as a chart.</p>
<p><img class="alignnone size-full wp-image-93" title="CSI Unfair Advantage Contract Selection Window" src="http://www.automated-trading-system.com/wp-content/uploads/2009/08/CSI-UnfairAdvantage-2.jpg" alt="CSI Unfair Advantage Contract Selection Window" width="500" height="268" /><br />
Contract selection screen: a myriad of options to splice the data.</p>
<h3>In closing</h3>
<p>I feel pretty satisfied with what I got and eager to dig more into the software/data and play with it. The application seems intuitive enough and if CSI are as good as their reputation implies, this should increase back-test results quality. Promising&#8230;</p>
<p><strong>Note</strong>: You can receive a <a href="http://www.automated-trading-system.com/csi" target="_blank" rel="nofollow">10% discount on CSI data subscriptions</a> (use coupon code LIBERTY)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.automated-trading-system.com/unfair-advantage-csi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

