

<?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>ShareDigest blog &#187; algo-trading</title>
	<atom:link href="http://blog.sharedigest.com/category/trading/algo-trading/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sharedigest.com</link>
	<description>Trading, software, web and random stuff</description>
	<lastBuildDate>Tue, 06 Jul 2010 11:30:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Algo-Trading 101 Part 2: Backtesting</title>
		<link>http://blog.sharedigest.com/algo-trading-101-part-2-backtesting/</link>
		<comments>http://blog.sharedigest.com/algo-trading-101-part-2-backtesting/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 06:35:16 +0000</pubDate>
		<dc:creator>SD</dc:creator>
				<category><![CDATA[algo-trading]]></category>
		<category><![CDATA[algorithmic trading]]></category>
		<category><![CDATA[automated trading]]></category>
		<category><![CDATA[system trading]]></category>
		<category><![CDATA[trading equities]]></category>

		<guid isPermaLink="false">http://blog.sharedigest.com/?p=16</guid>
		<description><![CDATA[


One of the great benefits of quantitative trading models is that they can be backtested against historical price data to measure past performance. A great excercise is to find a strategy that you&#8217;re interested in (published somewhere, for example Futures &#38; Options Trader magazine) and perform the backtest yourself. You should get the same results [...]]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td width="50%">
One of the great benefits of quantitative trading models is that they can be backtested against historical price data to measure past performance. A great excercise is to find a strategy that you&#8217;re interested in (published somewhere, for example Futures &amp; Options Trader magazine) and perform the backtest yourself. You should get the same results as the they did &#8211; this will ensure that you understand the strategy correctly and have avoided common pitfalls.</p>
</td>
<td width="50%">
<div align="right">
<script type="text/javascript"><!--
google_ad_client = "pub-1739519678603459";
/* SDblog_300_250, created 9/24/09 */
google_ad_slot = "6287581496";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</td>
</tr>
</table>
<p><strong>Historical Data</strong></p>
<p>There are numerous sites offering various levels of quality historical stock price data. Below you can find some common sources of free historical data. Google is also your friend here, there&#8217;s lots of datasources out there.</p>
<p>Our aim will be to minimize costs</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.sharedigest.com/algo-trading-101-part-1-getting-started/" rel="bookmark">Algo-Trading 101 Part 1: Getting Started</a></li><li><a href="http://blog.sharedigest.com/options-5-why-trade-options/" rel="bookmark">Options 5: Why Trade Options?</a></li><li><a href="http://blog.sharedigest.com/cfd-basics/" rel="bookmark">CFD Basics</a></li><li><a href="http://blog.sharedigest.com/futures-1-basics/" rel="bookmark">Futures 1: Basics</a></li><li><a href="http://blog.sharedigest.com/cfds-2-margin-trading/" rel="bookmark">CFDs 2: Margin Trading</a></li></ul></div><hr /><h2>Related posts:</h2><ul><li><a href="http://blog.sharedigest.com/algo-trading-101-part-1-getting-started/" rel="bookmark" title="Permanent Link: Algo-Trading 101 Part 1: Getting Started">Algo-Trading 101 Part 1: Getting Started</a></li><li><a href="http://blog.sharedigest.com/australian-market-news-thursday-march-11/" rel="bookmark" title="Permanent Link: Thursday, March 11">Thursday, March 11</a></li><li><a href="http://blog.sharedigest.com/system-trading/" rel="bookmark" title="Permanent Link: System Trading">System Trading</a></li><li><a href="http://blog.sharedigest.com/marketnews/" rel="bookmark" title="Permanent Link: Tuesday, December 22">Tuesday, December 22</a></li><li><a href="http://blog.sharedigest.com/australian-market-news-monday-march-15/" rel="bookmark" title="Permanent Link: Monday, March 15">Monday, March 15</a></li></ul><hr /><small>Copyright &copy; 2008<br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:<br /> )</small>]]></content:encoded>
			<wfw:commentRss>http://blog.sharedigest.com/algo-trading-101-part-2-backtesting/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Algo-Trading 101 Part 1: Getting Started</title>
		<link>http://blog.sharedigest.com/algo-trading-101-part-1-getting-started/</link>
		<comments>http://blog.sharedigest.com/algo-trading-101-part-1-getting-started/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 02:39:52 +0000</pubDate>
		<dc:creator>SD</dc:creator>
				<category><![CDATA[algo-trading]]></category>
		<category><![CDATA[algorithmic trading]]></category>
		<category><![CDATA[automated trading]]></category>
		<category><![CDATA[system trading]]></category>
		<category><![CDATA[trading equities]]></category>

		<guid isPermaLink="false">http://blog.sharedigest.com/algo-trading-101-part-1-getting-started/</guid>
		<description><![CDATA[So you want to get started in algo-trading huh? While the start of an algo-trading operation may seem like a daunting task, it can be possible to beat the institutional traders at their own game (or at least share in the profits), have fun and learn an immense about trading the markets autonomously in the [...]]]></description>
			<content:encoded><![CDATA[<p>So you want to get started in algo-trading huh? While the start of an algo-trading operation may seem like a daunting task, it can be possible to beat the institutional traders at their own game (or at least share in the profits), have fun and learn an immense about trading the markets autonomously in the process. That is what this post will be about, searching for quantitative strategies and a systematic approach to starting an algorithmic trading operation.</p>
<p>What this post will aim to do is explore the journey of the trading business startup, from finding a viable trading strategy, backtesting it for verification on historical performance, setting up the tech-infrastructure (low-cost!) and building and deploying an automated trading system (ATS) to execute your strategy.</p>
<table>
<tr>
<td width="50%">
If, like me, you prefer using Linux (personally I&#8217;m a fan of the Kubuntu Hardy Heron flavor), you will need to install a virtual machine such as vmware to run a copy of Windows. While OpenOffice is a great solution, from personal experience I have found that Excel really is the best solution when it comes to complex spreadsheets involving macros. If you&#8217;re a die-hard OpenOffice Calc fan, go ahead and try it&#8217;s macro language but be warned, its not pretty (and not compatible with Visual Basic).
</td>
<td width="50%">
<div align="right">
<!--adsense#SDblog_300_250-->
</div>
</td>
</tr>
</table>
<p>Other than that we&#8217;ll be looking at using Matlab or using its cheaper alternative, R for the backtesting of some quantitative trading strategies.</p>
<p>Being proficient at basic stats and basic programming will definitely help, but you won&#8217;t need a PhD to put the theories into practice. Strategies will mostly be of the quantitative nature e.g. statistical arbitrage, and the aim is to keep things simple for now. StatArb deals with the simplest financial instruments: stocks, futures and sometimes currencies.</p>
<p>Let&#8217;s look at the process of developing a successful trading strategies and putting it into action!</p>
<p><strong>Finding A Quantitative Strategy That Works (And Suits You!)</strong></p>
<p>Unlike popular opinion would suggest, many strategies are publicly available and while they may not be super-profitable can be tweaked to become profitable.</p>
<p>The key is to backtest strategies for historical performance, thereby verifying that they represent a sound hypothesis. While this alone does not guarantee a profitable strategy, it is certainly a very good indication on the future success of a strategy.</p>
<p>Key things to consider when deciding on a suitable strategy are:</p>
<ul>
<li>Available time:  If you&#8217;re working full time and only able to trade part time, you probably don&#8217;t want to trade intraday strategies but rather stick to ones that trade overnight.  Quantitative trading lends itself well to automation in this regard, since the computer can handle most things automatically, if set up correctly.</li>
<li> How programmatically inclined you are: Knowing some languages like Java, C# or C++ will definitely be a huge plus when it comes to algo-trading (after all its not called &#8216;algorithmic trading&#8217; for nothing &#8211; trading algorithms are just computer programs firing off buy and sell orders to the markets.</li>
<li>Trading capital: Depending on your level of available capital, you may not be in a position to trading algos in the first place.  Your capital will determine alot of things such as what type of accounts you&#8217;ll be setting up, brokerage discounts (based on volume traded), etc, etc. Generally, the more you have to begin trading with, the better.</li>
<li>Does it have a high Sharpe ratio?</li>
<li>Does it outperform a benchmark? (Say the ASX/S&amp;P200 Index)</li>
<li>Does it have small enough drawdown and short enough drawdown duration?</li>
<li>Does the strategy&#8217;s historical performance start declining towards the more recent years compared to that of the earlier years?</li>
</ul>
<table>
<tr>
<td align="center">
<div align="right">
<!--adsense#SDblog_300_250-->
</div>
</td>
</tr>
</table>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.sharedigest.com/algo-trading-101-part-2-backtesting/" rel="bookmark">Algo-Trading 101 Part 2: Backtesting</a></li><li><a href="http://blog.sharedigest.com/cfd-basics/" rel="bookmark">CFD Basics</a></li><li><a href="http://blog.sharedigest.com/system-trading/" rel="bookmark">System Trading</a></li><li><a href="http://blog.sharedigest.com/options-5-why-trade-options/" rel="bookmark">Options 5: Why Trade Options?</a></li><li><a href="http://blog.sharedigest.com/futures-1-basics/" rel="bookmark">Futures 1: Basics</a></li></ul></div><hr /><h2>Related posts:</h2><ul><li><a href="http://blog.sharedigest.com/algo-trading-101-part-2-backtesting/" rel="bookmark" title="Permanent Link: Algo-Trading 101 Part 2: Backtesting">Algo-Trading 101 Part 2: Backtesting</a></li><li><a href="http://blog.sharedigest.com/australian-market-news-thursday-march-11/" rel="bookmark" title="Permanent Link: Thursday, March 11">Thursday, March 11</a></li><li><a href="http://blog.sharedigest.com/australian-market-news-wednesday-march-17/" rel="bookmark" title="Permanent Link: Australian Market &#8211; Wednesday, March 17">Australian Market &#8211; Wednesday, March 17</a></li><li><a href="http://blog.sharedigest.com/marketnews/" rel="bookmark" title="Permanent Link: Tuesday, December 22">Tuesday, December 22</a></li><li><a href="http://blog.sharedigest.com/australian-market-news-monday-march-15/" rel="bookmark" title="Permanent Link: Monday, March 15">Monday, March 15</a></li></ul><hr /><small>Copyright &copy; 2008<br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:<br /> )</small>]]></content:encoded>
			<wfw:commentRss>http://blog.sharedigest.com/algo-trading-101-part-1-getting-started/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>System Trading</title>
		<link>http://blog.sharedigest.com/system-trading/</link>
		<comments>http://blog.sharedigest.com/system-trading/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 02:32:23 +0000</pubDate>
		<dc:creator>SD</dc:creator>
				<category><![CDATA[algo-trading]]></category>
		<category><![CDATA[algorithmic trading]]></category>
		<category><![CDATA[automated trading]]></category>
		<category><![CDATA[system trading]]></category>
		<category><![CDATA[trading equities]]></category>

		<guid isPermaLink="false">http://blog.sharedigest.com/system-trading/</guid>
		<description><![CDATA[ Its All About The Odds&#8230;
Las Vegas. Great food, show girls, and a multi-billion dollar gambling
business. The money made by the casinos is only matched by the profits
on Wall Street. And the profits of both are based on mathematical probabilities.



Casinos make money because “the odds” or a game’s
expectancy are in the house‘s favor. This means [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong> Its All About The Odds&#8230;</strong></em></p>
<p>Las Vegas. Great food, show girls, and a multi-billion dollar gambling<br />
business. The money made by the casinos is only matched by the profits<br />
on Wall Street. And the profits of both are based on mathematical probabilities.</p>
<table>
<tr>
<td width="50%">
Casinos make money because “the odds” or a game’s<br />
expectancy are in the house‘s favor. This means that if you play<br />
long enough, the casino wins. Over the short term, the casino knows<br />
it may win or lose. But if you play long enough, the house always wins.<br />
The casinos increase their profits by offering games that are completed<br />
in a short period of time – a roll of dice, a spin of a wheel<br />
or a few cards turned over.</p>
</td>
<td width="50%">
<div align="right">
<!--adsense#SDblog_300_250-->
</div>
</td>
</tr>
</table>
<p>What does this have to do with trading systems?</p>
<ul>
<li> We want the odds of a trade to favor us – We want a <strong>positive</strong> expectancy</li>
<li> We want a lot of trades – opportunity</li>
<li> We want turn over so we can compound the profits – holding time.</li>
</ul>
<p>What we as traders must do is become the house. The odds in our trading<br />
must favor us, we need a reasonable number of trades during the year<br />
and the trades must be completed in a reasonable amount of time for<br />
compounding to be effective.</p>
<p>Expectancy is simply the product of your profit percentage per win and<br />
your win rate minus the product of your loss percentage per loss and<br />
your loss rate, or:</p>
<p>Expectancy, E = (Ave. Win Size * % Wins) – (Ave. Lose Size * %<br />
Losers)</p>
<p>For example, if we have the results of backtesting a <strong>purely<br />
technical</strong> system, with the following results:</p>
<ul>
<li>Win percentage 6%</li>
<li>Win rate 60%</li>
<li>Loss percentage 4%</li>
<li>Loss rate 40%</li>
</ul>
<p>The expectancy is 2.0% per trade, or (6% x 60%) &#8211; (4% x 40%).</p>
<p>That means, on an average trade, 2% of the money traded is yours to<br />
keep. That’s better odds than a casino gets on blackjack. Now,<br />
that may not sound like a lot of money. If your average trade is $10,000<br />
– 2% is $200 profit per trade. If you have 300 trades per year,<br />
then you have a $60,000 profit per year with an average trade of only<br />
$10,000. This does not even include the profits if you <strong>compounded</strong><br />
the average trade.</p>
<p>If you explore the expectancy formula, you will notice that there is<br />
no one set of numbers that could give a positive expectancy but an infinite<br />
number of sets and therefore an infinite number of trading systems that<br />
could be profitable.</p>
<p>Given that, it is possible to develop systems where the stop-loss is<br />
larger than the profits. The stop-loss is academic, as long as your<br />
profit expectancy is positive.</p>
<p>Here’s another example: we could use a 20% stop loss and a 5%<br />
profit target and come out with the same exact 2% expectancy as long<br />
as my win rate is high enough! An 88% win rate in this example would<br />
yield 2.0%, the result of (5% x 88%) &#8211; (20% x 12%).</p>
<p>Or, you could arrive at a positive expectancy with a very low win rate.<br />
One of the more famous expectancy numbers comes from William O’Neil,<br />
advocate of the CANSLIM system and founder of Investors Business Daily.<br />
If we use his stop and target numbers of 8% and 20% and his published<br />
win rate of 30%, the expectancy can be calculated to be: (20% x 30%)<br />
- (8% x 70%) or +0.4%.</p>
<p>The bottom line is: expectancy must be positive if you want to make<br />
a profit over time. Never use a system with a zero or negative expectancy.<br />
You will not win. You cannot beat the house over a long series of bets<br />
or trades. Be the “House”.</p>
<p>No matter what your expectancy is, you will not make a great deal of<br />
money unless you have a lot of opportunities to trade. Again, the casino<br />
analogy. The casino may only make 1-2% per hand of blackjack, but they<br />
turn over those hands very quickly – 30 to 40 hands per hour.<br />
Play blackjack long enough and you will lose over 40% of your money<br />
per hour! No wonder they can offer those wonderful comps.</p>
<table>
<tr>
<td width="50%">
<p>We now know how to create a method, at least on paper, with a positive<br />
expectancy. Let’s say we develop a system with 8% expectancy,<br />
but if the system only yielded one trade per year, what good would it<br />
be? We might as well just put the money in a savings account. Or, if<br />
we had a method that yielded 0.2% per trade, you might pass on it? But<br />
what if that system generated 1,000 trades per year? 1,000 times 0.2%<br />
becomes serious money in a very short time.</p>
</td>
<td width="50%">
<div align="right">
<!--adsense#SDblog_300_250-->
</div>
</td>
</tr>
</table>
<p>The most overlooked area of trading is the &#8220;<strong>holding period</strong>.&#8221;<br />
In order to make money, you must have a system that generates a positive<br />
expectancy and a lot of opportunities. <em>But you must have access<br />
to your money</em>. If your trade’s hold time is too long, you<br />
can&#8217;t take advantage of all or even most of your opportunities. Your<br />
trading money or buying power is always tied up because you have to<br />
wait too long to close your trades.</p>
<p>Casino analogy time. If the house odds in Blackjack are 2.5%, that means<br />
for ever $2 bet, the casino makes, on average, 5 cents. If you only<br />
play 1 game per hour, the casino makes 5 cents per hour. If you play<br />
60 games per hour, the casino has all of your $2 in 40 minutes. All<br />
things being equal, the game with the fastest turnover is the more profitable<br />
for the casino.</p>
<p>It&#8217;s no different with trading. You will be more profitable with $100,000<br />
that you could &#8220;turn&#8221; 250 times per year, than $500,000 that<br />
was tied up in one trade for 12 months. As an example, let&#8217;s say we<br />
have one trade and that trade yielded a 50% return. You just had a great<br />
year &#8211; a $250,000 profit.</p>
<p>On the other hand, say you had $100,000 for stock purchases, and your<br />
expectancy was only 1.2% per trade but you turned over your stocks 250<br />
times in the same year. This method ends up generating $300,000 for<br />
the year, and that assumes you never increase the position size as the<br />
equity grows. You just had a better year. And it is easier to get 1.2%<br />
per trade than 50%.</p>
<p>The bottom line for a great bottom line is:</p>
<ul>
<li>A positive expectancy</li>
<li>A good number of trades</li>
<li>A short holding period</li>
</ul>
<div align="center"><!--adsense#SDblog_300_250--></div>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.sharedigest.com/cfds-2-margin-trading/" rel="bookmark">CFDs 2: Margin Trading</a></li><li><a href="http://blog.sharedigest.com/cfd-basics/" rel="bookmark">CFD Basics</a></li><li><a href="http://blog.sharedigest.com/options-5-why-trade-options/" rel="bookmark">Options 5: Why Trade Options?</a></li><li><a href="http://blog.sharedigest.com/algo-trading-101-part-1-getting-started/" rel="bookmark">Algo-Trading 101 Part 1: Getting Started</a></li><li><a href="http://blog.sharedigest.com/futures-1-basics/" rel="bookmark">Futures 1: Basics</a></li></ul></div><hr /><h2>Related posts:</h2><ul><li><a href="http://blog.sharedigest.com/algo-trading-101-part-1-getting-started/" rel="bookmark" title="Permanent Link: Algo-Trading 101 Part 1: Getting Started">Algo-Trading 101 Part 1: Getting Started</a></li><li><a href="http://blog.sharedigest.com/algo-trading-101-part-2-backtesting/" rel="bookmark" title="Permanent Link: Algo-Trading 101 Part 2: Backtesting">Algo-Trading 101 Part 2: Backtesting</a></li><li><a href="http://blog.sharedigest.com/handy-linux-commands/" rel="bookmark" title="Permanent Link: Handy Linux Commands">Handy Linux Commands</a></li><li><a href="http://blog.sharedigest.com/cfd-basics/" rel="bookmark" title="Permanent Link: CFD Basics">CFD Basics</a></li><li><a href="http://blog.sharedigest.com/options-5-why-trade-options/" rel="bookmark" title="Permanent Link: Options 5: Why Trade Options?">Options 5: Why Trade Options?</a></li></ul><hr /><small>Copyright &copy; 2008<br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:<br /> )</small>]]></content:encoded>
			<wfw:commentRss>http://blog.sharedigest.com/system-trading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

