<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-35364652</id><updated>2012-02-03T07:58:15.689-05:00</updated><title type='text'>Quantitative Trading</title><subtitle type='html'>Quantitative investment and trading ideas, research, and analysis.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default?start-index=101&amp;max-results=100'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>167</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-35364652.post-785550411785053767</id><published>2012-01-30T12:34:00.000-05:00</published><updated>2012-01-30T12:34:59.587-05:00</updated><title type='text'>What worked in 2011?</title><content type='html'>We all know that 2011 was a bad year for many hedge funds, with the average fund &lt;a href="http://online.wsj.com/article/SB10001424052970203806504577180941947811200.html" target="_blank"&gt;down 5%&lt;/a&gt;. But what type of strategies did well, and what did particularly poorly? The numbers are out: Forex funds lose more than average, down 6%. In fact, 71 out of 77 Forex funds tracked by a Citigroup currency analyst were down in 2011. And the winners are? Statarb funds, with a &lt;a href="http://www.bloomberg.com/news/2012-01-10/chase-coleman-channels-ancestor-stuyvesant-with-45-robertson-like-return.html" target="_blank"&gt;5% averge return&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This superior performance of statarb funds is quite a contrast from the last financial crisis 2007-9. Then, most of the big factor-driven statarb models &lt;a href="http://epchan.blogspot.com/2007/08/readers-comment-on-quant-funds-losses.html" target="_blank"&gt;failed miserably&lt;/a&gt;. What caused this difference? Is it because the risk management techniques of big funds have improved? Or maybe that's because in 2011, the deviation from factor returns mean-revert within a few days, so those statarb models that re-balance on a daily basis can benefit from the buying/selling opportunity at steep discount/premium?&lt;br /&gt;&lt;br /&gt;To settle this question, let me report the 2011 backtest results (without transaction costs) of running &lt;a href="http://epchan.blogspot.com/2007/10/how-mean-reversion-strategy-performed.html" target="_blank"&gt;Andrew Lo&lt;/a&gt;'s prototype mean-reversion model : ranking stocks based on their previous day's returns, shorting the top decile and buying the bottom one, rebalancing only at the close. (Click on chart to make it larger.)&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-tmaUlu6Ogws/TybQYIKmbgI/AAAAAAAAA3s/0PstYNXICoA/s1600/andrewLo2011.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="280" src="http://2.bp.blogspot.com/-tmaUlu6Ogws/TybQYIKmbgI/AAAAAAAAA3s/0PstYNXICoA/s400/andrewLo2011.bmp" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;The APR in 2011 was 18.6%. Note in particular its performance since the crisis began officially on 20110808: despite a steep drawdown, the overall performance was spectacular! Clearly, high volatility benefited a prototypical statarb strategy, and the out-performance has not much to do with improved risk management.&lt;br /&gt;&lt;br /&gt;You might wonder what would happen if we had used the intraday version of this strategy instead: enter all positions at the open, and exit them all at the close? I tried it: the performance is surprisingly similar to the interday strategy. So intraday vs. interday volatility or mean-reversion does not seem to play a part in last year's equities market. Contrasting this with the performance of Forex models, it is clear that high volatilities benefited statarb models while they hurt FX models.&lt;br /&gt;&lt;br /&gt;In the next article or two, I will explore the 2011 performance of some other equities mean-reverting models that I used to trade. But what about your models? If you have some thoughts on what worked and what didn't in 2011, please share them with us in the comments section.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-785550411785053767?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/785550411785053767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=785550411785053767' title='25 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/785550411785053767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/785550411785053767'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2012/01/what-worked-in-2011.html' title='What worked in 2011?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-tmaUlu6Ogws/TybQYIKmbgI/AAAAAAAAA3s/0PstYNXICoA/s72-c/andrewLo2011.bmp' height='72' width='72'/><thr:total>25</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-8917675394690276478</id><published>2011-12-27T09:32:00.000-05:00</published><updated>2011-12-27T09:32:29.153-05:00</updated><title type='text'>Risk indicators</title><content type='html'>During the financial crisis of 2008, I &lt;a href="http://epchan.blogspot.com/2008/10/how-does-financial-crisis-affect.html" target="_blank"&gt;wrote about&lt;/a&gt; how I watched some risk indicators such as the &lt;a href="http://finance.yahoo.com/q?s=^VIX" target="_blank"&gt;VIX&lt;/a&gt; or the &lt;a href="http://www.bloomberg.com/apps/quote?ticker=.TEDSP:IND" target="_blank"&gt;TED spread&lt;/a&gt;&lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;span style="background-color: white; line-height: 19px;"&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;to decide what leverage I should &lt;/span&gt;&lt;span style="font-family: inherit;"&gt;use for my trading strategies. It turns out that this procedure is just as critical for the current crisis that &lt;span style="font-family: inherit;"&gt;began&lt;/span&gt; in August 2011. In fact, more than leverage-determinants, they can be used as the all-important variable that determines whether a certain strategy should be run at all. (What's the point of running a model that you think will lose money with low leverage?)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; font-family: inherit; line-height: 19px;"&gt;T&lt;/span&gt;&lt;span style="background-color: white; font-family: inherit; line-height: 19px;"&gt;here are now more than a few of these risk indicators to pick from. Besides the VIX and the TED, there are the&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: white; color: #25241e; font-family: inherit; font-size: 15px;"&gt;&lt;a href="http://www.stoxx.com/indices/index_information.html?symbol=V2TX" target="_blank"&gt;VSTOXX&lt;/a&gt; (EURO STOXX 50 Volatility&lt;/span&gt;&lt;span style="background-color: white; color: #25241e; font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;),&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: white; color: #25241e; font-family: inherit; font-size: 15px;"&gt;the &lt;a href="http://www.bloomberg.com/apps/quote?ticker=JPMVXYG7:IND" target="_blank"&gt;VXY&lt;/a&gt; &lt;/span&gt;&lt;span style="background-color: white; color: #25241e; font-family: inherit; font-size: 15px;"&gt;(&lt;/span&gt;&lt;span style="background-color: white; color: #222222; font-family: inherit; line-height: 16px;"&gt;&lt;span style="font-family: inherit; font-size: small;"&gt;JPMorgan G7 Volatility Index), the &lt;a href="http://www.bloomberg.com/apps/quote?ticker=JPMVXYEM:IND" target="_blank"&gt;EM-VXY&lt;/a&gt; (JPMorgan Emerging Market Volatility Index), the ETF's&amp;nbsp;&lt;a href="http://finance.yahoo.com/q?s=ONN" target="_blank"&gt;ONN&lt;/a&gt;&amp;nbsp;and &lt;a href="http://finance.yahoo.com/q?s=OFF&amp;amp;ql=1" target="_blank"&gt;OFF&lt;/a&gt;, and probably many more that I haven't heard of yet.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;&lt;span style="background-color: white; line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="line-height: 19px;"&gt;A lot of academic research has been done on whether we can devise "&lt;/span&gt;&lt;a href="http://epchan.blogspot.com/2008/05/machine-learning-regime-switching.html" style="line-height: 19px;" target="_blank"&gt;regime switching&lt;/a&gt;&lt;span style="line-height: 19px;"&gt;" models based on some complicated pattern-recognition algorithms to decide whether a market is in a certain "regime" which favors this or that particular model or parameter set. And often, these regime switching models rely on the recognition of some complicated set of patterns in the historical price series. Sorry to say, I have not found any of these complex regime switching model to have any real out-of-sample predictive power. On the other hand, my research shows that some of the aforementioned simple risk indicators will indeed prevent some trading models from falling off the cliff.&lt;/span&gt;&lt;br /&gt;&lt;span style="line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="line-height: 19px;"&gt;But which of these indicators are applicable to which model? This is not so obvious. For example, you might think that the EM-VXY would be an ideal leading indicator for Forex trading models that involve emerging market currencies, but I have found that it is only a contemporaneous (and thus useless) indicator to mine. Another example, I said during the 2008 financial crisis that VIX seems to be a useless contemporaneous indicator for equities trading models, but strangely, it is a good leading indicator for FX models. In contrast, the TED spread that everyone were obsessed about in 2008 shot up to over 300 bps then, but never went beyond 100 bps this time around. So really only rigorous backtesting can guide us here.&lt;/span&gt;&lt;br /&gt;&lt;span style="line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="line-height: 19px;"&gt;What risk indicators do you use? And have you really backtested their efficacies? Your comments would be very welcome here.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-8917675394690276478?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/8917675394690276478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=8917675394690276478' title='19 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8917675394690276478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8917675394690276478'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2011/12/risk-indicators.html' title='Risk indicators'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>19</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-860618627764654049</id><published>2011-11-11T08:31:00.000-05:00</published><updated>2011-11-11T08:31:13.563-05:00</updated><title type='text'>Trading platform and EC2 revisited</title><content type='html'>Recently I opened a&amp;nbsp;&lt;a href="http://epchan.blogspot.com/2011/09/more-on-automated-trading-platforms.html"&gt;discussion&lt;/a&gt; on the various software platforms which allow the programmers among us to build trading strategies easily. Here is one other addition: &lt;a href="http://www.quantopian.com/"&gt;Quantopian&lt;/a&gt;. It is only in alpha stage, but I did get a preview of its features:&lt;br /&gt;&lt;br /&gt;1) You can code in Python, which is an easier language to learn than Java, but no less powerful. In fact, I know of a superb programmer who uses Python to backtest HF strategies.&lt;br /&gt;&lt;br /&gt;2) It is web-based, which means you can take advantage of collocation on a server much more stable than your own desktops. (For those who worry about the confidentiality of your strategies, the founder indicated to me that they can run an image of the software on an Amazon EC2 account that you owned so they won't have access to your codes. As for the confidentiality of codes residing on EC2 itself, please see below*.)&lt;br /&gt;&lt;br /&gt;3) It is event-driven (or for those who like the latest jargon: CEP-enabled), like all the Java API's that I discussed in the previous article.&lt;br /&gt;&lt;br /&gt;4) They have 1-min US equities data for backtesting. Tick-level data will be available soon.&lt;br /&gt;&lt;br /&gt;5) Toolboxes for common technical indicators, mathematical algorithms, etc. will be available soon.&lt;br /&gt;&lt;br /&gt;6) They will run a competition for trading models which makes it easier for independent traders to become trading&amp;nbsp;advisers&amp;nbsp;to others, or to raise money for their own funds.&lt;br /&gt;&lt;br /&gt;Unfortunately, live walk-forward testing is not yet available.&lt;br /&gt;&lt;br /&gt;* Some readers have wondered whether it is safe to run their trading models on Amazon's EC2. Won't Amazon's employees have access to their wildly profitable strategies? The answer is no: Amazon's &lt;a href="http://media.amazonwebservices.com/pdf/AWS_Security_Whitepaper.pdf"&gt;security policy&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: white; font-family: verdana, helvetica, sans-serif;"&gt;&lt;b&gt;Guest Operating System: Virtual instances are completely controlled by the customer. Customers have full root access&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div style="background-color: white; font-family: verdana, helvetica, sans-serif;"&gt;&lt;b&gt;or administrative control over accounts, services, and applications. AWS does not have any access rights to customer&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div style="background-color: white; font-family: verdana, helvetica, sans-serif;"&gt;&lt;b&gt;instances and cannot log into the guest OS....&lt;/b&gt;&lt;/div&gt;&lt;div style="background-color: white; font-family: verdana, helvetica, sans-serif; font-size: 13px;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: white;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Thanks to a reader OL from France who provided me with this info. He also told me that:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: white; font-family: verdana, helvetica, sans-serif; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: white; font-family: verdana, helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman';"&gt;"&lt;/span&gt;So, I finally deployed my momentum strategy on a Linux instance of EC2 (which is free btw).&lt;/div&gt;&lt;div style="background-color: white; font-family: verdana, helvetica, sans-serif;"&gt;I wrote it based on the java demo application provided by Interactive Brokers and some parts of Algoquant.&lt;/div&gt;&lt;div style="background-color: white; font-family: verdana, helvetica, sans-serif;"&gt;So far, I use a European instance of EC2 which alas doesn't have the best latency to IB US servers (90 ms) but still better than my bedroom connection.&amp;nbsp;&lt;/div&gt;&lt;div style="background-color: white; font-family: verdana, helvetica, sans-serif;"&gt;A test ping from a US instance to IB US servers results in only 15 ms ..."&lt;/div&gt;&lt;div style="background-color: white; font-family: verdana, helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white; font-family: verdana, helvetica, sans-serif;"&gt;So there you go: Java+Algoquant+IB+EC2=profit.&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: xx-small;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-860618627764654049?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/860618627764654049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=860618627764654049' title='52 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/860618627764654049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/860618627764654049'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2011/11/trading-platform-and-ec2-revisited.html' title='Trading platform and EC2 revisited'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>52</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-6061194021576415109</id><published>2011-09-30T12:22:00.000-04:00</published><updated>2011-09-30T12:22:30.864-04:00</updated><title type='text'>Stop loss, profit cap, survivorship bias, and black swans</title><content type='html'>I have long espoused the view that we should not impose stop-losses on mean-reverting strategies, nor profit caps on momentum strategies. My view on the latter has not changed, but it has evolved on the former.&lt;br /&gt;&lt;br /&gt;My original reason for opposing stop-losses on mean-reverting strategy is this. Say you believe your specific price series is mean-reverting, and say you have entered into a long position when the price is low. Now, however, the price gets much lower, and you are suffering a large unrealized loss. Well, based on your mean-reverting belief, you should buy more instead of liquidating! Indeed, if you backtest the effect of stop-losses on mean-reverting strategies, you will almost inevitably find that they decrease the overall returns and even Sharpe ratios.&lt;br /&gt;&lt;br /&gt;But what this simplistic view ignored is 1) survivorship bias, and 2) black swan events. (Hat tip: Ben, who prompted me to consider these two issues.)&lt;br /&gt;&lt;br /&gt;1) We normally would only trade those price series with a mean-reverting strategy only if we see that the prices did eventually revert. No one would bother to trade those price series that used to mean-revert, but suddenly stopped doing so. But saying that stop-losses are harmful to mean-reverting strategies is ignoring the fact that some mean-reverting will stop working altogether and would not survive our strategies selection process.&lt;br /&gt;&lt;br /&gt;2) Let's define black swan events as those that did not occur in your backtest period. For example, let's say you never had a loss of 20% in a single day. So if you backtest a stop-loss of 20%, it will have no effect whatsoever on your backtest performance. However, no one can say for sure that it won't occur in the future. So if you or your investors simply cannot tolerate a 20% loss, you should impose this as a stop-loss. (After all, your brokerage has already imposed a stop-loss of 100% on you whether you like it or not.)&lt;br /&gt;&lt;br /&gt;We can in fact turn point 2) around when deciding what stop-loss to use: a stop-loss should be loose enough so that it should have no effect on the backtest performance, and of course tight enough so that it will not result in the demise of your trading career.&lt;br /&gt;&lt;br /&gt;There is also the issue of whether to use stop-loss on the intraday drawdown, or to use it on the multiple-day drawdown. I would argue that only intraday stop-loss is important to prevent a black-swan loss. In practice, when a strategy has a string of non-catastrophic losses occurring over multiple days, resulting in a large, unprecedented, drawdown, the trader will typically re-examine the strategy, taking into account this most recent performance and tweak the strategy so that it could theoretically be avoided. This is almost like a multi-day stop-loss strategy, as we stop an old strategy and start a new, modified, one. (Though the modified strategy might still recommend that you keep holding the current position!)&lt;br /&gt;&lt;br /&gt;Now why am I still holding dear to the principle that one should not impose profit-caps on momentum strategies? Why, the possibility of black swan events again! But this time, any black swan can only result in&amp;nbsp;unprecedented&amp;nbsp;one-day &lt;i&gt;gain &lt;/i&gt;instead of loss, since we should&amp;nbsp;&lt;a href="http://epchan.blogspot.com/2009/06/my-interview-stop-loss-and-principle-of.html"&gt;always&lt;/a&gt;&amp;nbsp;have stop-losses on momentum strategies. We certainly don't want to impose a profit-cap to rule out this possibility!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-6061194021576415109?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/6061194021576415109/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=6061194021576415109' title='50 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/6061194021576415109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/6061194021576415109'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2011/09/stop-loss-profit-cap-survivorship-bias.html' title='Stop loss, profit cap, survivorship bias, and black swans'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>50</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-7031446748717729259</id><published>2011-09-18T07:37:00.000-04:00</published><updated>2011-09-18T07:37:30.611-04:00</updated><title type='text'>More on automated trading platforms</title><content type='html'>The ideal software platform for automating backtesting and executing your algorithmic trading strategies depends mainly on your level of programming expertise and your budget. If you are a competent programmer in, say, Java or C#, there is nothing to prevent you from utilizing the API offered (usually for free) by many brokerages to automate execution. And of course, it is also easy for you to write a separate backtesting program utilizing historical data. However, even for programmer-traders, there are a couple of inconveniences in developing these programs from scratch:&lt;br /&gt;&lt;br /&gt;A) Every time we change brokerages, we have to re-write parts of the low-level functions that utilize the brokerage's API;&lt;br /&gt;&lt;br /&gt;B) The automated trading program cannot be used to backtest unless a simulator is built to feed the historical data into the program as if they were live. To reduce bugs, it is better to have the same code that both backtests and trades live.&lt;br /&gt;&lt;br /&gt;This is where a number of open-source algorithmic trading development platforms come in. These platforms all assume that the user is a Java programmer. But they eliminate the hassles A) and B) above as they serve as the layer that shield you from the details of the brokerage's API, and let you go from backtesting to live trading mode with a figurative turn of a key. I have taken a tour of one such platforms &lt;a href="http://www.marketcetera.com/"&gt;Marketcetera&lt;/a&gt;, and will highlight some features here:&lt;br /&gt;&lt;br /&gt;1) It has a trading GUI with features similar to that of IB's TWS. This will be useful if your own brokerage's GUI is&amp;nbsp;dysfunctional.&lt;br /&gt;&lt;br /&gt;2) Complex Event Processing (CEP) is available as a module. CEP is essentially a way for you to easily specify what kind of market/pricing events should trigger a trading action. For e.g., "BUY if ask price is below 20-min moving average." Of course, you could have written this trading rule in a callback function, but to retrieve the 20-min MA on-demand could be quite messy. CEP solves that data retrieval problem for you by storing only those data that is needed by your registered trading rules.&lt;br /&gt;&lt;br /&gt;3) It can use either FIX or a brokerage's API for connection. Available brokerage connectors include Interactive Brokers and Lime Brokerage.&lt;br /&gt;&lt;br /&gt;4) It offers a news feed, which can be used by your trading algorithms to trigger trading actions if you use Java's string processing utilities to parse the stories properly.&lt;br /&gt;&lt;br /&gt;5)&amp;nbsp;The monthly cost ranges from $3,500 - $4,500.&lt;br /&gt;&lt;br /&gt;If Marketcera is beyond your budget, you can check out &lt;a href="http://code.google.com/p/algo-trader/"&gt;AlgoTrader&lt;/a&gt;. It has advantages 1)-3) but not 4) listed above, and is completely free. I invite readers who have tried these or other similar automated trading platforms to comment their user experience here.&lt;br /&gt;&lt;br /&gt;P.S. For those of us who use Matlab to automate our executions, a reader pointed out there is a new product &lt;a href="http://www.agoratron.com/our_products.html"&gt;MATTICK&lt;/a&gt;&amp;nbsp;that allows you to send order via the FIX protocol which should let us trade with a great variety of brokerages.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-7031446748717729259?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/7031446748717729259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=7031446748717729259' title='28 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/7031446748717729259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/7031446748717729259'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2011/09/more-on-automated-trading-platforms.html' title='More on automated trading platforms'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>28</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-7595117820521039966</id><published>2011-07-23T12:52:00.000-04:00</published><updated>2011-07-23T12:52:30.347-04:00</updated><title type='text'>Sorry, your return is too high for us</title><content type='html'>I enjoyed reading Richard Wilson's &lt;a href="http://www.amazon.com/gp/product/0470520639/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;amp;tag=quantitativet-20&amp;amp;linkCode=as2&amp;amp;camp=217145&amp;amp;creative=399377&amp;amp;creativeASIN=0470520639"&gt;The Hedge Fund Book&lt;/a&gt;&amp;nbsp;(Richard also runs the &lt;a href="http://hedgefundblogger.com/"&gt;Hedge Fund Blogger&lt;/a&gt;&amp;nbsp;site). To be clear: it is purely marketing-oriented. It doesn't tell you how to find a successful trading strategy, but its focus is to tell you how to market your fund to investors once you have a successful strategy. To that end, it does a pretty good job in conveying what might be conventional wisdom to seasoned fund managers. (For e.g., don't bother to market to institutional investors if your AUM is less than $100M.) The book is filled with quite engaging interviews with fund managers, fund marketers, and other fund service providers (including our very own administrator Fund Associates). If Scott Patterson's &lt;a href="http://www.amazon.com/gp/product/0307453383/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=quantitativet-20&amp;amp;linkCode=as2&amp;amp;camp=217145&amp;amp;creative=399377&amp;amp;creativeASIN=0307453383"&gt;The Quants&lt;/a&gt;&amp;nbsp;is about the gods of hedge funds, this book is for and about the mortals.&lt;br /&gt;&lt;br /&gt;One paragraph in the book stood out: "I've worked closely on the third-party marketing and capital introduction/prime brokerage side of the business, and I often see both types of firms deny clients service [to funds with high returns and high risk] ... Nobody wants to be associated with a manager aiming at 30 percent a month returns."&lt;br /&gt;&lt;br /&gt;Maybe not &lt;i&gt;aiming at&lt;/i&gt;, but what's wrong with &lt;i&gt;achieving &lt;/i&gt;a 30 percent a month returns? I have actually met institutional investors who don't want to look at a fund that actually achieved double-digit monthly returns. Presumably that's because they believe that a high return automatically implies high risk, and also presumably a high leverage as well. &amp;nbsp;I would argue that there are 2 reasons not to completely dismiss such funds out-of-hand:&lt;br /&gt;&lt;br /&gt;1) Leverage should not be determined arbitrarily, but should be based on the minimum of what's dictated by half-Kelly (see my extensive discussions of Kelly formula on this blog and in my book) and what's dictated by the maximum single-day drawdown seen historically or in VaR simulations. And if this minimum still turns out to be higher than what most institutional investors are comfortable with, one should be bold enough to adopt it in your fund.&lt;br /&gt;&lt;br /&gt;2) As an investor, there is an easy way to control leverage and risk: just apply Constant Proportion Portfolio Insurance (a concept also discussed elsewhere on this blog). For example, if the fund manager tells you the fund employs a constant 10x leverage (as dictated by the risk analysis outlined in 1) and you are only comfortable with 5x leverage, just invest half your capital into the fund, and keep the other half as cash in your bank account! Going forward, if the fund loses money, your effective leverage would have decreased to below 5x. Say you invested $1M into the fund, and kept $1M in the bank. And say the fund lost $0.5M. Your total equity is now $1.5M, and the fund manager is supposed to trade a $0.5M*10=$5M portfolio. Your effective leverage is now only 3.33x, well within your tolerance. Now if instead, the fund made money, you can immediately withdraw some of the profits to keep your effective leverage at 5x. So, say the fund made $0.5M. Your equity is now $2.5M, and the fund manager is supposed to trade a $1.5M*10=$15M portfolio. If you don't withdraw, this would increase your effective leverage to 6x. But if you immediately withdraw $0.25M, then the fund manager will trade a $1.25M*10=$12.5M portfolio, giving you an effective leverage of the desired 5x.&lt;br /&gt;&lt;br /&gt;If you are an investor in hedge funds, please let us know what you think of this scheme in the comments section!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-7595117820521039966?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/7595117820521039966/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=7595117820521039966' title='30 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/7595117820521039966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/7595117820521039966'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2011/07/sorry-your-return-is-too-high-for-us.html' title='Sorry, your return is too high for us'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>30</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-7054341098400875757</id><published>2011-07-18T12:35:00.000-04:00</published><updated>2011-07-18T12:35:23.524-04:00</updated><title type='text'>The social utility of hedge funds</title><content type='html'>There is an &lt;a href="http://www.newyorker.com/reporting/2011/07/25/110725fa_fact_cassidy#ixzz1STONOVrZ"&gt;article&lt;/a&gt; in the New Yorker magazine profiling Bridgewater Associates, the world's biggest global macro hedge fund. Inevitably, we come to the awkward question: "&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif; font-size: 15px;"&gt;If hedge-fund managers are playing a zero-sum game, what is their social utility?"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif; font-size: 15px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif; font-size: 15px;"&gt;I thought about this question a lot in the past, and&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif; font-size: 15px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif; font-size: 15px;"&gt;I used to agree with many others that the social utility of hedge funds, or trading in general, is to provide liquidity to the markets. And a good economic case can be made that the more liquid a market is, the higher the utility it is to all participants. However, based on recent experience of flash crash and other unfortunate mishaps, we find out that traders typically do &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif; font-size: 15px;"&gt;&lt;u&gt;not&lt;/u&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif; font-size: 15px;"&gt; provide liquidity when it is needed most! So this answer becomes quite unsatisfactory.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif; font-size: 15px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif; font-size: 15px;"&gt;In trying to come up with a better reply, I though it is curious that few people asked "What is the purpose of having a Department of Defence?" since wars between nations are typically also zero-sum games, yet we greatly honour those who serve in the armed forces (in contrast to our feelings for hedge fund managers).&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif; font-size: 15px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif; font-size: 15px;"&gt;To me, clearly the answer with the best moral justification is that, in both cases, there is great social utility in defending either your clients' comfortable retirement from financial meltdown (e.g. due to governmental or corporate mismanagement), or in defending your country from foreign aggression. More specifically, the purpose of hedge funds is to reduce &lt;b&gt;long-term&amp;nbsp;volatility &lt;/b&gt;in your clients' net worth. (I would like to say "reduce &lt;i&gt;risks &lt;/i&gt;to your clients' net worth", but that would be a bit too optimistic!)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif; font-size: 15px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif; font-size: 15px;"&gt;I emphasize long-term volatility, because of course trading generates a lot of daily or hourly volatility in your clients' equity. But I do not believe that such short-term volatility affects ones' life goals. On the other hand, a 3-or-more-year drawdown in a typical buy-and-hold portfolio can wreck havoc with many lives.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif; font-size: 15px;"&gt;If one day, the markets become so quiescent that few hedge funds can generate higher Sharpe ratio than a buy-and-hold portfolio (as indeed seems to be the case with the US equities markets these days), then yes, most hedge fund managers should just quit, instead of hogging intellectual resources from our best universities.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-7054341098400875757?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/7054341098400875757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=7054341098400875757' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/7054341098400875757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/7054341098400875757'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2011/07/social-utility-of-hedge-funds.html' title='The social utility of hedge funds'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-6555880069015523039</id><published>2011-07-03T09:21:00.000-04:00</published><updated>2011-07-03T09:21:55.306-04:00</updated><title type='text'>Hedge fund transparency and "barometers"</title><content type='html'>Jim Liew of Alpha Quant Club recently posted an interesting &lt;a href="http://allaboutalpha.com/blog/2011/06/30/hedge-fund-indexes-learn-to-walk-upright-introducing-the-hedge-fund-barometer/"&gt;article&lt;/a&gt; about the increasing demand for transparency of hedge fund strategies by institutional investors, so much so that they are essentially willing to invest only in managed accounts with real-time trades and positions updates. This is, of course, bad for fund managers, since not only can the investor reverse-engineer the simpler strategies from such knowledge, they can also piggy-back on the trades, thus paying a much smaller portion of their profits as performance fee. One might be tempted to think that since the investors are going to reverse-engineer the product anyway, why not just make it as simple and as generic as possible, and charge a much lower fee than the usual 2-20 (which hopefully will attract a much larger investor base), so that the main value to the investor is just convenience and not the originality of the strategy?&lt;br /&gt;&lt;br /&gt;In fact,&amp;nbsp;Jim wants to do just that. He proposes to construct hedge fund "barometers", essentially prototypical hedge fund strategies running in managed accounts. This would work well if these barometers have large enough capacities such that the performance can hold up even when a large number of investors sign up. From the investors' point of view, this is a trade-off between investing in a truly outstanding, high-performance strategy while paying a large fee and losing "transparency", versus just investing in a generic strategy that may still outperform the broad market. For some institutional investors, this might just be the bargain they are looking for.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-6555880069015523039?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/6555880069015523039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=6555880069015523039' title='20 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/6555880069015523039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/6555880069015523039'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2011/07/hedge-fund-transparency-and-barometers.html' title='Hedge fund transparency and &quot;barometers&quot;'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>20</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-2906231668663797558</id><published>2011-06-17T09:53:00.005-04:00</published><updated>2011-06-17T10:35:37.942-04:00</updated><title type='text'>When cointegration of a pair breaks down</title><content type='html'>I have written a lot in the past about the cointegration of ETF pairs, and how this condition can lead to profitable pairs trading. However, as every investment advisor could have told you, past cointegration is no guarantee of future cointegration. Often, cointegration for a pair breaks down for an extended period, maybe as long as a half a year or more. Naturally, trading this pair during this period is a losing proposition, but abandoning such a pair completely is also unsatisfactory, since cointegration often mysteriously returns after a while.&lt;br /&gt;&lt;br /&gt;A case in point is the ETF pair &lt;a href="http://epchan.blogspot.com/2006/11/gold-vs-gold-miners-another-arbitrage.html"&gt;GLD-GDX&lt;/a&gt;. When I first tested it in 2006, it was an excellent candidate for pair trading, and I not only traded it in my personal portfolio, but we traded it in our fund too. Unfortunately, it went haywire in 2008. We promptly abandoned it, only to see the strategy recovered sharply in 2007.&lt;br /&gt;&lt;br /&gt;So the big question is: how do we know whether the loss of cointegration is temporary, and how do we know when to resume trading a pair?&lt;br /&gt;&lt;br /&gt;To answer the first question, it is often necessary to go beyond the technicals, and delve into the fundamentals of pair. Take GLD-GDX as the example. When I taught my pairs trading workshop in South Africa, several &amp;nbsp;portfolio managers in attendance told me that there are 2 reasons why gold spot price diverged from gold miners' stock prices. Firstly, due to the sharp increase in oil prices during the first half of 2008, it costs the gold miners a lot more in energy to extract the gold from the ground, hence the gold miners' income lags behind the rise in gold prices. Secondly, many gold miners hedge their exposure to fluctuating gold prices with derivatives. Hence when gold price rise beyond a certain limit, the gold miners cease to benefit from this rise. Recently, the Economist magazine published an &lt;a href="http://www.economist.com/node/18774624"&gt;article&lt;/a&gt; that essentially confirms this view. But further confirmation can be gained by introducing oil (future) price into the cointegration equation. If you do that, and if you trade this triplet of GLD-GDX-USO, you will find that it is profitable throughout the entire period from 2006-2010. If you find trading a triplet too complicated, you can at least backtest a trading filter such that you will cease to trade GLD-GDX whenever USO goes beyond (above, and maybe below too) a certain band. If you have done all these backtests, you will have a plan in place to tell you when to resume trading this pair. But even if you haven't done this backtest, and you find that you need to stop trading a pair because of cumulating losses, you should at least continue &lt;i&gt;paper &lt;/i&gt;trading it to see when it is turning around!&lt;br /&gt;&lt;br /&gt;(By the way, if you think trading ETF pairs offers too low returns due to the low leverage allowed, consider the single stock futures on ETF's trading on the OneChicago exchange. Certainly the future on GDX is available there, while you might just trade the futures GC and CL directly on CME. There is, of course, the usual caveat that applies to futures pairs trading: the switch from contango to backwardation and vice versa can ruin many a pairs-trading strategy, even if the spot prices remain cointegrating. But that's a story for another time.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-2906231668663797558?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/2906231668663797558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=2906231668663797558' title='64 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/2906231668663797558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/2906231668663797558'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2011/06/when-cointegration-of-pair-breaks-down.html' title='When cointegration of a pair breaks down'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>64</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-3285163410460162756</id><published>2011-06-02T11:05:00.000-04:00</published><updated>2011-06-02T11:05:40.126-04:00</updated><title type='text'>Even more on news driven trading</title><content type='html'>News driven trading is even more in vogue today than when I last &lt;a href="http://epchan.blogspot.com/2007/07/more-on-news-driven-trading.html"&gt;mentioned&lt;/a&gt; it, judging from the increasing number of vendors (e.g. Ravenpack, Sensobeat, Recorded Future, etc.) and researchers pitching their wares. Not only are traditional financial and economic news deemed important, but researchers have found even blog posts (at least those on &lt;a href="http://seekingalpha.com/article/263429-seeking-alpha-as-a-predictor-of-stock-movements-and-earnings-surprises"&gt;Seeking Alpha&lt;/a&gt;) and &lt;a href="http://www.finalternatives.com/node/16666"&gt;Twitter&lt;/a&gt;&amp;nbsp;(Hat tip: Satya and William) to be predictive of stock prices.&lt;br /&gt;&lt;br /&gt;One key ingredient to success in this type of trading is of course the ability to gain access to breaking news ahead of other traders. On the macroeconomic news front, the MIT Billion Prices project has spun off a company called PriceStats to deliver daily consumer product price index to subscribers. PriceStats compiles this index by continuously scanning online retailers' websites, and hopefully provides a preview of the official CPI numbers. Whether this is useful for futures and currencies traders is of course subject to their rigorous backtests, though the &lt;a href="http://bpp.mit.edu/usa/daily-price-indexes/?country=USA"&gt;chart&lt;/a&gt; displayed on their website does suggest that the daily price index is a leading indicator of the CPI.&lt;br /&gt;&lt;br /&gt;There is an important caveat to using news trading: not all news are equal. So another key ingredient to success is to carefully differentiate between the different types of news and backtest their predictive abilities separately. For example, I recall some research has indicated that an analyst downgrade of a stock from a "hold" to a "sell" rating has more impact than from "buy" to "hold" rating.&lt;br /&gt;&lt;br /&gt;My own experience with news driven trading is that for all this trouble, the trading opportunities are relatively few compared to pure price driven trading, the consistency of success is low, and finally the profitability lifespan is short. If you have better experience, do share it with us.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-3285163410460162756?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/3285163410460162756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=3285163410460162756' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3285163410460162756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3285163410460162756'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2011/06/even-more-on-news-driven-trading.html' title='Even more on news driven trading'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-1082883065374923520</id><published>2011-05-17T08:11:00.000-04:00</published><updated>2011-05-17T08:11:50.911-04:00</updated><title type='text'>A platform, a shareware site, and some courses for quant traders</title><content type='html'>I mentioned in various places that &lt;a href="http://www.alphacet.com/"&gt;Alphacet Discovery&lt;/a&gt; is an industrial strength integrated platform for backtesting and implementing quantitative trading strategies. But of course, it has many competitors, one of which is a relatively new company called &lt;a href="http://www.deltixlab.com/"&gt;Deltix&lt;/a&gt;. Deltix has the distinction of offering a full Matlab interface, which is convenient if you are already a Matlab programmer. (Full disclosure: I previously have a consulting relationship with Alphacet, but have none with Deltix.)&lt;br /&gt;&lt;br /&gt;There is also a new website for sharing trading strategy software called &lt;a href="http://quantonomics.com/"&gt;Quantonomics&lt;/a&gt;. In the words of its founder Joshua, the goal is to "connect programmers and stock traders". Joshua also told me that he will create a custom application on his site for any of you readers as a gift!&lt;br /&gt;&lt;br /&gt;A colleague of mine in Singapore, Dr. Li Haksun, who was previously a quant with UBS and BNP Paribas, is offering a &lt;a href="http://www.ntusgxcfe.ntu.edu.sg/ATC-TSD/ATC-TSD1.html"&gt;course on quantitative trading strategy&lt;/a&gt;&amp;nbsp;in July. It covers more theoretical concepts than my own courses: e.g. hidden markov model, stochastic control, and Kalman filters are included.&lt;br /&gt;&lt;br /&gt;And of course, my own workshops on &lt;a href="http://www.technicalanalyst.co.uk/training/backtestingEC.htm"&gt;Backtesting&lt;/a&gt; and &lt;a href="http://www.technicalanalyst.co.uk/training/statarb.htm"&gt;Statistical Arbitrage&lt;/a&gt; will be offered again in London next week.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-1082883065374923520?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/1082883065374923520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=1082883065374923520' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1082883065374923520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1082883065374923520'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2011/05/platform-shareware-site-and-some.html' title='A platform, a shareware site, and some courses for quant traders'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-5422248599899251817</id><published>2011-05-10T15:32:00.000-04:00</published><updated>2011-05-10T15:32:51.759-04:00</updated><title type='text'>Time-of-day effects in FX trading</title><content type='html'>As I mentioned in a previous &lt;a href="http://epchan.blogspot.com/2011/03/momentum-strategies.html"&gt;post&lt;/a&gt;, one of the main ingredients of success in constructing a profitable momentum trading strategy in Forex (and futures) is to pay attention to the entry and exit times. I haven't seen any good momentum strategy that has "time-translation invariance",&lt;i&gt; i.e. &lt;/i&gt;works without reference to a fixed time of the day. The fixed time can refer to a benchmark level of the market (e.g. the previous close), or it can be the entry or exit time. &amp;nbsp;(This is in contrast to mean-reverting strategies where the reference price can often be just a moving average.)&amp;nbsp;A&amp;nbsp;&lt;a href="http://www.snb.ch/n/mmr/reference/working_paper_2011_04/source"&gt;recent research paper&lt;/a&gt;&amp;nbsp;(Hat tip: William) points to another example of such time-of-day effects in FX markets: a currency typically depreciates during its local trading hours.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-5422248599899251817?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/5422248599899251817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=5422248599899251817' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5422248599899251817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5422248599899251817'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2011/05/time-of-day-effects-in-fx-trading.html' title='Time-of-day effects in FX trading'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-9089434256301340371</id><published>2011-04-23T10:14:00.000-04:00</published><updated>2011-04-23T10:14:08.443-04:00</updated><title type='text'>The many facets of linear regression</title><content type='html'>Many years ago, a portfolio manager asked me in a phone interview: "Do you believe that linear or nonlinear models are more powerful in building trading models?" Being a babe-in-the-woods, I did not hesitate in answering "Nonlinear!" Little did I know that this is &lt;i&gt;the&lt;/i&gt; question that separate the men from the boys in the realm of quantitative trading. Subsequent experiences showed me that nonlinear models have mostly&amp;nbsp;been&amp;nbsp;unmitigated disasters in terms of trading profits. As Max Dama said in a recent excellent &lt;a href="http://www.maxdama.com/?p=414"&gt;article&lt;/a&gt; on linear regression: "&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;...&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;when the signal to noise ratio is .05:1, ... there’s not much point in worrying about [higher order effects]". One is almost certain to overfit a nonlinear model to non-recurring noise.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;Until recently, I have used linear regression mainly in finding hedge ratios between two instruments in pair trading, or more generally in finding the weightings (in number of shares) of individual stocks in a basket in some form of index arbitrage. Of course, others have found linear algebra useful in principal component analysis and more generally factor analysis as well. But thanks to a number of commenters on this blog as well as various private correspondents, I have begun to apply linear regression more directly in trading models.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;One way to directly apply linear regression to trading is to use it in place of moving averages. Using moving average implicitly assumes that there is no trend in a price series, that the mean of the prices will remain the same. This of course may not be true. So using linear regression to project the current equilibrium price is sometimes more accurate than just setting it equal to a moving average. I have found that in some cases, this equilibrium price results in better mean-reverting models: e.g. short an instrument when its current price is way above the equilibrium price.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;Of course, one can also use linear regression in a similar way in momentum models: e.g. if the current price is way above the equilibrium price, consider this a "breakout" and buy the instrument.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;Max in his article referenced above also pointed out a more sophisticated version of linear regression, commonly called "weighted least squares regression" (WLS). WLS is to linear regression what exponential moving average (EMA) is to simple moving average (SMA): it gives more weights to recent data points. Indeed I have found that EMA often gives better results than SMA in trading. However, so far I have not found WLS to be better than simple least squares. Max also referenced an article which establishes the equivalence between weighted least squares and Kalman filter. Now Kalman filter is a linear model that is very popular among quantitative traders. The nice feature about Kalman filter is that there is very few free parameters: the model will adapt itself to the means and covariances of the input time series gradually. And furthermore, it can do so one-step at a time&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;(or in technical jargon, using an "online" algorithm)&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;: i.e., there is no need to separate the data into "training" and "test" sets, and no need to define a "lookback" period unlike moving averages. It makes use of "hidden states" much like Hidden Markov Models (HHM), but unlike HHM, Kalman filter is faithfully linear.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;I haven't used Kalman filter much myself, but I would welcome any comments from our readers on its usage. Also,&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;if you know of other ways to use linear regression in trading, do share with us here!&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-9089434256301340371?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/9089434256301340371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=9089434256301340371' title='29 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/9089434256301340371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/9089434256301340371'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2011/04/many-facets-of-linear-regression.html' title='The many facets of linear regression'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>29</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-2063823706876656711</id><published>2011-03-11T14:21:00.001-05:00</published><updated>2011-03-11T14:22:38.717-05:00</updated><title type='text'>Momentum strategies in futures and forex</title><content type='html'>I have long found that it is easier to find good (i.e. high Sharpe ratio) mean-reverting strategies than good momentum strategies. Partly, that is because I was mainly a stock trader instead of a futures/currencies trader, and individual stocks mean-revert most of the time. There are exceptions, such as after special corporate events such as earnings announcements, and I have tested momentum strategies based on these events. But the success of even these event-driven strategies has been uneven, especially since more traders become aware of them.&lt;br /&gt;&lt;br /&gt;Now that I am focusing more on trading futures and currencies, I have gradually been introduced to the world of momentum investing. There is a good book in this area that deserves to be better known: Joe Duffy's &lt;a href="http://www.amazon.com/gp/product/098238971X/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=quantitativet-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=098238971X"&gt;The Ultimate Trading Robot&lt;/a&gt;,&amp;nbsp;which is an almost step-by-step guide to constructing futures trending strategies that rely on prices alone.&amp;nbsp;Another example would be the London Breakout strategy mentioned by our reader Bernd in the comments &lt;a href="http://www.blogger.com/comment.g?blogID=35364652&amp;amp;postID=389093680987686968"&gt;here&lt;/a&gt;. After studying these examples, I realized why my previous, rather desultory, search for momentum strategies in the futures and FX markets had been in vain: the overnight gap in these markets seems critical. For futures, the overnight gap is obvious, but in the case of the London Breakout strategy, for example, the trader has the task defining for herself what the optimal closing and opening times are in order to compute the gap. Intraday trend without an overnight breakout does not seem persistent enough to be traded profitably. I also wonder if there is a more elegant (i.e. mathematical) way to quantify such breakout&amp;nbsp;phenomena&amp;nbsp;without using the traditional technical indicators.&lt;br /&gt;&lt;br /&gt;If you know of ideas for good momentum strategies, you are most welcome to share and discuss them here!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-2063823706876656711?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/2063823706876656711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=2063823706876656711' title='62 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/2063823706876656711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/2063823706876656711'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2011/03/momentum-strategies.html' title='Momentum strategies in futures and forex'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>62</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-389093680987686968</id><published>2011-01-25T14:31:00.000-05:00</published><updated>2011-01-25T14:31:01.876-05:00</updated><title type='text'>High frequency trading ideas</title><content type='html'>I just started reading Larry Harris' book "&lt;a href="http://www.amazon.com/dp/0195144708?tag=quantitativet-20&amp;amp;camp=14573&amp;amp;creative=327641&amp;amp;linkCode=as1&amp;amp;creativeASIN=0195144708&amp;amp;adid=0D3KY6CFQFQZ1PS6KVYR&amp;amp;"&gt;Trading and Exchanges&lt;/a&gt;" (thanks to &lt;a href="http://www.maxdama.com/"&gt;Max Dama&lt;/a&gt;'s glowing book review) and already a couple of potential high frequency trading techniques stood out:&lt;br /&gt;&lt;br /&gt;"&lt;b&gt;Quote matching&lt;/b&gt;" - a technique whereby front-runners place a limit buy order just a cent (for stocks) higher than the best bid price. If the order is filled, they then place a limit sell order just a cent lower than the best ask. Assuming the best bid-ask quotes don't move, the worst they can do is to lose 1 cent&amp;nbsp;by selling the share back to the best bidder, while the most profit they can make is the bid-ask spread&amp;nbsp;plus rebates for providing liquidity&amp;nbsp;minus 2 cents by having the sell long limit order filled. This could work out quite profitably if the bid-ask spread is wide. But of course, the best bid-ask do change constantly, so front-runners would need to cancel and correct their limit orders constantly, and the optimal algorithm for doing this could get quite complicated. Meanwhile, if you are a bona fide liquidity provider, you would have to avoid providing this free option to the front-runners by constantly monitoring who is in front of you. As usual, this chess game can quickly degenerate into an HFT arms race.&lt;br /&gt;&lt;br /&gt;"&lt;b&gt;Manipulation of stop orders&lt;/b&gt;" - a.k.a. "gunning the market", a technique whereby the market gunners buy aggressively so as to trigger large buy stop orders that they believe are in place at a higher price. When these buy stop orders are filled, the prices are driven higher still, and these manipulators then sell their position profitably.&lt;br /&gt;&lt;br /&gt;One of my old momentum strategies was a victim of these market gunners, and after that sad experience I refused to use stop orders any more, at least for stocks. However, here is a question for our knowledgeable readers: can other traders actually see what stop orders there are on an order book (whether for stocks, futures, or Forex markets)? And if so, would a trading robot that simulates stop orders by sending out buy market orders when the stop price is touched work better than manually placing a buy stop order on the order book?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-389093680987686968?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/389093680987686968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=389093680987686968' title='52 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/389093680987686968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/389093680987686968'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2011/01/high-frequency-trading-ideas.html' title='High frequency trading ideas'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>52</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-1067263832054806475</id><published>2011-01-05T11:57:00.001-05:00</published><updated>2011-01-05T15:18:32.615-05:00</updated><title type='text'>Shorting the VIX calendar spread</title><content type='html'>Lately there were a few interesting discussions in the&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"&gt;blogosphere&amp;nbsp;&lt;/span&gt;on the profitability of shorting the VXX-VXZ spread. (See &lt;a href="http://matlab-trading.blogspot.com/2010/12/vix-buy-hold-strategy.html"&gt;Quantum Blog&lt;/a&gt; and &lt;a href="http://speculators-ball.blogspot.com/2010/12/is-vxx-due-for-bounce.html"&gt;The Speculator's Ball&lt;/a&gt;.) For background, VXX is an ETN that tracks the first and second month of the VIX future, which in turn tracks the VIX volatility index, which in turn tracks the volatility of SPX. VXZ is the ETN that tracks the 4th - 7th months of the VIX future. During the period 2009-2010, there were 2 different reasons why shorting this "calendar spread" was profitable:&lt;br /&gt;&lt;br /&gt;1) The VIX futures were/are in contango: i.e. the back months' futures are more expensive than the front months'.&lt;br /&gt;2) The volatility of SPX was decreasing with time.&lt;br /&gt;&lt;br /&gt;However, some traders seem to think that either one of these conditions is enough to ensure the profitability of shorting a calendar spread. &amp;nbsp;It is not. (Otherwise, life as a futures trader would be too easy!)&lt;br /&gt;&lt;br /&gt;To see this, let's resort to a simplistic linear approximation to a model of futures prices. From &lt;a href="http://www.amazon.com/gp/product/0132164949?ie=UTF8&amp;amp;tag=quantitativet-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0132164949"&gt;John Hull&lt;/a&gt;'s book on derivatives, section 3.12, the price of &amp;nbsp;a future which matures at time T is&lt;br /&gt;&lt;br /&gt;F(t, T)=E(S&lt;span class="Apple-style-span" style="font-size: xx-small;"&gt;T&lt;/span&gt;)exp(c(T-t)),&lt;br /&gt;&lt;br /&gt;where&amp;nbsp;E(S&lt;span class="Apple-style-span" style="font-size: xx-small;"&gt;T&lt;/span&gt;) is the expected value of the spot price at maturity, c is a constant, and t is the current time. If the futures are in contango, then c &amp;gt; 0.&lt;br /&gt;&lt;br /&gt;If we assume that abs(c) is small, and T-t is also small (i.e. not too far from maturity), and that the expected value of the spot price changes slowly, we can linearize this formula as&lt;br /&gt;&lt;br /&gt;F=(a+b(T-t))*(1+c(T-t))&lt;br /&gt;&lt;br /&gt;If the market expects the future spot price to increase, then b &amp;gt; 0.&lt;br /&gt;&lt;br /&gt;After a few simple algebraic steps, you can verify that the calendar spread's price is proportional to&lt;br /&gt;&lt;br /&gt;F(t, T&lt;span class="Apple-style-span" style="font-size: xx-small;"&gt;1&lt;/span&gt;)-F(t, T&lt;span class="Apple-style-span" style="font-size: xx-small;"&gt;2&lt;/span&gt;)&amp;nbsp;~ bct&lt;br /&gt;&lt;br /&gt;where T&lt;span class="Apple-style-span" style="font-size: xx-small;"&gt;1&lt;/span&gt; &amp;lt; T&lt;span class="Apple-style-span" style="font-size: xx-small;"&gt;2 &lt;/span&gt;(i.e. F(t, T&lt;span class="Apple-style-span" style="font-size: xx-small;"&gt;1&lt;/span&gt;) is the front month's price, and&amp;nbsp;F(t, T&lt;span class="Apple-style-span" style="font-size: xx-small;"&gt;2&lt;/span&gt;) the back month's).&lt;br /&gt;&lt;br /&gt;This is a satisfyingly illustrative result. It says that shorting this calendar spread will be profitable if&lt;br /&gt;&lt;br /&gt;A) futures are in contango &lt;i&gt;and &lt;/i&gt;the expected spot price in the future is decreasing; or else&lt;br /&gt;B) futures are in backwardation &lt;i&gt;and&lt;/i&gt; the expected spot price in the future is increasing.&lt;br /&gt;&lt;br /&gt;So what is the situation today? Will it still be profitable to short this spread? As our fellow bloggers have pointed out, VIX futures are still in contango, but the market is expecting volatility to increase in the future over the last month or so. So this may no longer be a profitable trade anymore.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-1067263832054806475?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/1067263832054806475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=1067263832054806475' title='32 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1067263832054806475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1067263832054806475'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2011/01/shorting-vix-calendar-spread.html' title='Shorting the VIX calendar spread'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>32</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-8273714220487768486</id><published>2010-11-18T11:48:00.000-05:00</published><updated>2010-11-18T11:48:15.104-05:00</updated><title type='text'>Columbia Workshop on Financial Engineering</title><content type='html'>Our readers in New York may be interested in &lt;a href="http://www.cap.columbia.edu/announcements/CAP_Workshop_10/index.html"&gt;this finance workshop&lt;/a&gt; at Columbia University tomorrow.&lt;br /&gt;I am particularly interested in the talk by Kent Daniel on "Characterizing Momentum", and by Doug Borden (of Knight Equity Markets) on "Stochastic Control Theory in High-Frequency Trading". Doug's talk can be downloaded &lt;a href="http://www.ieor.columbia.edu/pdf-files/Borden_D_FESeminar_Sp10.pdf"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;h2&gt;&lt;br /&gt;&lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-8273714220487768486?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/8273714220487768486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=8273714220487768486' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8273714220487768486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8273714220487768486'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2010/11/columbia-workshop-on-financial.html' title='Columbia Workshop on Financial Engineering'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-972618319387728271</id><published>2010-10-10T11:33:00.000-04:00</published><updated>2010-10-10T11:33:23.698-04:00</updated><title type='text'>Data mining and artificial intelligence update</title><content type='html'>Long time readers of this blog know that I haven't found &lt;a href="http://epchan.blogspot.com/2006/12/artificial-intelligence-and-stock.html"&gt;data mining or artificial intelligence&lt;/a&gt; techniques to be very useful for my own trading, for they typically overfit to non-recurring past patterns. (Not surprisingly, they are much more useful for &lt;a href="http://www.nytimes.com/2010/10/10/science/10google.html"&gt;driverless cars&lt;/a&gt;.) Nevertheless, one must keep an open mind and continues to keep tabs on new developments in this field.&lt;br /&gt;&lt;br /&gt;To this end, &lt;a href="http://www.eecs.berkeley.edu/Pubs/TechRpts/2010/EECS-2010-63.pdf"&gt;here&lt;/a&gt; is a new paper written by an engineering student at UC Berkeley which uses "support&lt;br /&gt;vector machine" together with 10 simple technical indicators to predict the SPX index, purportedly with 60% accuracy. If one includes an additional indicator which measures the number of news articles on a stock in the previous day, then the accuracy supposedly goes up to 70%.&lt;br /&gt;&lt;br /&gt;I did not have the chance to reproduce and verify this result yet, but I invite you to try it out and share your findings here. If you do so, you may find this new data mining product called &lt;a href="http://www.11antsanalytics.com/"&gt;11Ants Analytics&lt;/a&gt; useful. It is an Excel-based software that includes &lt;a href="http://www.11antsanalytics.com/aboutus/uth.aspx"&gt;11 machine learning algorithms&lt;/a&gt; including the aforementioned support vector machines. It also includes decision trees which are sometimes quite useful in automatically generating a small set of trading rules from an input set of technical indicators. (Whether those rules remain profitable in the future is another question!) If you have tried this product, I would also appreciate your comments here.&lt;br /&gt;&lt;br /&gt;(If you are a die-hard MATLAB fan, support vector machines are available in their Bioinformatics Toolbox, and classification and decision trees in their Statistics Toolbox.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-972618319387728271?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/972618319387728271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=972618319387728271' title='51 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/972618319387728271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/972618319387728271'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2010/10/data-mining-and-artificial-intelligence.html' title='Data mining and artificial intelligence update'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>51</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-6216734132052011006</id><published>2010-10-02T14:06:00.002-04:00</published><updated>2010-10-02T14:09:03.710-04:00</updated><title type='text'>The main virtue of buying options</title><content type='html'>I realized that I have omitted the most obvious virtue of trading options instead of stocks in my last post: the much more attractive reward-risk ratio for options.&lt;br /&gt;&lt;br /&gt;Suppose your stock strategy generated a buy signal. You can either buy the stock now, or you can buy an ATM call. If you buy the stock, you are of course benefiting from 100% of the upside potential of the stock price movement, but you are similarly exposed to 100% of the downside risk. Indeed you can lose the entire market value of the stock. If you buy the call, you will benefit from &amp;gt; 50% of the upside potential of the stock price, assuming that your holding period is so short that the time value will not dissipate much. As the stock price rises, so does your delta. (It increases from 0.5 to 1.) But what about the downside risk? All you can lose is the option premium, usually &amp;lt;&amp;lt; 50% of the market value of the stock.&lt;br /&gt;&lt;br /&gt;In other words, while one may be tempted to hedge a large stock position with stock index futures, there is no need to hedge an equivalent call option position. This should simplify your strategy implementation and reduce risk management costs (i.e. the probable loss on your short futures position).&lt;br /&gt;&lt;br /&gt;Given that I am a short-term trader anyway, I can't figure out why I have been trading stocks instead of options all these years! (Aside from the caveats detailed in the previous post.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-6216734132052011006?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/6216734132052011006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=6216734132052011006' title='22 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/6216734132052011006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/6216734132052011006'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2010/10/main-virtue-of-buying-options.html' title='The main virtue of buying options'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>22</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-8536206933715179379</id><published>2010-09-25T11:26:00.000-04:00</published><updated>2010-09-25T11:26:56.131-04:00</updated><title type='text'>Implementing stock strategies using options</title><content type='html'>There are many stock trading strategies that are quite attractive in terms of Sharpe ratios, but not very attractive in terms of returns. (Pairs trading comes to mind. But in general, any market neutral strategy suffers from this problem.)&amp;nbsp; Certainly, one cannot feed a family with annualized returns in the single or low double digits, unless one already has millions of dollars of capital. One way to solve this dilemma is of course to join a proprietary trading group, where we would have access to perhaps x30 leverage. Another way is to implement a stock trading strategy using options instead, though there are a sizable number of issues to consider. (I recently brushed up on my options know-how by reading the popular "&lt;a href="http://www.amazon.com/dp/0735201978?tag=quantitativet-20&amp;amp;camp=14573&amp;amp;creative=327641&amp;amp;linkCode=as1&amp;amp;creativeASIN=0735201978&amp;amp;adid=0Q0NBNQ5ETXJS894MZPP&amp;amp;"&gt;Options as a Strategic Investment&lt;/a&gt;".)&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Using options will allow you to increase your leverage beyond the Reg T x2 leverage (or even the day trading x4 leverage) only if you buy options only, but not selling them. For example, to implement a pairs trading strategy on 2 different stocks, you would have to buy call options on the long side, and &lt;i&gt;buy &lt;/i&gt;put options on the short side (but not sell call options). Otherwise the margin requirement for selling calls is as onerous as shorting the underlying stock itself.&lt;/li&gt;&lt;li&gt; The effective leverage is computed by multiplying the &lt;i&gt;delta &lt;/i&gt;of the option by the underlying stock price divided by the option premium. If you buy an out-of-money (OTM) option, the delta will be small (smaller than 0.5), but the option premium is small also. Vice versa for an in-the-money (ITM) option. So you would have to find the optimal strike price so that the effective leverage is maximized. I personally choose to buy an at-the-money (ATM) call or slightly ITM call without actually computing the optimized strike, but perhaps you have reached a different conclusion?&lt;/li&gt;&lt;li&gt;Naturally, the shorter the time-to-expiration, the cheaper the option and higher the effective leverage. Additionally, for ITM options, their deltas increase as we get closer to expiration, which also contributes to higher effective leverage. However, the time-to-expiration must of course be longer than the expected holding period of your position, otherwise you would incur the transaction cost of rolling over to the further-month options. &lt;/li&gt;&lt;li&gt;The discussion of finding the right strike price based on its delta is moot if your brokerage's API does not provide you with delta for your automated trading system. In theory, Interactive Brokers's API provide deltas for whole options chains, and &lt;a href="http://exchangeapi.com/"&gt;quant2ib&lt;/a&gt;'s MATLAB API will pass these on to your MATLAB exeuction program too. However, I have not been successful in retrieving deltas using quant2ib's API. If you have encountered a similar problem, and perhaps have found the reason/cure for this, please let me know. For now, I am reduced to assuming that all my near ATM calls for different stocks have the same delta, and I increase this common value from 0.5 to close to 1 as time passes.&lt;/li&gt;&lt;li&gt;Options don't have MOO, LOO, MOC or LOC order types. If one uses market orders to buy at the open or close, one would incur significant transaction costs due to the much wider bid-ask spread compared to stocks. I try to use limit orders on options orders as much as possible.&lt;/li&gt;&lt;/ol&gt;If you have used options to implement stock trading strategies, and have experiences with these or other issues, please do share them here.&lt;br /&gt;&lt;br /&gt;====&lt;br /&gt;&lt;br /&gt;Reminder: my next &lt;a href="http://www.technicalanalyst.co.uk/training/pairs-trading.htm"&gt;pairs trading workshop&lt;/a&gt; will take place in New York on October 26-27th.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-8536206933715179379?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/8536206933715179379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=8536206933715179379' title='33 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8536206933715179379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8536206933715179379'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2010/09/implementing-stock-strategies-using.html' title='Implementing stock strategies using options'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>33</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-5883794759866180536</id><published>2010-08-22T11:57:00.000-04:00</published><updated>2010-08-22T11:57:45.982-04:00</updated><title type='text'>Phantom quotes</title><content type='html'>Have you ever got the feeling that your market orders are often filled at prices worse than the NBBO displayed on your trading screen? Apparently, this may be the result of &lt;a href="http://www.zerohedge.com/article/how-hft-quote-stuffing-caused-market-crash-may-6-and-threatens-destroy-entire-market-any-mom"&gt;deliberate manipulation&lt;/a&gt; of the market by high frequency traders. These HF traders submit thousands of quotes per second to the NYSE ("&lt;a href="http://www.nanex.net/20100506/FlashCrashAnalysis_Part4-1.html"&gt;quote stuffing&lt;/a&gt;") and then cancel them within 50 ms. This slows down the exchange data queue so much that by the time a quote is transmitted to you, it is stale already, even if your trading server is collocated at the exchange. (Checking the time stamp of the quote is of no help: the time stamp is based on the time the quote &lt;i&gt;enters &lt;/i&gt;the queue, not when it &lt;i&gt;exits &lt;/i&gt;the queue.)&lt;br /&gt;&lt;br /&gt;If you can no longer believe in the quotes, is there any integrity left in the market? Much as I think that HFT may be useful liquidity providers, I can't see how this specific practice could be good for anyone over the long term.&lt;br /&gt;&lt;br /&gt;(Hat tip: Jim Liew of &lt;a href="http://www.alphaquantclub.com/index.php"&gt;Alpha Quant Club&lt;/a&gt;.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-5883794759866180536?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/5883794759866180536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=5883794759866180536' title='31 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5883794759866180536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5883794759866180536'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2010/08/phantom-quotes.html' title='Phantom quotes'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>31</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-5826902374878450176</id><published>2010-08-14T13:39:00.000-04:00</published><updated>2010-08-14T13:39:11.258-04:00</updated><title type='text'>What are we to do with Sharpe ratio?</title><content type='html'>I wrote several times before how useless Sharpe ratio is for certain types of strategies: see &lt;a href="http://epchan.blogspot.com/2009/11/picking-up-nickels-in-front-of.html"&gt;here&lt;/a&gt; and &lt;a href="http://epchan.blogspot.com/2009/02/limitation-of-sharpe-ratio.html"&gt;here&lt;/a&gt;. Not only is a &lt;i&gt;high&lt;/i&gt; Sharpe ratio quite useless in telling you what damage extreme events can do to your equity, a &lt;i&gt;low&lt;/i&gt; Sharpe ratio is also quite useless in telling you what spectacular gain your strategy might enjoy in the event of a catastrophe. I came across another brilliant example of the latter category in the best-selling book "&lt;a href="http://www.amazon.com/gp/product/0393072231?ie=UTF8&amp;amp;tag=quantitativet-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0393072231"&gt;The Big Short&lt;/a&gt;", where the author tells of the story of the fund manager Mike Burry.&lt;br /&gt;&lt;br /&gt;Mike Burry started buying credit default swaps in 2005, essentially an insurance policy on mortgage-backed securities, betting that there will be widespread defaults on mortgages. Of course, we now know how this story would turn out: Mike Burry made $750 million in 2007 alone.&amp;nbsp; But there was nothing but pain for the fund manager and his investors in 2005-2006, since they had to pay an annual premium of 8% of the portfolio.&amp;nbsp; Investors who measured the performance of this strategy using Sharpe ratio, without knowing the details of the strategy itself, would be quite justified to think that it was an utter disaster prior to 2007. And indeed, many of them lost no time in trying to pull out their investments.&lt;br /&gt;&lt;br /&gt;So what are we to do with Sharpe ratio, with its inherent reliance on Gaussian distributions? Clearly, it is useful for measuring high frequency strategies which you can count on to generate consistent returns every day, but which has limited catastrophic risks. But it is less useful for measuring statistical arbitrage strategies that hold positions over multiple days, since there may well be substantial hidden catastrophic risks in these strategies that would not be revealed by their track record and standard deviation of returns alone. As for strategies that are designed to benefit from catastrophes, such as Mike Burry's CDS purchases or Nassim Taleb's options purchases, it is completely useless. If I were to allocate my assets over different hedge funds, I would be sure to include some funds in the first category to generate cash flows for my daily needs, as well as funds in the last category to benefit from the infrequent black-swan events. As for the funds in the middle category, I am increasingly losing my enthusiasm.&lt;em&gt;&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-5826902374878450176?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/5826902374878450176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=5826902374878450176' title='18 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5826902374878450176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5826902374878450176'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2010/08/what-are-we-to-do-with-sharpe-ratio.html' title='What are we to do with Sharpe ratio?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>18</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-629155041938621265</id><published>2010-07-30T12:17:00.001-04:00</published><updated>2010-08-01T08:30:48.491-04:00</updated><title type='text'>Pair trading technologies update</title><content type='html'>Pair trading was invented two decades ago, but automating its implementation has only recently become fashionable with independent traders. But once the spotlight is on, innovations come fast and furious. Here are a number of recent developments that I find interesting:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. I mentioned &lt;a href="http://epchan.blogspot.com/2009/05/matlab-as-automated-execution-system.html"&gt;previously&lt;/a&gt; the software called &lt;a href="http://exchangeapi.com/ProductOverview.htm"&gt;quant2ib&lt;/a&gt;. It is an API which allows us to get market data and send orders from a Matlab program to Interactive Brokers (IB). I have used it extensively for our trading, and it is as reliable as IB's native API. Their latest version now includes functions for constructing a "combo" security. This combo security can be pairs of stocks, ETF's, futures, etc. (with the notable exception of currencies), and the API allows you to get market data as well as to submit orders on a combo. This is a huge improvement because you can now automatically trade a pair of securities as one unit by submitting &lt;b&gt;limit&lt;/b&gt; orders on the combo. (Previously, you would have had to submit market order on at least one side of the pair, and this would have required your program to continuously monitor the market prices and send orders when appropriate. Or else you had to give up using the API and manually enter a "generic combo" limit order in IB's TWS.)&lt;br /&gt;&lt;br /&gt;2. Alphacet Discovery also has the ability to send limit orders on pairs, due to its &lt;a href="http://alphacet.com/site/news/knight.shtml"&gt;partnership&lt;/a&gt; with Knight Trading. Besides, based on a demo that I have recently seen, they also now have great pairs portfolio and execution reporting functionality. (Full disclosure: I used to consult for them.)&lt;br /&gt;&lt;br /&gt;3. IB itself has released a "Scale Trader" algorithm that can be applied to combos (see 1. above. Hat tip: Mohamed.) I can't explain this better than their press release: "... ScaleTrader algorithm allows clients to create conditions under which a long position in one stock is built while simultaneously creating an offsetting short position in the other. The ScaleTrader is named because investors can '&lt;span class="il"&gt;scale&lt;/span&gt;-in' to market weakness by setting &lt;span class="il"&gt;orders&lt;/span&gt; to buy as the market moves lower. Similarly, sell &lt;span class="il"&gt;orders&lt;/span&gt; can be 'scaled' into when a market is rising.  The ScaleTrader algorithm can be programmed to buy the spread and subsequently take profit by selling the spread if the difference reaches predetermined levels set by the user." In other words, it allows us to automatically implement the "&lt;a href="http://epchan.blogspot.com/2008/08/more-on-parameterless-trading-model.html"&gt;parameterless trading&lt;/a&gt;" or the "&lt;a href="http://epchan.blogspot.com/2010/01/does-averaging-in-work.html"&gt;averaging-in&lt;/a&gt;" strategy that I blogged about previously without any programming on our part!&lt;br /&gt;&lt;br /&gt;Speaking of pair trading, I will be teaching my first New York &lt;a href="http://www.technicalanalyst.co.uk/training/pairs-trading.htm"&gt;workshop&lt;/a&gt; in October.&amp;nbsp; (My editor inevitably picks touristy locations for these workshops. My London workshop takes place across the street from the Tower of London, my New York workshop is across from the new World Trade Center, and my Hong Kong workshop is in the "Golden Mile" shopping district of Tsim Sha Tsui.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-629155041938621265?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/629155041938621265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=629155041938621265' title='55 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/629155041938621265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/629155041938621265'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2010/07/pair-trading-technologies-update.html' title='Pair trading technologies update'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>55</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-7894097997493879152</id><published>2010-05-29T09:54:00.000-04:00</published><updated>2010-05-29T09:54:16.887-04:00</updated><title type='text'>The Quants</title><content type='html'>Once in a while, a book about trading written for the general public contains some useful nuggets even for professionals.&amp;nbsp; &lt;a href="http://www.amazon.com/dp/0809046377?tag=quantitativet-20&amp;amp;camp=14573&amp;amp;creative=327641&amp;amp;linkCode=as1&amp;amp;creativeASIN=0809046377&amp;amp;adid=08GKKTBWBX5F88C13T5D&amp;amp;"&gt;Fortune's Formula&lt;/a&gt; was one. It introduced me to the world of &lt;a href="http://epchan.blogspot.com/2006/10/how-much-leverage-should-you-use.html"&gt;Kelly's formula&lt;/a&gt;, &lt;a href="http://epchan.blogspot.com/2007/01/universal-portfolios.html"&gt;Universal Portfolios&lt;/a&gt;, and the maximization of compounded growth rate. &lt;a href="http://www.amazon.com/dp/0307453375?tag=quantitativet-20&amp;amp;camp=14573&amp;amp;creative=327641&amp;amp;linkCode=as1&amp;amp;creativeASIN=0307453375&amp;amp;adid=1RH2ND78BHGVY4QMQ3ZJ&amp;amp;"&gt;The Quants&lt;/a&gt;, by WSJ reporter Scott Patterson, is another. (Hat tip to my partner Steve for telling me about it.)&lt;br /&gt;&lt;br /&gt;What is the most important take-away in The Quants? No, it is not that you should learn to become a master poker player or chess player before hoping to make it big, though you would think that given Patterson's exhaustive coverage of poker games played by the top quants. Among my own professional acquaintances, trader-poker-players are still a minority.&lt;br /&gt;&lt;br /&gt;The most important take-away is what ex-employees said about Renaissance Technologies: "there is no secret formula for the fund's success, no magic code discovered decades ago by geniuses .... Rather, Madallion [Fund]'s team of ninety or so Ph.D.'s are constantly working to improve the fund's systems, ..."&lt;br /&gt;&lt;br /&gt;In other words, though you may not have 90 Ph.D.'s&amp;nbsp; at your disposal, you can still work on continuously improving/refining your strategies, improving the engineering of your trading environment, and increasing the diversity of your strategies. And though you may still not archive 60-70% annualized returns every year, you will nevertheless enjoy stable returns year after year.&lt;br /&gt;&lt;br /&gt;By the way, it is good to see my ex-colleagues Lalit Bahl, Vincent and Stephen Della Pietra  mentioned in the book, all of whom left IBM to join Renaissance many years ago, and who are extraordinarily nice and friendly guys, quite in contrast to the norm on Wall Street.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-7894097997493879152?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/7894097997493879152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=7894097997493879152' title='22 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/7894097997493879152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/7894097997493879152'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2010/05/quants.html' title='The Quants'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>22</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-1954422143877325421</id><published>2010-05-22T09:56:00.000-04:00</published><updated>2010-05-22T09:56:53.869-04:00</updated><title type='text'>A HFT primer</title><content type='html'>As a follow-up of my previous discussions on high frequency trading, I have invited guest blogger Jennifer Groton to share with us a quick survey of various common HFT strategies used by equities and FX traders.&lt;br /&gt;&lt;br /&gt;==&lt;br /&gt;&lt;br /&gt;High frequency trading strategies are under fire.&amp;nbsp; The recent trading spike in our national exchanges was duly noted as a short-circuit waiting to happen and drew immediate industry criticism of auto-trading robots. Before a witch-hunt ensues, perhaps a review of the common HFT strategies in stocks and Forex is in order.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;High-frequency firms employ a wide variety of&amp;nbsp; low-margin trading strategies that are implemented by professional market intermediaries who have invested heavily in technology. These firms claim that they make markets more efficient by enhancing liquidity and transparent price discovery to the benefit of investors.&amp;nbsp; The Forex market’s unique combination of high liquidity and low volatility make it an ideal environment for deploying &lt;a href="http://www.wikinvest.com/wiki/High-Frequency_Trading_%28HFT%29"&gt;HFT strategies&lt;/a&gt;, although many of the ideas and technology are from the equity markets.&amp;nbsp; The basic strategies fall into three categories: market-making, trending or predictive, and classic arbitrage.&lt;br /&gt;&lt;br /&gt;Market-making strategies tend to focus on a single stock or currency pair.&amp;nbsp; Many firms in this area have been described as engaging in "rebate-capture trading", a reference to the credits that firms get for providing liquidity on most market centers.&lt;br /&gt;&lt;br /&gt;The second group consists of mean-reversion and trending strategies. These utilize technical indicators for stocks or &lt;a href="http://www.forexindicators.net/forex-indicators.html"&gt;forex indicators&lt;/a&gt; for currencies, and seek to generate more return from individual trades.&lt;br /&gt;&lt;br /&gt;The last group may involve a cross-section of trades from multiple markets.&amp;nbsp; The classic arbitrage strategy is a form of the “carry trade” that uses the prices of a domestic bond, a bond denominated in a foreign currency, the spot price of the currency, and the price of a forward contract on the currency.&amp;nbsp; If the market prices are sufficiently different from those implied in the model to cover transactions costs, then four transactions can be made to guarantee a risk-free profit.&lt;br /&gt;&lt;br /&gt;High frequency trading is attributed with generating over 70% of the volume of trades on our equity markets.&amp;nbsp; Similar statistics are not available for forex markets, but speculating disguised as commercially necessary trades have been reported to be over two-thirds of the volume.&amp;nbsp; Liquidity and pricing transparency are the benefits offered by its advocates, but regulators and other market participants who disagree with this positive assessment are presently discounting these benefits.&amp;nbsp; Transaction taxes and time limits on orders have been proposed to mitigate the perceived risk created by HFT firms, but the wheels of Washington move slowly, even in crisis.&amp;nbsp; For the time being, there is no indication that their participation will be discontinued.&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-1954422143877325421?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/1954422143877325421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=1954422143877325421' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1954422143877325421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1954422143877325421'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2010/05/hft-primer.html' title='A HFT primer'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-6968077531462039292</id><published>2010-05-08T07:52:00.000-04:00</published><updated>2010-05-08T07:52:53.477-04:00</updated><title type='text'>Are flash orders to be blamed for Dow's 1,000 points drop?</title><content type='html'>Before the smoke is clear, fingers are already pointing at flash orders. See these two NYT pieces &lt;a href="http://www.nytimes.com/2010/05/08/opinion/08durbin.html?hp"&gt;here&lt;/a&gt; and &lt;a href="http://dealbook.blogs.nytimes.com/2010/05/07/congress-takes-aim-at-wall-st-s-wild-trading/?src=busln"&gt;here&lt;/a&gt;. Our reader &lt;a href="http://epchan.blogspot.com/2009/09/are-flash-orders-really-so-bad.html?showComment=1254174558620#c8183071516760833603"&gt;Madan&lt;/a&gt; has convinced me previously that flash orders can indeed be used to&amp;nbsp; front-run other traders, but until more evidence comes in, I am yet to be convinced that they are the main culprit. Couldn't old-fashioned automated momentum programs accomplished the same thing after an initial erroneous transaction price and/or quote was reported? Perhaps you know of discussions elsewhere on the blogosphere that bring more light to the issue?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-6968077531462039292?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/6968077531462039292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=6968077531462039292' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/6968077531462039292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/6968077531462039292'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2010/05/are-flash-orders-to-be-blamed-for-dows.html' title='Are flash orders to be blamed for Dow&apos;s 1,000 points drop?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-9094760950592190665</id><published>2010-05-02T13:19:00.000-04:00</published><updated>2010-05-02T13:19:07.855-04:00</updated><title type='text'>An additional ETF pair</title><content type='html'>Many of you know that there are a number of dependable commodity-related ETF pairs that remain cointegrated ever since I &lt;a href="http://epchan.blogspot.com/2006/11/does-canada-belong-to-emerging-markets.html"&gt;mentioned&lt;/a&gt; them in 2006: IGE-EWC, IGE-EEM, IGE-EWA, EWA-EWC, etc. (Their latest zScores are available &lt;a href="http://epchan.com/subscription/spread.htm"&gt;here&lt;/a&gt; to my &lt;a href="http://www.amazon.com/dp/0470284889?tag=quantitativet-20&amp;amp;camp=14573&amp;amp;creative=327641&amp;amp;linkCode=as1&amp;amp;creativeASIN=0470284889&amp;amp;adid=0X8QE69365EGX089NHDV&amp;amp;"&gt;book&lt;/a&gt;'s readers and to &lt;a href="http://www.epchan.com/subscriptions.html"&gt;Premium Content&lt;/a&gt; subscribers.) A recent visit to a client in South Africa prompted me to add a new one: EWA-EZA.&lt;br /&gt;&lt;br /&gt;It is worth noting that for those country ETF pairs that cointegrate, their underlying currency cross-rates are often stationary as well. Now, there are several advantages in trading currency cross rates instead of ETF pairs. When trading a stationary cross rate, you can enter a limit order to enter and exit, but trading pairs of ETF's involve market orders on at least one side. Also, ETF's can sometimes be hard-to-borrow, and their margin requirements are much more onerous than that of currencies. However, the one major disadvantage in trading cross rates is that they are not always available on your brokerage. For example, based on the cointegration of EWA and EZA you would think that trading AUDZAR would be quite profitable. And you would be right, &lt;i&gt;theoretically&lt;/i&gt;, except that AUDZAR is not available for trading on Interactive Brokers. If you know of a good Forex brokerage that have many emerging markets cross-rates for trading, especially those of Latin American countries, please let the rest of us know!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-9094760950592190665?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/9094760950592190665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=9094760950592190665' title='31 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/9094760950592190665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/9094760950592190665'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2010/05/additional-etf-pair.html' title='An additional ETF pair'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>31</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-3750711124624920965</id><published>2010-04-17T09:51:00.000-04:00</published><updated>2010-04-17T09:51:40.089-04:00</updated><title type='text'>How do you limit drawdown using Kelly formula?</title><content type='html'>As many of you know, I am a fan of &lt;a href="http://epchan.blogspot.com/2009/02/kelly-formula-revisited.html"&gt;Kelly formula&lt;/a&gt; because it allows us to maximize long-term growth of equity while minimizing the probability of ruin. However, what Kelly formula wont' prevent is a deep drawdown, though we are assured that the drawdown won't be as much as 100%! This is unsatisfactory to many traders and especially fund managers, since a deep drawdown is psychologically painful and may cause you to panic and shut down a strategy prematurely.&lt;br /&gt;&lt;br /&gt;There is an easy way, though, that you can use Kelly formula to limit your drawdown to be much less than 100%. Suppose the optimal Kelly leverage of your strategy is determined to be K. And suppose you only allow a maximum drawdown (measured from the high watermark, as usual) to be D%. Then you can simply set aside D% of your initial total account equity for trading, and apply a leverage of K to this sub-account to determine your portfolio market value. The other 1-D% of the account will be sitting in cash. You can then be assured that you won't lose all of the equity of this sub-account, or equivalently, you won't suffer a drawdown of more than D% in your total account. If your trading strategy is profitable and the total account equity reaches a new high watermark, then you can reset your sub-account equity so that it is again D% of the total equity, moving some cash back to the "cash" account. Otherwise, you continue to keep the equity in the cash account separate from the equity of the trading sub-account.&lt;br /&gt;&lt;br /&gt;Notice that because of this separation of accounts, this scheme is &lt;i&gt;not&lt;/i&gt; equivalent to just using a leverage of L=K*D% on your total account equity. Indeed, some of you may be too nervous to use the full K as leverage, and prefer to use a leverage L smaller than K. (In fact, the common wisdom is that, due to estimation errors, it is never advisable to set L to be more than K/2, &lt;i&gt;i.e.&lt;/i&gt; half-Kelly.) The problem with using a L that is too small is that, besides not achieving maximum growth, the portfolio market value will be unresponsive to gains or losses and will remain relatively constant. Using the scheme I suggested above will cure this problem as well, because you can apply a higher leverage L_sub to the sub-account (e.g. use L_sub = L/D%) as long as L_sub &amp;lt; K, so that the portfolio market value is much more sensitive to your P&amp;amp;L while still ensuring the drawdown will not exceed D%.&lt;br /&gt;&lt;br /&gt;Has anyone tried this scheme in their actual trading? If so, I would be interested in hearing your experience and see if practice is as good as theory.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-3750711124624920965?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/3750711124624920965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=3750711124624920965' title='50 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3750711124624920965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3750711124624920965'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2010/04/how-do-you-limit-drawdown-using-kelly.html' title='How do you limit drawdown using Kelly formula?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>50</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-4604938772883871296</id><published>2010-02-27T17:44:00.000-05:00</published><updated>2010-02-27T17:44:52.643-05:00</updated><title type='text'>Conference on the sociology of quantitative finance</title><content type='html'>A new conference called &lt;a href="http://www.psi-q.org/"&gt;Psi-Q&lt;/a&gt; will be held in London this June, featuring luminaries in the academic quantitative finance world, as well as risk and fund managers from various banks and hedge funds. Example topics: &lt;br /&gt;&lt;ul&gt;&lt;li&gt;How did shared beliefs, practices, ways of calculating, and technical systems impact evaluation of asset-backed securities and CDOs before and during the credit crises?&lt;/li&gt;&lt;li&gt;&lt;strong style="font-weight: normal;"&gt;Was that Lucky or Good? Creating a framework for skill attribution in finance, business management and other risky endeavors&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;The “backing out” phenomena observed in options markets:&amp;nbsp; how traders use models to imply independent variables consistent with market observed pricing, and where enough traders can be wrong about the expected results and the backed-out positions can send the wrong message.&lt;/li&gt;&lt;/ul&gt;Sounds like an interesting bird's eye view of quantitative finance. &lt;br /&gt;&lt;input id="gwProxy" type="hidden" /&gt;&lt;!--Session data--&gt;&lt;input id="jsProxy" onclick="jsCall();" type="hidden" /&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-4604938772883871296?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/4604938772883871296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=4604938772883871296' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/4604938772883871296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/4604938772883871296'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2010/02/conference-on-sociology-of-quantitative.html' title='Conference on the sociology of quantitative finance'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-3447702237333546919</id><published>2010-02-18T14:48:00.001-05:00</published><updated>2010-02-18T14:49:27.959-05:00</updated><title type='text'>Pairs Trading Workshop in Hong Kong</title><content type='html'>For my readers in Asia, I will be conducting a &lt;a href="http://www.technicalanalyst.co.uk/training/pairs-trading.htm"&gt;pairs trading workshop&lt;/a&gt; in Hong Kong on March 10-11. This workshop is organized by the Technical Analyst magazine and is similar to the one I gave in London last year.&lt;br /&gt;However, I have added a few useful insights based on audience feedback. As always, no prior knowledge of Matlab or advanced statistics is assumed. The numerous in-class exercises should be sufficient to bring your Matlab programming skills up to speed.&lt;br /&gt;&lt;input id="gwProxy" type="hidden" /&gt;&lt;input id="jsProxy" onclick="jsCall();" type="hidden" /&gt;&lt;br /&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;input id="gwProxy" type="hidden" /&gt;&lt;!--Session data--&gt;&lt;input id="jsProxy" onclick="jsCall();" type="hidden" /&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-3447702237333546919?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/3447702237333546919/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=3447702237333546919' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3447702237333546919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3447702237333546919'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2010/02/pairs-trading-workshop-in-hong-kong.html' title='Pairs Trading Workshop in Hong Kong'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-2056610859158015443</id><published>2010-01-31T16:03:00.000-05:00</published><updated>2010-01-31T16:03:16.415-05:00</updated><title type='text'>A method for optimizing parameters</title><content type='html'>Most trading systems have a number of parameters embedded, parameters such as the lookback period, the entry and exit thresholds, and so on. Readers of my blog (for e.g., &lt;a href="http://epchan.blogspot.com/2008/05/parameterless-trading-models.html"&gt;here&lt;/a&gt; and &lt;a href="http://epchan.blogspot.com/2008/08/more-on-parameterless-trading-model.html"&gt;here&lt;/a&gt;) and my &lt;a href="http://www.amazon.com/dp/0470284889?tag=quantitativet-20&amp;amp;camp=14573&amp;amp;creative=327641&amp;amp;linkCode=as1&amp;amp;creativeASIN=0470284889&amp;amp;adid=1ZQ6268JYSSZDWNC9976&amp;amp;"&gt;book&lt;/a&gt; would know my opinion on parameter optimization: I am no big fan of it. This is because I believe financial time series is too non-stationary to allow one to say what was optimal in the backtest is necessarily optimal in the future. Most traders I know would rather trade a strategy that is insensitive to small changes in parameters, or alternatively, a "parameterless" strategy that is effectively an average of models with different parameters.&lt;br /&gt;&lt;br /&gt;That being said, if you can only trade one model with one specific set of parameters, it is rational to ask how one can pick the best (optimal) set of parameters. Many trading models have a good number of parameters, and it is quite onerous to find the optimal values of all these parameters simultaneously. Recently, Ron Schoenberg published an &lt;a href="http://www.futuresmag.com/Issues/2010/February-2010/Pages/Using-DOE-method-in-trading.aspx"&gt;article&lt;/a&gt; in the Futures Magazine that details a way to accomplish this with just a tiny amount of computer power. &lt;br /&gt;&lt;br /&gt;The key technique that Ron uses is cubic polynomial fit of the P&amp;amp;L surface as a function of the parameters. Ron uses the VIX RSI strategy in Larry Connors' book "&lt;a href="http://www.amazon.com/dp/0981923909?tag=quantitativet-20&amp;amp;camp=14573&amp;amp;creative=327641&amp;amp;linkCode=as1&amp;amp;creativeASIN=0981923909&amp;amp;adid=1BPFA03ZZFNQ82NW23QT&amp;amp;"&gt;Short Term Trading Strategies That Work&lt;/a&gt;" as an example. This strategy has 5 parameters to be optimized, but Ron only needs to compute the P&amp;amp;L for 62 different sets of parameters, and the whole procedure only takes 58 seconds.&lt;br /&gt;&lt;br /&gt;Although Ron has confirmed that most of the parameters that Connors picked are close to optimal, he did find a few surprises: namely, that RSI of period 3 or 4 is significantly more profitable than the 2 that Connors used, at least in the backtest period.&lt;br /&gt;&lt;br /&gt;Now, for a true test of this optimization, it would be helpful if Ron performed this optimization withholding some out-of-sample data, and see if these parameters are still optimal in that withheld data set. Since he didn't do that, we need to wait for another year to find out ourselves!&lt;br /&gt;&lt;input id="gwProxy" type="hidden" /&gt;&lt;!--Session data--&gt;&lt;input id="jsProxy" onclick="jsCall();" type="hidden" /&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-2056610859158015443?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/2056610859158015443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=2056610859158015443' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/2056610859158015443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/2056610859158015443'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2010/01/method-for-optimizing-parameters.html' title='A method for optimizing parameters'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-6598019561153436816</id><published>2010-01-19T13:02:00.000-05:00</published><updated>2010-01-19T13:02:21.155-05:00</updated><title type='text'>Excel ADF test</title><content type='html'>Some readers have asked whether there is an Excel version of the ADF test for cointegration (mentioned in articles &lt;a href="http://epchan.blogspot.com/2007/04/anonymous-reader-l-posted-some.html"&gt;here&lt;/a&gt; or &lt;a href="http://epchan.blogspot.com/2009/08/using-r-to-test-for-cointegration.html"&gt;here&lt;/a&gt;.) You can download one such package&lt;a href="http://www.quantcode.com/modules/mydownloads/singlefile.php?cid=9&amp;amp;lid=410"&gt; here&lt;/a&gt; (Hat tip: Bruce H.).&lt;br /&gt;&lt;br /&gt;And as always, you can download the Matlab version from spatial-econometrics.com.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-6598019561153436816?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/6598019561153436816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=6598019561153436816' title='41 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/6598019561153436816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/6598019561153436816'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2010/01/excel-adf-test.html' title='Excel ADF test'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>41</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-1084490103207740141</id><published>2010-01-09T20:23:00.000-05:00</published><updated>2010-01-09T20:23:43.460-05:00</updated><title type='text'>Does Averaging-In Work?</title><content type='html'>Ron Schoenberg and Al Corwin recently did some interesting &lt;a href="http://www.optionbots.com/DOE/does_averaging_in_work.pdf"&gt;research&lt;/a&gt; on the trading technique of "averaging-in". For e.g.:&amp;nbsp; Let's say you have $4 to invest. If a future's price recently drops to $2, though you expect it to eventually revert to $3. Should you&lt;br /&gt;&lt;br /&gt;A) buy 1 contract at $2, and wait for the price to &lt;i&gt;possibly &lt;/i&gt;drop to $1 and then buy 2 more contracts (&lt;i&gt;i.e.&lt;/i&gt; averaging-in); or&lt;br /&gt;B) buy 2 contracts at $2 each;&amp;nbsp; or&lt;br /&gt;C) wait to &lt;i&gt;possibly &lt;/i&gt;buy 4 contracts at $1 each?&lt;br /&gt;&lt;br /&gt;Let's assume that the probability of the price dropping to $1 once you have reached $2 is &lt;i&gt;p&lt;/i&gt;. It is easy to see that the average profits of the 3 options are the following:&lt;br /&gt;A) &lt;i&gt;p&lt;/i&gt;*(1*$1+2*$2) + (1-&lt;i&gt;p&lt;/i&gt;)*(1*$1)=1+4&lt;i&gt;p&lt;/i&gt;;&lt;br /&gt;B) 2; and&lt;br /&gt;C) &lt;i&gt;p&lt;/i&gt;4*$2=8&lt;i&gt;p&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;Profit A is lower than C when &lt;i&gt;p &lt;/i&gt;&amp;gt; 1/4, and profit A is lower than profit C when &lt;i&gt;p&lt;/i&gt; &amp;gt; 1/4. Hence, whatever &lt;i&gt;p&lt;/i&gt; is,&amp;nbsp; either option B or C is more profitable than averaging in, and thus averaging-in can never be optimal.&lt;br /&gt;&lt;br /&gt;From a backtest point of view, the Schoenberg-Corwin argument is impeccable, since we know what &lt;i&gt;p&lt;/i&gt; is for the historical period. You might argue, however, that financial markets is not quite stationary, and in my example, if the historical value of &lt;i&gt;p&lt;/i&gt; was less than 1/4, it is quite possible that the future value can be more than 1/4. This is why I never make too much effort to optimize parameters in general, and I can sympathize with traders who insist on averaging-in even in the face of this solid piece of research!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-1084490103207740141?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/1084490103207740141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=1084490103207740141' title='32 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1084490103207740141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1084490103207740141'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2010/01/does-averaging-in-work.html' title='Does Averaging-In Work?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>32</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-2704017766318975223</id><published>2009-12-24T10:24:00.000-05:00</published><updated>2009-12-24T10:24:30.003-05:00</updated><title type='text'>Selecting tradeable pairs: which measure to use?</title><content type='html'>&lt;b&gt;&lt;i&gt;A guest blog by &lt;a href="http://www.paulfarrington.com/research/Selecting%20tradeable%20pairs.htm"&gt;Paul Farrington&lt;/a&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;One of the most important factors in statistical arbitrage pairs trading is the selection of the paired instruments.&amp;nbsp; We can use basic heuristics to guide us, such as grouping stocks by industry in the anticipation that stocks with similar fundamental characteristics will share factor risk and tend to exhibit co-movement.&amp;nbsp; But this still leaves us with potentially thousands of combinations.&amp;nbsp; There are some statistical techniques we can use to quantify the tradeability of a pair: one approach is to calculate the correlation coefficient of each pair's return series. Another is to consider cointegration measures on the ratio of the prices, to see if it remains stationary over time.&lt;br /&gt;&lt;br /&gt;In this article I briefly summarise the alternative approaches and apply them to a universe of stock pairs in the oil and gas industry.&amp;nbsp; To measure how effective each measure is in real world trading, I back test the pairs using a simple means reversion system, then regress the generated win rate against the statistical results.&amp;nbsp; Some basic insights emerge as to the effectiveness of correlation and cointegration as tools for selecting candidate pairs.&lt;br /&gt;&lt;br /&gt;Please visit http://www.paulfarrington.com/research/Selecting%20tradeable%20pairs.htm for details of my methodology and results.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-2704017766318975223?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/2704017766318975223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=2704017766318975223' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/2704017766318975223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/2704017766318975223'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/12/selecting-tradeable-pairs-which-measure.html' title='Selecting tradeable pairs: which measure to use?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-8512305998636815819</id><published>2009-12-18T21:48:00.003-05:00</published><updated>2009-12-18T21:49:56.954-05:00</updated><title type='text'>Public service announcements for quants</title><content type='html'>&amp;nbsp;&amp;nbsp; 1.&amp;nbsp; Conference on 'Computational Topics in Finance', February 19/20, 2010, National University of Singapore. The topics will include using R/Rmetrics in finance, but the conference is by no means confined to R. See http://www.rmetrics.org/.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; 2.&amp;nbsp; Consulting position (6-month renewable contract) available at a major Canadian bank in Toronto:&amp;nbsp; research in&amp;nbsp; various mathematical algorithms used for pricing of interest rate derivative instruments like swaps, caps, swaptions, FRAs. Please contact their recruiter at http://www.linkedin.com/pub/kevin-p-w-wang/6/899/29a.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; 3.&amp;nbsp; A free copy of Chapter 8 of "&lt;a href="http://www.amazon.com/dp/0615297412?tag=quantitativet-20&amp;amp;camp=14573&amp;amp;creative=327641&amp;amp;linkCode=as1&amp;amp;creativeASIN=0615297412&amp;amp;adid=0ACTX2F686M5PNT5X4QV&amp;amp;"&gt;High Probability ETF Trading&lt;/a&gt;" which I mentioned &lt;a href="http://epchan.blogspot.com/2009/11/in-praise-of-etfs.html"&gt;here&lt;/a&gt; is now available for &lt;a href="http://subscriptions.tradingmarkets.com/r.php?322"&gt;download&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-8512305998636815819?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/8512305998636815819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=8512305998636815819' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8512305998636815819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8512305998636815819'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/12/public-service-announcements-for-quants_18.html' title='Public service announcements for quants'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-2581891775153454652</id><published>2009-12-06T16:37:00.003-05:00</published><updated>2009-12-06T16:39:22.593-05:00</updated><title type='text'>Are financial speculations really "harmful human activities"?</title><content type='html'>It is worrisome when not one but two eminent economists denounced financial speculation as "harmful human activities" in the short space of 2 weeks. (See Paul Krugman's column &lt;a href="http://www.nytimes.com/2009/11/27/opinion/27krugman.html"&gt;here&lt;/a&gt; and Robert Frank's &lt;a href="http://www.nytimes.com/2009/12/06/business/economy/06view.html?ref=business"&gt;here&lt;/a&gt;.) It is more worrisome when their proposed cure to this evil is to apply a financial transaction tax to &lt;i&gt;all&lt;/i&gt; financial transactions.&lt;br /&gt;&lt;br /&gt;Granted, you can always find this or that situation when financial speculation did cause harm. Maybe speculation did cause the housing bubble. Maybe speculation did cause an energy price bubble. In the same vein, you can also argue that driving is a harmful human activity because cars did cause a few horrific traffic accidents.&lt;br /&gt;&lt;br /&gt;No, we can't focus on a few catastrophes if we were to argue that financial speculation is harmful. We have to focus on whether it is harmful &lt;i&gt;on average&lt;/i&gt;. And on this point, I haven't seen our eminent economists present any scientific evidence. On the other hand, as an ex-physicist and an Einstein-devotee, I can imagine some&amp;nbsp; thought experiments (or &lt;i&gt;gedankenexperiment &lt;/i&gt;as Einstein would call them), where I can illustrate how the absence of financial speculation can clearly  be detrimental to the interests of the much-beloved long-term investors. To make a point, a gedankenexperiment is usually constructed so that the conditions are extreme and unrealistic. So here I will assume that the financial transaction tax is so onerous that no hedge funds and other short-term traders exist anymore. &lt;br /&gt;&lt;br /&gt;Gedankenexperiment A: Ms. Smith just received a bonus from her job and would like to buy one of her favorite stocks in her retirement account. Unfortunately, on the day she placed her order, a major mutual fund was rebalancing its portfolio and had also decided to shift assets into that stock. In the absence of hedge funds and other speculators selling or even shorting this stock, the price of that stock went up 40% from the day before. Not knowing that the cause of this spike was a temporary liquidity squeeze, and afraid that she would have to pay even more in the future, Ms. Smith paid the ask price and bought the stock that day. A week later, the stock price fell 45% from the peak after the mutual fund buying subsided. Ms. Smith was mortified.&lt;br /&gt;&lt;br /&gt;Gedankenexperiment B: Mr. Smith decided that the stock market is much too volatile (due to the lack of speculators!) and opted to invest his savings into mutual funds instead. He took a look at his favorite mutual fund's performance, and unfortunately, its recent performance seemed to be quite a few notches below its historical average. The fund manager explained on her website that since her fund derived its superior performance from rapidly liquidating holdings in companies that announced poor earnings, the absence of liquidity in the stock market often forced her to sell into an abyss. Disgusted, Mr. Smith opted to keep his savings in his savings account.&lt;br /&gt;&lt;br /&gt;Of course, our economists will say that the tax is not so onerous that it will deprive the market of all speculators (only the bad ones!?). But has anyone studied if we impose 1 unit of tax, how many units of liquidity in the marketplace will be drained, and in turn, how many additional units of transaction costs (which include implicit costs due to the increased volatility of securities) would be borne by an average investor, who may not have the luxury of submitting a limit order and waiting for the order to be filled?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-2581891775153454652?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/2581891775153454652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=2581891775153454652' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/2581891775153454652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/2581891775153454652'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/12/are-financial-speculation-really.html' title='Are financial speculations really &quot;harmful human activities&quot;?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-194279811316703901</id><published>2009-11-27T15:02:00.000-05:00</published><updated>2009-11-27T15:02:46.566-05:00</updated><title type='text'>Picking up nickels in front of steamrollers</title><content type='html'>When I was growing up in the trading world, high Sharpe ratio was the holy grail. People kept forgetting the possibility of "black swan" events, only recently popularized by &lt;a href="http://www.amazon.com/gp/product/1400063515?ie=UTF8&amp;amp;tag=quantitativet-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1400063515"&gt;Nassim Taleb&lt;/a&gt;, which can wipe out years of steady gains in one disastrous stroke. (For a fascinating interview of Taleb by the famous Malcolm Gladwell, see this old New Yorker &lt;a href="http://www.newyorker.com/archive/2002/04/22/020422fa_fact_gladwell"&gt;article&lt;/a&gt;. It includes a contrast with Victor Niederhoffer's trading style, plus a rare close-up view of the painful daily operations of Taleb's hedge fund.)&lt;br /&gt;&lt;br /&gt;Now, however, the pendulum seems to have swung a little too far in the other direction. Whenever I mention a high Sharpe-ratio strategy to some experienced investor, I am often confronted with dark musings of "picking up nickels in front of steamrollers", as if all high Sharpe-ratio strategies consist of shorting out-of-the-money call options.&lt;br /&gt;&lt;br /&gt;But many high Sharpe-ratio strategies are &lt;i&gt;not&lt;/i&gt; akin to shorting out-of-the-money calls. My favorite example is that of short-term mean-reverting strategies. These strategies not only provide consistent small gains under normal market conditions, but in contrast to shorting calls, they make out-size gains &lt;i&gt;especially &lt;/i&gt;when disasters struck. Indeed, they give us the best of both worlds. (Proof? Just backtest any short-term mean-reverting strategies over 2008 data.) How can that be?&lt;br /&gt;&lt;br /&gt;There are multiple reasons why short-term mean-reverting strategies have such delightful properties:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Typically, we enter into positions only &lt;i&gt;after &lt;/i&gt;the disaster has struck, not before. &lt;br /&gt;&lt;/li&gt;&lt;li&gt; If you believe a certain market is mean-reverting, and your strategy buy low and sell high, then of course you will make much more money when the market is abnormally depressed.&lt;/li&gt;&lt;li&gt;Even in the rare occasion when the market does not mean-revert after a disaster, the market is unlikely to go down much further &lt;i&gt;during the short time period when we are holding the position&lt;/i&gt;.&lt;/li&gt;&lt;/ol&gt;"Short-term" is indeed the key to the success of these strategies. In contrast to the LTCM debacle, where they would keep piling on to a losing position day after day hoping it would mean-revert some day, short-term traders liquidate their positions at the end of a fixed time period, whether they win or lose. This greatly limits the possibility of ruin and leaves our equity intact to fight another day in the statistical game.&lt;br /&gt;&lt;br /&gt;So, call me old-fashioned, but I still love high Sharpe-ratio strategies.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-194279811316703901?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/194279811316703901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=194279811316703901' title='25 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/194279811316703901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/194279811316703901'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/11/picking-up-nickels-in-front-of.html' title='Picking up nickels in front of steamrollers'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>25</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-8319033952725088325</id><published>2009-11-04T21:54:00.000-05:00</published><updated>2009-11-04T21:54:18.827-05:00</updated><title type='text'>In praise of ETF's</title><content type='html'>I have learned some years ago that ETF's are strange and wonderful creatures. Simple, long-only mean-reverting strategies that work very well on ETF's, &lt;b&gt;won't&lt;/b&gt; work on their component stocks. (Check out a nice collection of these strategies in Larry Connors' book "&lt;a href="http://www.amazon.com/dp/0615297412?tag=quantitativet-20&amp;amp;camp=14573&amp;amp;creative=327641&amp;amp;linkCode=as1&amp;amp;creativeASIN=0615297412&amp;amp;adid=0ACTX2F686M5PNT5X4QV&amp;amp;"&gt;High Probability ETF Trading&lt;/a&gt;". He has also packaged these strategies into a single indicator, the ETF Power Ratings, on tradingmarkets.com.) Simple pair trading strategies like the one I discussed in my &lt;a href="http://www.amazon.com/dp/0470284889?tag=quantitativet-20&amp;amp;camp=14573&amp;amp;creative=327641&amp;amp;linkCode=as1&amp;amp;creativeASIN=0470284889&amp;amp;adid=1J7EZ16GVB2XW2WRJAYY&amp;amp;"&gt;book&lt;/a&gt;, also work much more poorly on stocks than on ETF's. Why is that?&lt;br /&gt;&lt;br /&gt;Well, one obvious reason is that, as Larry mentioned in his book, ETF's are not likely to go bankrupt (with the notable exception of the triple-leveraged ETF's, as I &lt;a href="http://epchan.blogspot.com/2009/07/are-triple-leveraged-etfs-suitable-for.html"&gt;explained&lt;/a&gt; previously), because a whole sector or country is not likely to go bankrupt. So you can pretty much count on mean-reversion if you are on the long side.&lt;br /&gt;&lt;br /&gt;Another obvious reason is that though there are news which will affect the valuation of a whole sector or country, these aren't as frequent or as devastating as news affecting individual stocks. And believe me, news is the biggest enemy of mean-reversion.&lt;br /&gt;&lt;br /&gt;But finally, I believe that the capital weightings of the component stocks also play a part in promoting mean-reversion. Typically, weighting of a component stock increases with its market capitalization, though not necessarily linearly. Perhaps large-cap stocks are more prone to mean-reversion than small-cap stocks? But more intriguingly, can we not construct a basket of stocks, with custom-designed weightings, with the objective of optimizing its short-term mean-reversion property? I (and others before me) have done &lt;a href="http://epchan.blogspot.com/2007/02/in-looking-for-pairs-of-financial.html"&gt;something similar&lt;/a&gt; in constructing a basket of stocks that cointegrate best with an index. Can we not construct a basket that is simply stationary (with perhaps a constant drift)?&lt;br /&gt;&lt;br /&gt;Now, perhaps you will agree with me that ETF's are strange and wonderful creatures.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-8319033952725088325?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/8319033952725088325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=8319033952725088325' title='49 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8319033952725088325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8319033952725088325'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/11/in-praise-of-etfs.html' title='In praise of ETF&apos;s'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>49</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-5357582507849235663</id><published>2009-10-11T09:00:00.004-04:00</published><updated>2009-10-11T16:27:03.245-04:00</updated><title type='text'>The best environment for quantitative trading</title><content type='html'>Let me talk about a topic that is far more mundane than the usual high-brow theoretical discussions of strategies and algorithms, but that has no less long-term impact on the bottom line: what is the best office environment for research and execution of quantitative trading strategies?&lt;br /&gt;&lt;br /&gt;I have worked in different office environments before, so I feel qualified to offer an informed opinion.&lt;br /&gt;&lt;br /&gt;At Morgan Stanley, I huddled over a desk that is semi-partitioned from the rest of the office: nobody could see or bother me unless I or they stood up.  At Credit Suisse, I shared an office with 2 other prop trading colleagues, one of whom was prone to freely sharing his opinion on various current affairs with his officemates. (On the other hand, he complained my biting an apple for lunch was too loud for him.) At Maple, a hedge fund in New Jersey, I shared an office with about 100 other colleagues on the trading floor, many of whom were prone to same opinion-sharing temptation.&lt;br /&gt;&lt;br /&gt;Here at my own firm, I sit in solitude (except for my cat) in my basement office, my beloved &lt;a href="http://www.classicfm.co.uk/on-air/ways-of-listening/"&gt;classical FM&lt;/a&gt; streaming over the internet, my desktop electronically connected to my partner in our Chicago office, our trading servers at Amazon and elsewhere, and other clients and partners  around the world, but unmolested throughout the day unless I voluntarily pick up the phone or answer an email or instant message.&lt;br /&gt;&lt;br /&gt;Can you guess which environment is the one I find the most productive? Which one has the least stress? And which one contributes most to the bottom line of  my employers/partners/clients?&lt;br /&gt;&lt;br /&gt;(Hint 1: read Timothy Ferriss' book &lt;a href="http://www.amazon.com/gp/product/0307353133?ie=UTF8&amp;amp;tag=quantitativet-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0307353133"&gt;The 4-Hour Workweek&lt;/a&gt;. This guy checks his email only once a week.)&lt;br /&gt;&lt;br /&gt;(Hint 2: my trading Sharpe ratio went from negative to &gt;7.)&lt;br /&gt;&lt;br /&gt;P.S. I look forward to meeting some of you at the &lt;a href="http://www.technicalanalyst.co.uk/conferences/autoconf09.htm"&gt;Automated Trading Conference&lt;/a&gt; in London this Friday (my talk will start at 0900), and others at my &lt;a href="http://www.technicalanalyst.co.uk/training/backtestingEC.htm"&gt;pairs trading workshop&lt;/a&gt; on the preceding two days.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-5357582507849235663?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/5357582507849235663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=5357582507849235663' title='27 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5357582507849235663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5357582507849235663'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/10/best-environment-for-quantitative.html' title='The best environment for quantitative trading'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>27</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-5862933347698894330</id><published>2009-09-20T11:27:00.002-04:00</published><updated>2009-09-20T12:06:47.548-04:00</updated><title type='text'>Are flash orders really so bad?</title><content type='html'>I confess I don't know much about flash orders, not being one of the Big Boys on the Street, until I read that the &lt;a href="http://www.nytimes.com/2009/09/18/business/18regulate.html"&gt;SEC is banning them&lt;/a&gt;. (For a clear diagrammatic explanation of flash orders, see &lt;a href="http://static.seekingalpha.com/uploads/2009/7/26/saupload_flash_orders_diagram.jpg"&gt;here&lt;/a&gt;. For a refutation of some of the myths and misunderstanding surrounding flash orders, see &lt;a href="http://www.forbes.com/2009/07/30/ratterman-bats-bolt-intelligent-investing-flashed.html"&gt;here&lt;/a&gt;.)&lt;br /&gt;&lt;br /&gt;It seems to me that flash orders can be understood as "request for liquidity" issued to various potential market makers/liquidity providers, not unlike the usual "request for quotes" (RFQ) common in other industries. They are issued when there is not enough liquidity on a specific exchange to satisfy an investor's need, and they ultimately benefit investors by lowering their transaction costs. The fact that high frequency traders are able to make lots of money by providing this liquidity is besides the point. Liquidity providers are &lt;span style="font-style: italic;"&gt;supposed &lt;/span&gt;to make money by providing liquidity!&lt;br /&gt;&lt;br /&gt;Some people, including Senator Charles Schumer and this &lt;a href="http://www.nytimes.com/2009/09/18/opinion/18silver.html?bl"&gt;New York Times op-ed&lt;/a&gt;, believe that flash orders are akin to front-running, a clearly illegal trading activity. But they are wrong. Front-running means that if you know someone is going buy a stock, you step in front of them&lt;br /&gt;and buy it cheaply first, hoping to sell it to this slower buyer at a higher price. In the case of flash orders, the high frequency traders are instead &lt;span style="font-style: italic;"&gt;selling&lt;/span&gt; this stock to the original investor, often at a lower price than available elsewhere and thus benefiting this investor, hoping that the prices will come down in the future after this liquidity need subsides. This is manifestly not illegal. This is what a market is built for!&lt;br /&gt;&lt;br /&gt;Another way to understand that flash orders are not at all front running is that anybody, including you and me, are free to put in limit orders at the same price as those of the high frequency traders, way ahead of time, in a specific exchange, and become liquidity providers ourselves. You don't have to wait for a "request for liquidity" before doing so. And presumably you will reap the same benefits as the high frequency traders. You are not taking any additional risks over the HF traders either, since if no requests for liquidity ultimately arrive, you are not any worse off for wear. You cannot begrudge the profits of the HF traders just because you didn't put the limit orders in place beforehand!&lt;br /&gt;&lt;br /&gt;Maybe there are some other angles which I miss which can convince me that flash orders are evil. But until my kind readers convince me otherwise in the comments section, I will regard this piece of legislation as another SEC attempt at demagoguery.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-5862933347698894330?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/5862933347698894330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=5862933347698894330' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5862933347698894330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5862933347698894330'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/09/are-flash-orders-really-so-bad.html' title='Are flash orders really so bad?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-1219719782378820898</id><published>2009-09-11T20:57:00.007-04:00</published><updated>2009-09-11T22:28:41.124-04:00</updated><title type='text'>Can a trader be a do-gooder?</title><content type='html'>It occurs to me that the only way in which a trader can become more than a completely selfish, self-enriching, narcissistic person is to trade well enough so that you can manage other people's money and thus saving these investors from crooks and charlatans (provided you are convinced you are not a crook and charlatan yourself).&lt;br /&gt;&lt;br /&gt;Other traders have advanced other arguments in favor of trading. But I am not convinced by them.&lt;br /&gt;&lt;br /&gt;They say that we provide liquidity to other long-term investors who may need to liquidate their investments. But then, this applies only to mean-reversal strategies. Momentum strategies take away liquidity from the market, and in some cases exacerbating price bubbles. Certainly not something your grandma would approve.&lt;br /&gt;&lt;br /&gt;Others argue that momentum strategies help disseminate information about companies through quick price movements. But can't we just watch Bloomberg or CNBC? Do we really need some devious insiders to convey that information to the rest of us through price movements?&lt;br /&gt;&lt;br /&gt;No, I think that independent trading should serve only one purpose (besides short-term self-sustenance): as training and preparation to become a fund manager. Once you graduated from independent trading, you then enter into the grand contest among all fund managers to see who can best serve and protect&lt;span style="font-style: italic;"&gt; &lt;/span&gt;investors' assets, (and be rewarded according to your standing in this contest.)&lt;br /&gt;&lt;br /&gt;I know, this is the idealistic way to look at things. Serving and protecting seem to be what policemen should be doing, not traders. But as in quantitative trading, I think it helps one becomes more successful in one's activities by having a simple guiding principle or model. And it doesn't hurt that in this case, the principle would also be conscience-nourishing!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-1219719782378820898?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/1219719782378820898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=1219719782378820898' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1219719782378820898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1219719782378820898'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/09/can-trader-be-do-gooder.html' title='Can a trader be a do-gooder?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-2504547293694181036</id><published>2009-09-02T21:35:00.003-04:00</published><updated>2009-09-02T21:57:21.581-04:00</updated><title type='text'>Have you traded 10,000 hours yet?</title><content type='html'>Author Malcolm Gladwell, in his fascinating bestseller "&lt;a href="http://www.amazon.com/gp/product/0316017922?ie=UTF8&amp;amp;tag=quantitativet-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0316017922%22"&gt;Outliers: The Story of Success&lt;/a&gt;", cites neurological research showing that "10,000 hours of practice is required to achieve the level of mastery associated with being a world-class expert." This seems to apply across many different types of experts, whether they are "writers, ice skaters, concert pianists, chess players ... Even Mozart ... couldn't hit his stride until he had his ten thousand hours in".&lt;br /&gt;&lt;br /&gt;Reflecting on my own experience, I have become consistently profitable only after 4 years of actual trading (research alone doesn't count -- real money need to be at risk.) So while the number of hours may not be exactly 10,000, the order of magnitude is about right.&lt;br /&gt;&lt;br /&gt;So if your trading has not been profitable, ask yourself this: "Have I traded 10,000 hours yet?"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-2504547293694181036?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/2504547293694181036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=2504547293694181036' title='18 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/2504547293694181036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/2504547293694181036'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/09/have-you-traded-10000-hours-yet.html' title='Have you traded 10,000 hours yet?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>18</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-5797275456507718243</id><published>2009-08-21T21:15:00.002-04:00</published><updated>2009-08-21T21:27:15.469-04:00</updated><title type='text'>Using R to Test for Cointegration</title><content type='html'>Paul Teetor, who guest-blogged here about &lt;a href="http://epchan.blogspot.com/2009/02/finding-seasonal-spreads_18.html"&gt;seasonal spreads&lt;/a&gt;, recently wrote an &lt;a href="http://quanttrader.info/public/testForCoint.html"&gt;article&lt;/a&gt; about how to test for cointegration using R. Readers who don't want to pay for a copy of Matlab should find this  free alternative with similar syntax quite interesting.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-5797275456507718243?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/5797275456507718243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=5797275456507718243' title='89 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5797275456507718243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5797275456507718243'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/08/using-r-to-test-for-cointegration.html' title='Using R to Test for Cointegration'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>89</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-4295964969672081655</id><published>2009-08-14T14:22:00.003-04:00</published><updated>2009-08-15T09:09:03.725-04:00</updated><title type='text'>Interview on backtesting</title><content type='html'>I have given a 2-part interview (&lt;a href="http://www.tradingmarkets.com/.site/stocks/commentary/satinterview/Bias-Free-Backtesting-The-Big-Saturday-Interview-w-81835.cfm"&gt;here&lt;/a&gt; and &lt;a href="http://www.tradingmarkets.com/.site/stocks/commentary/satinterview/Bias-Free-Backtesting-Part-2-The-Big-Saturday-Inte-81893.cfm"&gt;here&lt;/a&gt;) on the various nuances of backtesting on tradingmarkets.com. Most of the ideas have been covered in my &lt;a href="http://www.amazon.com/dp/0470284889?tag=quantitativet-20&amp;amp;camp=14573&amp;amp;creative=327641&amp;amp;linkCode=as1&amp;amp;creativeASIN=0470284889&amp;amp;adid=1N7NV58ARV4DQ57S534B&amp;amp;"&gt;book&lt;/a&gt;, but it does serve as a summary of what I consider to be the most important issues.&lt;br /&gt;&lt;br /&gt;For those of you who are interested, I may be giving a workshop on general techniques in backtesting in London as well, in addition to my &lt;a href="http://epchan.com/myworkshop.html"&gt;pairs trading workshop&lt;/a&gt;. Additional details will be available on epchan.com at a later date.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-4295964969672081655?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/4295964969672081655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=4295964969672081655' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/4295964969672081655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/4295964969672081655'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/08/interview-on-backtesting.html' title='Interview on backtesting'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-3235598805149463067</id><published>2009-07-27T12:09:00.002-04:00</published><updated>2009-07-27T12:49:12.765-04:00</updated><title type='text'>Are Triple Leveraged ETFs suitable for long-term holding?</title><content type='html'>Triple leveraged ETFs marketed by &lt;a href="http://www.direxionshares.com/etfs"&gt;Direxion&lt;/a&gt; have been all the rage lately. The fund management company says that they do &lt;span style="font-style: italic;"&gt;not &lt;/span&gt;recommend buying and holding these ETFs. But is there any mathematical justification for this caution?&lt;br /&gt;&lt;br /&gt;Before I answer this, it is interesting to note that these ETFs (e.g. BGU is 3x Russell 1000, TNA is 3x Russell 2000) are managed as&lt;span style="font-style: italic;"&gt; constant rebalanced portfolios&lt;/span&gt;, a concept I &lt;a href="http://epchan.blogspot.com/2007/01/universal-portfolios.html"&gt;discussed before&lt;/a&gt;. In other words, the fund manager has to sell stocks (or futures) when there is a loss, and buy stocks (or futures) when there is a gain in the market value of the portfolio, in order to maintain a constant leverage ratio of 3. This is also identical to what Kelly formula would prescribe, a methodology discussed extensively in my &lt;a href="http://www.amazon.com/dp/0470284889?tag=quantitativet-20&amp;amp;camp=14573&amp;amp;creative=327641&amp;amp;linkCode=as1&amp;amp;creativeASIN=0470284889&amp;amp;adid=1RCH0G1KPSQW0CZ8GAX9&amp;amp;"&gt;book&lt;/a&gt;, &lt;span style="font-style: italic;"&gt;if the optimal leverage f were indeed 3&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;However, the optimal f for such market indices are quite a bit lower than 3. Both Russell 1000 and 2000 have f at about 1.8. This means that since the funds are leveraged at 3, there is a real possibility that sustained losses could ruin the funds (i.e. NAV going to zero unless new capital is injected, which, er..., reminds me of a Ponzi scheme). So I would argue that not only should an investor not hold these funds for the long term, the funds themselves should not be leveraged at this level. Otherwise, it is a disaster waiting to happen.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-3235598805149463067?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/3235598805149463067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=3235598805149463067' title='28 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3235598805149463067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3235598805149463067'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/07/are-triple-leveraged-etfs-suitable-for.html' title='Are Triple Leveraged ETFs suitable for long-term holding?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>28</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-2907384345452807373</id><published>2009-07-17T12:18:00.005-04:00</published><updated>2009-07-17T12:36:44.879-04:00</updated><title type='text'>A free Matlab-to-Interactive Brokers API</title><content type='html'>For readers who do not want to pay for a commercial Matlab2IB API, &lt;a href="http://www.maxdama.com/2008/12/interactive-brokers-via-matlab.html"&gt;Max Dama&lt;/a&gt; has put together a free alternative. &lt;a href="http://www.tradingwithmatlab.com/home"&gt;Domenic&lt;/a&gt; has provided some additional sample Matlab codes for trading.&lt;br /&gt;&lt;br /&gt;A user of the &lt;a href="http://www.exchangeapi.com/ProductOverview.htm"&gt;commercial product&lt;/a&gt; that I previously mentioned reports that "My problem with the matlab2ib product was that it did not have a function for all the Active X methods. ( for example the Market Scanners, Real time Bars and Fundamental Data methods are missing). I also had issues when I tried to steam in trades data(I'm not sure if the matlab2ib product allows you to even do this?)." Apparently Max's API has included these methods, though I have not personally tried them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-2907384345452807373?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/2907384345452807373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=2907384345452807373' title='23 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/2907384345452807373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/2907384345452807373'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/07/free-matlab-to-interactive-brokers-api.html' title='A free Matlab-to-Interactive Brokers API'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>23</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-7078827379111105701</id><published>2009-06-29T13:11:00.005-04:00</published><updated>2009-06-29T13:57:32.377-04:00</updated><title type='text'>My interview, stop loss, and the Principle of Latest Information</title><content type='html'>You can find an interview of me in the &lt;a href="http://www.traders.com/Documentation/FEEDbk_Docs/2009/07/Interview.html"&gt;July 2009 issue of Technical Analysis of Stocks &amp;amp; Commodities magazine&lt;/a&gt;. I mentioned in that interview and also in my &lt;a href="http://www.amazon.com/dp/0470284889?tag=quantitativet-20&amp;amp;camp=14573&amp;amp;creative=327641&amp;amp;linkCode=as1&amp;amp;creativeASIN=0470284889&amp;amp;adid=0H1F6CWS2PADFAG8XZPQ&amp;amp;"&gt;book&lt;/a&gt; that I believe stop loss should only be applied to momentum strategies but not to mean-reverting strategies. I explained my reasoning better in my book than in the interview, and so I will paraphrase the explanation here.&lt;br /&gt;&lt;br /&gt;In algorithmic trading, it is reasonable and intuitive that we should always make use of the latest information in determining whether we should enter into a position, whether that information is price, news, or some analysis. Let's call this the Principle of Latest Information. (If someone can think of a better or sexier name, let me know!)&lt;br /&gt;&lt;br /&gt;So let's say we have a stock model based on price momentum, and we entered into a long position based on a recent positive return on price. A few minutes later, the price went down instead of up, causing a big loss on our position. If we now ran this momentum model again, very likely it would tell us to short the stock instead because of the recent negative return on price. If we did that, we would be exiting the previously long position and became flat. This is in effect a stop loss, and it follows strictly from adhering to our model and our Principle of Latest Information.&lt;br /&gt;&lt;br /&gt;In contrast, suppose we now have a stock model based on mean-reversion, and we entered into a long position based on a recent drop in price. A few minutes later, the price went down further instead of up, again causing a big loss on our position. If we now ran this mean-reversion model again, it would definitely tell us to buy the stock again because of the ever cheaper price. The model would not ask you to exit this position and take a loss. Hence, adhering to the model and the Principle of Latest Information will not lead to a stop loss for a mean-reverting model.&lt;br /&gt;&lt;br /&gt;(Now, if we hold this losing long position long enough, the model will incorporate new historical prices into determining its long or short signals as it retrain itself, as the Principle of Latest Information says it should! At that time, it may indeed recommend that we exit the previously held long position at a loss. But this adjustment takes place at a much longer time scale,  and therefore cannot really be considered a stop-loss in its usual sense.)&lt;br /&gt;&lt;br /&gt;More generally, I find that at every turn, and not only in the realm of stock trading, applying the Principle of Latest Information always help me to be disciplined and not be afraid to enter into new positions, take loss or endure a drawdown as the case may be.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-7078827379111105701?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/7078827379111105701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=7078827379111105701' title='34 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/7078827379111105701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/7078827379111105701'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/06/my-interview-stop-loss-and-principle-of.html' title='My interview, stop loss, and the Principle of Latest Information'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>34</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-3018250710882678494</id><published>2009-06-25T10:35:00.003-04:00</published><updated>2009-06-25T10:42:38.327-04:00</updated><title type='text'>A job opening for quants</title><content type='html'>&lt;a href="http://alphacet.com/site/aboutus/careers.shtml"&gt;Alphacet&lt;/a&gt; told me that they have a job opening for a quant who will be helping their clients backtest trading strategies, among other responsibilities. Given that Alphacet's clients include several major investment banks and hedge funds, this position should provide pretty good close-up view of how the major quantitative players operate.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-3018250710882678494?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/3018250710882678494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=3018250710882678494' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3018250710882678494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3018250710882678494'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/06/job-opening-for-quants.html' title='A job opening for quants'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-3574027655155220907</id><published>2009-06-15T11:14:00.005-04:00</published><updated>2009-06-28T08:22:08.934-04:00</updated><title type='text'>A good book for quantitative traders</title><content type='html'>Larry Connors and Cesar Alvarez (the guys behind tradingmarkets.com) recently published &lt;a href="http://www.amazon.com/gp/product/0981923909?ie=UTF8&amp;amp;tag=quantitativet-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0981923909"&gt;Short Term Trading Strategies That Work&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=quantitativet-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0981923909" alt="" style="border: medium none  ! important; margin: 0px ! important;" width="1" border="0" height="1"/&gt;, a nice collection of simple technical trading strategies that you can easily backtest and verify.&lt;br /&gt;&lt;br /&gt;As I have argued in my own &lt;a href="http://www.amazon.com/gp/product/0470284889?ie=UTF8&amp;amp;tag=quantitativet-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0470284889"&gt;book&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=quantitativet-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0470284889" alt="" style="border: medium none  ! important; margin: 0px ! important;" width="1" border="0" height="1"/&gt;, simple strategies are often the ones that work best. As with any published strategies, you may find that their backtest performance may not be as high as advertised if you test them on a different time period or a different security, or with different transaction cost assumptions; but the main value of these strategies is that they serve as an inspiration to trigger your own imagination and motivate you to refine them further.&lt;br /&gt;&lt;br /&gt;(For e.g., though the book mainly covers long-only strategies, you can easily imagine the accompanying short strategies.)&lt;br /&gt;&lt;br /&gt;To be quite honest, this is one of the few books on trading strategies that I actually manage to finish reading from cover to cover.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-3574027655155220907?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/3574027655155220907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=3574027655155220907' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3574027655155220907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3574027655155220907'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/06/good-book-for-quantitative-traders.html' title='A good book for quantitative traders'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-5217214331910067113</id><published>2009-05-29T16:10:00.003-04:00</published><updated>2009-05-29T17:00:27.466-04:00</updated><title type='text'>MATLAB as an Automated Execution System</title><content type='html'>I  just published an article "&lt;a href="http://www.epchan.com/subscription/matlabexecution.pdf"&gt;MATLAB as an Automated Execution System&lt;/a&gt;". (It is available to readers of my book and subscribers to my &lt;a href="http://www.epchan.com/subscriptions.html"&gt;Premium Content&lt;/a&gt; website.) It comes with &lt;a href="http://epchan.com/book/bollinger.m"&gt;&lt;span style="text-decoration: underline;"&gt;ex&lt;/span&gt;ample MATLAB codes&lt;/a&gt; executing a simple Bollinger-band high-frequency E-mini trading strategy.&lt;br /&gt;&lt;br /&gt;As I mentioned before, I now find MATLAB to be a good platform not just for backtesting, but for automated execution as well. Of course, not all brokerages have API's that connect to MATLAB. My example codes are for submitting orders automatically to an Interactive Brokers account.&lt;br /&gt;&lt;br /&gt;In general, I find that writing execution programs in MATLAB is a breeze compared to C++, Java or even C#. It takes about 1/5 the development time of a C++ program. Any performance limitations will probably not be due to MATLAB, but to the latency of your brokerage in updating positions and order status.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-5217214331910067113?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/5217214331910067113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=5217214331910067113' title='50 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5217214331910067113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5217214331910067113'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/05/matlab-as-automated-execution-system.html' title='MATLAB as an Automated Execution System'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>50</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-6638795298173825912</id><published>2009-05-07T13:02:00.004-04:00</published><updated>2009-05-07T13:14:40.781-04:00</updated><title type='text'>My pairs trading workshop in London</title><content type='html'>I will be holding a 2-day, hands-on, pairs trading workshop in London, October 14-15. It will be held in conjunction with the Automated Trading 2009 conference organized by the Technical Analyst magazine.  Please see details &lt;a href="http://www.technicalanalyst.co.uk/training/pairs-trading.htm"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-6638795298173825912?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/6638795298173825912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=6638795298173825912' title='63 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/6638795298173825912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/6638795298173825912'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/05/my-pairs-trading-workshop-in-london.html' title='My pairs trading workshop in London'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>63</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-8697111353773450297</id><published>2009-04-30T20:19:00.002-04:00</published><updated>2009-04-30T20:41:50.009-04:00</updated><title type='text'>Seasonal trades in natural gas and gasoline futures</title><content type='html'>In my &lt;a href="http://www.amazon.com/dp/0470284889?tag=quantitativet-20&amp;amp;camp=14573&amp;amp;creative=327641&amp;amp;linkCode=as1&amp;amp;creativeASIN=0470284889&amp;amp;adid=1GT0VH3JCJNWJBE398XJ&amp;amp;"&gt;book&lt;/a&gt;, I mentioned 2 seasonal trades in natural gas and gasoline futures that have been consistently profitable for 14 years. (Mentioned &lt;a href="http://epchan.blogspot.com/2007/04/hedging-isnt-always-better.html"&gt;here&lt;/a&gt; and &lt;a href="http://epchan.blogspot.com/2007/04/recap-gasoline-futures-seasonal-trade.html"&gt;here&lt;/a&gt; also.) And not only in backtest: I paper-traded them in 2006, and actually traded them in 2007-8, and all 3 years were profitable. How did they fare in this recession year? Quite poorly.&lt;br /&gt;&lt;br /&gt;Depending on your exact entry and exit points, the gasoline trade lost about $2,500 per contract of RB. The natural gas trade lost about $7,700 per contract of NG.&lt;br /&gt;&lt;br /&gt;You may have heard that natural gas price is at a 6-year low. In fact, we are not seeing any increase in industrial demand for natural gas. Apparently, somebody has forgotten to tell the nation's industrialists that an economic recovery is supposed to be under way.&lt;br /&gt;&lt;br /&gt;Will I enter into these seasonal trades again next year? You bet I will.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-8697111353773450297?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/8697111353773450297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=8697111353773450297' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8697111353773450297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8697111353773450297'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/04/seasonal-trades-in-natural-gas-and.html' title='Seasonal trades in natural gas and gasoline futures'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-1971622997139482701</id><published>2009-04-19T09:44:00.004-04:00</published><updated>2009-04-19T10:09:49.572-04:00</updated><title type='text'>Fios and EC2</title><content type='html'>As an algorithmic trader, I am constantly in search of a better physical infrastructure where I can connect via the internet to my execution broker at the highest speed and with the least possibility of outage, and at a reasonable cost.&lt;br /&gt;&lt;br /&gt;To that end, I would like to mention &lt;a href="http://www22.verizon.com/Residential/FiOSInternet/FiOSvsCable/FiOSvsCable.htm"&gt;Fios&lt;/a&gt;, a fiber-optics service from Verizon with download speed of 50 Mpbs, upload speed is 20 Mbps, both faster than your typical T-1 line (1.5 Mbps). Furthermore, it costs only $45/month. Hey, even &lt;a href="http://krugman.blogs.nytimes.com/2009/03/23/incommunicado-probably/"&gt;Paul Krugman&lt;/a&gt; has installed it at his home!&lt;br /&gt;&lt;br /&gt;(I haven't tried it myself, and would like to hear from those of you who have and see if it is time to say goodbye to T-1.)&lt;br /&gt;&lt;br /&gt;And as I have &lt;a href="http://epchan.blogspot.com/2009/01/algorithmic-trading-technology-update.html"&gt;reported&lt;/a&gt; earlier, I am also constantly looking for a good cloud computing platform so that I can run more strategies without cluttering my office with computers. Finding one will obviate the need for any big investment in internet connectivity at the office.&lt;br /&gt;&lt;br /&gt;To that end, I have been trying out Amazon's EC2 for several months. I use it to run one of our strateiges, and I have to report that my experience is mixed.&lt;br /&gt;&lt;br /&gt;Firstly, if you are not an IT person, it does take a lot of time (8 person-hours?) to get set up and running, especially with their securities precautions. The learning curve is steep.&lt;br /&gt;&lt;br /&gt;Secondly, and more annoyingly, the instances sometimes fail to start properly, or fail to bundle properly. (Bundling means saving the software configuration for future use.) I am using Windows instances. Maybe those who use Linux instances have better experiences?&lt;br /&gt;&lt;br /&gt;Thirdly, and most annoyingly, when a new instance is started, Windows often cannot automatically synchronize its clock with time.windows.com or any other internet clock. As a result, the time is often wrong. Now, this may not be a big deal for usual office work. But when your automated trading strategy depends crucially on the time of the day, it can be quite fatal to your profit. If anyone has experienced a similar problem with Window's clock and know a fix, please let me know!&lt;br /&gt;&lt;br /&gt;Despite all these hassles, I am still running strategies on EC2, hoping that once EC2 get past the beta release, things will be better.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-1971622997139482701?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/1971622997139482701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=1971622997139482701' title='21 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1971622997139482701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1971622997139482701'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/04/fios-and-ec2.html' title='Fios and EC2'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>21</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-6658530107671328767</id><published>2009-04-12T12:07:00.002-04:00</published><updated>2009-04-12T12:27:31.427-04:00</updated><title type='text'>The upcoming Black Swan of Black Swans?</title><content type='html'>&lt;span class="post-author vcard"&gt;&lt;span class="fn"&gt;In a recent post (hat tip: Russell M.), Tyler Durden at &lt;a href="http://zerohedge.blogspot.com/2009/04/incredibly-shrinking-market-liquidity.html"&gt;Zero Hedge&lt;/a&gt; quoted a quant trader saying that &lt;/span&gt;&lt;/span&gt;"Anyone who is doing anything sensible right now is either losing money or is out of the market entirely", and that "liquidity deleveraging is approaching (if not already is at) critical levels", and finally the scariest part: "we have crossed into major statistically deviant territory, likely &lt;span style="font-weight: bold;"&gt;approaching a level that is 6 standard deviation away from the recent norms&lt;/span&gt;."&lt;br /&gt;&lt;br /&gt;He pointed out that NYSE weekly volume is running about 9% below 52 wk average. But this may not necessarily be the result of deliberate hedge fund deleveraging or increasing risk-aversion by quant traders. From my personal experience, the usual opportunities for mean-reversion have just markedly decreased in the last few months, with much of the cash sitting on the sideline. I believe that quant traders are still ready jump in at any time to provide liquidity should the market demands it. I don't think that the recent market condition portends a 6-sigma event, but if one should occur,  it may actually be a great profit opportunity for many short-term mean-reversion traders just as in those past 6-sigma events.&lt;br /&gt;&lt;span class="post-author vcard"&gt;&lt;span class="fn"&gt; &lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-6658530107671328767?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/6658530107671328767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=6658530107671328767' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/6658530107671328767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/6658530107671328767'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/04/upcoming-black-swan-of-black-swans.html' title='The upcoming Black Swan of Black Swans?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-1784842031130327716</id><published>2009-03-27T14:10:00.003-04:00</published><updated>2009-03-27T14:17:31.102-04:00</updated><title type='text'>A reader comments on trading using Excel VBA and Factor Model</title><content type='html'>Thoughtful comments from a reader John S. from the UK on his experience with trading technology and models:&lt;br /&gt;&lt;br /&gt;"I have been developing my own personal automatic trading systems using Excel VBA and based on rules I have developed over the years as an active private trader investor using both technical and fundamental data analysis.&lt;br /&gt;&lt;br /&gt;One of the key merits in adopting an automatic trading system approach that has helped me is to avoid the temptation for manual interference and thereby improving profitability by maintaining consistency. I have found the challenge of developing a successful system very rewarding from a personal perspective as I recognise that there are many that have tried and failed. However one problem I have encountered is my ongoing desire to regularly modify and improve the system which I have found can become counter productive as there is a real danger that system development becomes an end in itself! I just can't seem to stop tinkering as soon as I come up with a new idea or feature!&lt;br /&gt;&lt;br /&gt;One advantage of using Excel VBA that I have found is that it is inherently flexible as it facilitates the processing of data which can be important especially when using fundamental data as part of the system. In this respect I recognise that every trader is trying to build in an edge that will make the system more profitable. I have noticed that many traders seem to only focus on price by trying to seek an edge by looking at special indicators or combination of indicators etc. Combining price data analysis with a Factor Model approach is a challenge which is ideally suited Excel VBA as it can be easily used to process both fundamental and macroeconomic data into a form that can be integrated with price data analysis.&lt;br /&gt;&lt;br /&gt;I recognise from your book that Matlab is more powerful than Excel VBA and may be just as flexible in integrating fundamental and macroeconomic data but I just wanted to draw your attention to benefits I have found using Excel VBA which may suit those who like myself are more comfortable in using Excel VBA and are reluctant to change. Other features that can be exploited that I have found helpful when back testing are automatically producing Price Charts that incorporate Entry and Exit points which provides visual reassurance that the system is working as intended as well as generating automatic Word reports recording key output for future reference.&lt;br /&gt;&lt;br /&gt;I am sorry if I sound too much like an advert for Microsoft!"&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-1784842031130327716?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/1784842031130327716/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=1784842031130327716' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1784842031130327716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1784842031130327716'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/03/reader-comments-on-trading-using-excel.html' title='A reader comments on trading using Excel VBA and Factor Model'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-8765104603384141773</id><published>2009-03-13T11:44:00.003-04:00</published><updated>2009-03-13T12:27:32.535-04:00</updated><title type='text'>Mean-reversion is getting stronger</title><content type='html'>As I mentioned in various previous blog posts, (e.g. see &lt;a href="http://epchan.blogspot.com/2008/12/enduring-profitability-of-mean.html"&gt;here&lt;/a&gt;), I believe mean-reversion strategies have been performing very well in the last year. Now here is an &lt;a href="http://marketsci.wordpress.com/2009/02/12/short-term-mean-reversion-becoming-stronger-part-ii-the-why/"&gt;article&lt;/a&gt; (hat tip: Laurence) that provides concrete analysis to support this hypothesis. In fact, the author points out that most of the mean-reversion in recent years comes from the overnight close-to-open reversal.&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;a href="http://epchan.blogspot.com/2008/12/enduring-profitability-of-mean.html"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-8765104603384141773?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/8765104603384141773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=8765104603384141773' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8765104603384141773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8765104603384141773'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/03/mean-reversion-is-getting-stronger.html' title='Mean-reversion is getting stronger'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-954574937704467958</id><published>2009-02-26T17:34:00.004-05:00</published><updated>2009-02-26T18:32:12.753-05:00</updated><title type='text'>A new service for retail investors</title><content type='html'>Here is a new low-cost service called &lt;a href="http://www.alerts4all.com/"&gt;Alerts4All&lt;/a&gt; that offers technical trading signals for retail investors. You can, for example, have an alert sent to you every time a "Double bottom" pattern occurs.&lt;br /&gt;&lt;br /&gt;A much more advanced version of the service will be rolled out soon -- I saw a demo today where you can backtest your strategies online, combining different fundamental and/or technical variables as entry or exit signals. They also have some built-in models for you to adapt (e.g. a model based on &lt;a href="http://www.amazon.com/gp/product/0471733067?ie=UTF8&amp;amp;tag=quantitativet-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0471733067"&gt;The Little Book that Beats the Market&lt;/a&gt; by Joel Greenblatt.) More interestingly, you can look at other people's trading models and their historical and/or real-time performance.&lt;br /&gt;&lt;br /&gt;Matlab or &lt;a href="http://alphacet.com/"&gt;Alphacet&lt;/a&gt; it is not, but I think it will be quite useful for many retail traders. It might even be useful to professional traders who want a quick-and-dirty way to test out ideas.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-954574937704467958?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/954574937704467958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=954574937704467958' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/954574937704467958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/954574937704467958'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/02/new-service-for-retail-investors.html' title='A new service for retail investors'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-3645364978152453403</id><published>2009-02-22T11:22:00.002-05:00</published><updated>2009-02-22T11:34:26.529-05:00</updated><title type='text'>Trader tax proposal will be the death knell for statistical arbitrage</title><content type='html'>U.S. Congressman Peter DeFazio, introduced H.R. 1068: “Let Wall Street Pay for Wall Street's Bailout Act of 2009”, which aims to impose a 0.25% transaction tax on the “sale and purchase of financial instruments such as stock, options, and futures.&lt;br /&gt;&lt;br /&gt;Ladies and gentlemen, 0.25% is &lt;span style="font-weight: bold;"&gt;50 basis points&lt;/span&gt; round-trip. Few if any statistical arbitrage strategies can survive this transaction tax.&lt;br /&gt;&lt;br /&gt;And no, this is not "Wall Street paying for Wall Street's Bailout". This is small-time independent trader-entrepreneur like ourselves paying for Wall Street's Bailout.&lt;br /&gt;&lt;br /&gt;Furthermore, this tax will drain the US market of liquidity, and ultimately will cost every investor, long or short term, a far greater transaction cost than 0.25%.&lt;br /&gt;&lt;br /&gt;If you want to stop this insanity, please sign this &lt;a href="http://www.rallycongress.com/no2tradertax/1536/tell-congres-to-block-trader-tax/"&gt;online petition&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-3645364978152453403?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/3645364978152453403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=3645364978152453403' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3645364978152453403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3645364978152453403'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/02/trader-tax-proposal-will-be-death-knell.html' title='Trader tax proposal will be the death knell for statistical arbitrage'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-2660125305502670153</id><published>2009-02-18T12:01:00.002-05:00</published><updated>2009-02-18T12:03:20.718-05:00</updated><title type='text'>Finding seasonal spreads</title><content type='html'>I am pleased to introduce guest blogger Paul Teetor for today's article.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;----------&lt;br /&gt;&lt;br /&gt;Finding Seasonal Spreads&lt;br /&gt;&lt;br /&gt;By Paul Teetor&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt; A &lt;span style="font-style: italic;"&gt;seasonal spread&lt;/span&gt; is a spread which follows a regular pattern from year to year, such as generally falling in the Spring or generally rising in October.  To find seasonal spreads, I've been using &lt;span style="font-style: italic;"&gt;ANOVA&lt;/span&gt;, which stands for &lt;span style="font-style: italic;"&gt;analysis of variance&lt;/span&gt;.  ANOVA is a well-established statistical technique which, given several groups of data, will determine if the groups have different averages.  Importantly, it determines if the differences are &lt;span style="font-style: italic;"&gt;statistically significantly&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;I start with several years of spread data, compute the spread's daily changes, then group the daily changes by their calendar month, giving me 12 groups.  The ANOVA analysis tells me if the groups (months) have significantly different averages.  If so, I know the spread is seasonal since it is consistently up in certain months and consistently down in others.&lt;br /&gt;&lt;br /&gt;The beauty is that I can automate the process, scanning my entire database for seasonal spreads.  A recent scan identified the spread between crude oil (CL) and gasoline (RB), for example.  The initial ANOVA analysis indicated the CL/RB spread is very likely to be seasonal.  This bar chart of each month's average daily change demonstrates the seasonality.  (Click on the graph to enlarge it.)&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-left: 40px;"&gt;&lt;a href="http://quanttrader.info/public/images/cl.rb.barchart.png"&gt;&lt;img title="Barchart of average daily spread change.  Click to enlarge." style="border: 0px solid ; width: 380px; height: 285px;" alt="Barchart of average daily change for CL/RB spread" src="http://quanttrader.info/public/images/cl.rb.barchart.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The lines show the confidence interval for each month's average.  Notice how May and June are definitely "up" months because their confidence interval is entirely positive (above the axis).  Likewise, November and December are definitely "down" months.  For all other months, we cannot be certain because the confidence interval crosses zero, so the true average change could be either negative or positive.  The conclusion:  Be long the spread during May and June; be short during November and December.&lt;br /&gt;&lt;br /&gt;For more details, please see my &lt;a href="http://quanttrader.info/public/findingSeasonalSpreads.html"&gt;on-line paper&lt;/a&gt; regarding ANOVA and seasonal spreads.&lt;br /&gt;&lt;br /&gt;- Paul Teetor &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-2660125305502670153?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/2660125305502670153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=2660125305502670153' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/2660125305502670153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/2660125305502670153'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/02/finding-seasonal-spreads_18.html' title='Finding seasonal spreads'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-1036360938813887011</id><published>2009-02-12T18:19:00.002-05:00</published><updated>2009-02-12T18:36:01.352-05:00</updated><title type='text'>The limitation of Sharpe ratio</title><content type='html'>Just as one should not trust &lt;a href="http://epchan.blogspot.com/2009/02/peril-of-var.html"&gt;VaR&lt;/a&gt; completely, one should also beware of high Sharpe ratio strategies. As this &lt;a href="http://www.economist.com/finance/displaystory.cfm?story_id=12948575"&gt;Economist article&lt;/a&gt; pointed out, a strategy may have a high Sharpe ratio because it has so far been accumulating small gains quite consistently, but it could still be subject to a large loss when black-swan events strike.&lt;br /&gt;&lt;br /&gt;Personally, I am more comfortable with strategies that do the opposite: those that seldom generate any returns, but always earn a large profit when financial catastrophes occur.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-1036360938813887011?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/1036360938813887011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=1036360938813887011' title='21 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1036360938813887011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1036360938813887011'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/02/limitation-of-sharpe-ratio.html' title='The limitation of Sharpe ratio'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>21</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-7806088588151401882</id><published>2009-02-06T18:53:00.002-05:00</published><updated>2009-02-06T19:04:07.816-05:00</updated><title type='text'>The peril of VaR</title><content type='html'>This &lt;a href="http://www.theglobeandmail.com/servlet/story/RTGAM.20090130.wcover31/BNStory/National/home"&gt;Quebec pension fund&lt;/a&gt; lost some $25 billion due to non-bank asset-backed commercial paper (ABCP).  Their Value-at-Risk (VaR) model did not take into account liquidity risk. As usual, the quants got the blame. But can someone tell me a better way to value risk than to run historical simulations? Can we really build risk models on disasters we have not seen before and cannot imagine will happen?&lt;br /&gt;&lt;br /&gt;(Hat tip: Ray)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-7806088588151401882?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/7806088588151401882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=7806088588151401882' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/7806088588151401882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/7806088588151401882'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/02/peril-of-var.html' title='The peril of VaR'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-1560782960143176110</id><published>2009-02-01T08:11:00.003-05:00</published><updated>2009-02-01T08:22:14.554-05:00</updated><title type='text'>Kelly formula revisited</title><content type='html'>Some discussions on Kelly's formula with a reader Steven L:&lt;br /&gt;&lt;br /&gt;Q:&lt;br /&gt;&lt;blockquote&gt;"I am more than half way through your book and am stuck at a concept that I can't seem to find an answer in any other forum.&lt;br /&gt;&lt;br /&gt;I have read Ralph Vince's "Portfolio Management Formulas," which uses Kelly's formula to calculate an optimal "fraction" of the bankroll to bet on each trial. So a trader can calculate a fraction of his total trading account value to risk on each trade. What I am referring to is the so-called "fixed-fractional" trading. There exists an optimal fraction that will maximize the geometric growth rate of the trading equity, in theory anyway.&lt;br /&gt;&lt;br /&gt;However, in the money management chapter of your book, you use Kelly's formula to derive an optimal "leverage." This seems to be in conflict with what I learned from Ralph Vince, since leverage is usually great than unity and fraction is usually less than unity. I can't seem to make a connection between these two concepts. I have also seen the same optimal leverage formula in Lars Kestner's Quantitative Trading Strategies and asked the same question on some forums, but no one was able to give me a clear satisfactory answer. It would be greatly helpful if you can help me sort out the confusion."&lt;/blockquote&gt;A:&lt;br /&gt;&lt;br /&gt;I don't have Ralph Vince's book with me,  but if I recall correctly, his formulation is based on discrete bets  (win or lose, no intermediate outcome), much like horse-betting or in a  casino game. My approach, or rather, Professor Ed Thorp's approach, is  based on continuous finance, assuming that every second, your P&amp;amp;L could  fluctuatate in a Gaussian ("log-normal") fashion.&lt;br /&gt;&lt;br /&gt;For discrete bets where you could have lost all of your equity in one  bet, surely one should only bet a fraction of your total equity. For  continuous finance, there is very little chance one could have lost all  of the equity in one time period, due to the assumed log-normal  distribution of prices. Hence one should bet more than your equity, i.e.  use leverage.&lt;br /&gt;&lt;br /&gt;Q:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;In example 6.2 in your book, the portfolio consists of only long SPY, which has little chance of going to zero. So I can see how it is reasonable that you use the continuous finance approach and apply the optimal leverage to scale up the return.&lt;br /&gt;&lt;br /&gt;But let's assume that the portfolio consists of a single strategy that buys options. Suppose this strategy will lose most of the time due to time decay but will make profit once in a while due to black-swan events. I don't think it's a good idea to bet the entire portfolio equity on each trade for this strategy. Can you still apply the continuous finance approach in this case, since in reality trading is like making discreet bets? Should we expect the mean and variance of this strategy automatically result in an Optimal Leverage that is less than one? So that we actually need to risk a fraction of the account equity per trade?&lt;br /&gt;&lt;/blockquote&gt;A:&lt;br /&gt;&lt;br /&gt;The formula I depicted in the book is valid only if the P&amp;amp;L distributions are Gaussian. If one expects a fat-tailed distribution due to black-swan events, a different mathematical model needs to be used, though it can still be within the continuous finance framework. However, for simplicity's sake, if the distribution looks multinomial (e.g. high probability of "Win a lot" v "Lose a lot"), then you may model it with fractional betting just like a casino game.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-1560782960143176110?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/1560782960143176110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=1560782960143176110' title='36 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1560782960143176110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1560782960143176110'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/02/kelly-formula-revisited.html' title='Kelly formula revisited'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>36</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-1280601035287075758</id><published>2009-01-16T19:15:00.002-05:00</published><updated>2009-01-16T19:39:34.080-05:00</updated><title type='text'>Algorithmic Trading Technology Update</title><content type='html'>Lately a number of new (at least to me) technologies useful to the algorithmic trader came to my attention:&lt;br /&gt;&lt;br /&gt;1) Matlab2IB API&lt;br /&gt;&lt;br /&gt;I said in my book that it is difficult to use Matlab as an execution platform. As &lt;a href="http://www.maxdama.com/"&gt;Max&lt;/a&gt; has pointed out, this is no longer true. This inexpensive &lt;a href="http://www.exchangeapi.com/ProductOverview.htm"&gt;API&lt;/a&gt; connects Matlab to your Interactive Brokers' account. It allows you to retrieve historical data, get real-time quotes, and send orders. In other words, all the basic functions you need to create your own execution engine.&lt;br /&gt;&lt;br /&gt;2) R&lt;br /&gt;&lt;br /&gt;Many people (hat tip: Steve H.) know that &lt;a href="http://www.nytimes.com/2009/01/07/technology/business-computing/07program.html?partner=permalink&amp;amp;exprod=permalink"&gt;R&lt;/a&gt; is an open-source (i.e. free) alternative to Matlab. I find that there is also an &lt;a href="http://cran.r-project.org/web/packages/IBrokers/vignettes/IBrokers.pdf"&gt;API&lt;/a&gt; that connects R to Interactive Brokers, though I have not tried it myself.&lt;br /&gt;&lt;br /&gt;3) Trade Ideas&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.trade-ideas.com/"&gt;Trade Ideas&lt;/a&gt; (hat tip: Russell M.) is a complete automated trading platform that provides connections to different brokerages (scottrade, IB, TD Ameritrade, etc.)&lt;br /&gt;&lt;br /&gt;4) Amazon EC2 cloud computing platform&lt;br /&gt;&lt;br /&gt;Running out of PC's to run your myriad strategies? Try Amazon's &lt;a href="http://aws.amazon.com/ec2/"&gt;EC2&lt;/a&gt; cloud computing platform. For a modest hourly fee, you get access to an instance of either Linux or Windows environment, and you can add as many instances as you want. The connection speed is supposed to be at least 10x  T-1 line, well-suited to high frequency traders . &lt;a href="http://www.maxdama.com/2008/08/amazon-ec2-re-test.html"&gt;Here&lt;/a&gt; is some other performance benchmarks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-1280601035287075758?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/1280601035287075758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=1280601035287075758' title='21 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1280601035287075758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1280601035287075758'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/01/algorithmic-trading-technology-update.html' title='Algorithmic Trading Technology Update'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>21</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-9061446931547462125</id><published>2009-01-12T13:58:00.002-05:00</published><updated>2009-01-12T14:08:16.019-05:00</updated><title type='text'>Hedge funds move to "easy-to-understand liquid strategies"</title><content type='html'>See this interesting &lt;a href="http://www.ft.com/cms/s/0/4d0e65a8-e009-11dd-9ee9-000077b07658.html"&gt;article&lt;/a&gt; (registration required) on FT on the state of the hedge fund industry. Paul Tudor Jones, Citadel, and Fortress Investment Group are all said to be moving to "easy-to-understand liquid strategies", otherwise known as "statistical arbitrage".&lt;br /&gt;&lt;br /&gt;(By the way, I have been urging traders to do just that in my book.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-9061446931547462125?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/9061446931547462125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=9061446931547462125' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/9061446931547462125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/9061446931547462125'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/01/hedge-funds-move-to-easy-to-understand.html' title='Hedge funds move to &quot;easy-to-understand liquid strategies&quot;'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-3451285801478689774</id><published>2009-01-09T12:18:00.002-05:00</published><updated>2009-01-09T12:34:25.897-05:00</updated><title type='text'>How is the job market for quants these days?</title><content type='html'>Felix Salmon claimed in &lt;a href="http://www.portfolio.com/views/blogs/market-movers/2009/01/06/quants-what-are-they-doing-these-days"&gt;this post&lt;/a&gt; (hat tip: J. Rigg) that the quant job market is alive and well. However, I haven't heard much from the usually diligent headhunters in the last few months, which doesn't bode well. Maybe some of our readers can comment on the current state of the quant job market?&lt;br /&gt;&lt;br /&gt;In that same post, Felix wondered whether to incorporate the extraordinary period of 2008 as part of backtesting data. Actually, I don't see much of a problem here -- of course one should include 2008. The only reason a trading model would have performed poorly in 2008, as opposed to 2006, 2007 or 2009, would be that its parameters are fitted too tightly to historical data. If you try out some &lt;a href="http://epchan.blogspot.com/2008/08/more-on-parameterless-trading-model.html"&gt;parameterless trading models&lt;/a&gt; like I advocated, 2008 is not that unusual except for its higher volatility.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-3451285801478689774?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/3451285801478689774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=3451285801478689774' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3451285801478689774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3451285801478689774'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2009/01/how-is-job-market-for-quants-these-days.html' title='How is the job market for quants these days?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-543328946697563262</id><published>2008-12-09T15:14:00.000-05:00</published><updated>2008-12-09T15:22:45.447-05:00</updated><title type='text'>The enduring profitability of mean-reversion strategies</title><content type='html'>Some readers have doubts about my &lt;a href="http://epchan.blogspot.com/2008/10/how-does-financial-crisis-affect.html"&gt;assertion&lt;/a&gt; that mean-reversal models continue to be very profitable during this whole year of financial and economic disasters. So I backtested the mean-reversion strategy in Example 3.8 of my &lt;a href="http://www.amazon.com/dp/0470284889?tag=quantitativet-20&amp;amp;camp=14573&amp;amp;creative=327641&amp;amp;linkCode=as1&amp;amp;creativeASIN=0470284889&amp;amp;adid=0MX45PMCWGJXANAJGYDW&amp;amp;"&gt;book&lt;/a&gt; with the most recent one-year SP1500 data. Without transaction cost, the Sharpe ratio is 4.8. Even after subtracting 10 b.p. round-trip transaction cost, it is still at 3.5.&lt;br /&gt;&lt;br /&gt;Since the strategy was constructed over a year ago while I was writing the book, this most recent backtest is done on unseen data, with absolutely no look-ahead bias!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-543328946697563262?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/543328946697563262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=543328946697563262' title='31 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/543328946697563262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/543328946697563262'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/12/enduring-profitability-of-mean.html' title='The enduring profitability of mean-reversion strategies'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>31</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-8393796533845749448</id><published>2008-12-02T10:27:00.001-05:00</published><updated>2008-12-02T10:37:39.495-05:00</updated><title type='text'>Josh Brolin on day trading</title><content type='html'>Actor Josh Brolin ("Milk", "W", "No Country for Old Man") said on Charlie Rose that his trading portfolio had a 57% return this year. His strategy is based on entering on reversal from a trend. Sounds pretty reasonable to me: maybe some of our readers can backtest this.&lt;br /&gt;&lt;br /&gt;Below is the full interview, beginning with Sean Penn, then goes on to Gus Van Sant, then finally Josh Brolin mentioned his day-trading at the very end of the 1 hour show.&lt;br /&gt;&lt;br /&gt;&lt;embed allowfullscreen="true" allowscriptaccess="always" src="http://video.google.com/googleplayer.swf?showShareButtons=true&amp;amp;docId=-2093833999501962853%3A170000%3A3191000&amp;amp;hl=en" style="width: 400px; height: 326px;" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;Interested? He is starting a multi-million dollar hedge fund to manage your money.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-8393796533845749448?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/8393796533845749448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=8393796533845749448' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8393796533845749448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8393796533845749448'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/12/josh-brolin-on-day-trading.html' title='Josh Brolin on day trading'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-460411242575722090</id><published>2008-11-07T10:07:00.000-05:00</published><updated>2008-11-07T10:14:22.876-05:00</updated><title type='text'>My book on Quantitative Trading is published</title><content type='html'>My book on Quantitative Trading has been published and is now available from &lt;a href="http://www.amazon.com/dp/0470284889?tag=quantitativet-20&amp;amp;camp=14573&amp;amp;creative=327641&amp;amp;linkCode=as1&amp;amp;creativeASIN=0470284889&amp;amp;adid=13902YA02NJTS0PKS84K&amp;amp;"&gt;Amazon.com&lt;/a&gt;. Many thanks to all of you for your ideas, comments, and support!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-460411242575722090?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/460411242575722090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=460411242575722090' title='48 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/460411242575722090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/460411242575722090'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/11/my-book-on-quantitative-trading-is.html' title='My book on Quantitative Trading is published'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>48</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-9016327142228065093</id><published>2008-10-28T10:58:00.003-04:00</published><updated>2008-10-28T11:21:46.795-04:00</updated><title type='text'>Some riskless profit, and why it exists</title><content type='html'>Numerous commentators have pointed out the enormous yield spread between agencies debt (Fannie&lt;a href="http://www.bloomberg.com/apps/quote?ticker=FNMGVN5:IND"&gt;&lt;/a&gt;/Freddie) and US Treasuries.&lt;br /&gt;&lt;br /&gt;Here are some links kindly provided by a reader: &lt;a href="http://www.bloomberg.com/apps/quote?ticker=FNMGVN10:IND"&gt;10 yr Fannie/Treasury&lt;/a&gt;, &lt;a href="http://www.bloomberg.com/apps/quote?ticker=FNMGVN5:IND"&gt;5 yr Fannie/Treasury&lt;/a&gt;, &lt;a href="http://www.bloomberg.com/apps/quote?ticker=FHMGVN10:IND"&gt;10 yr Freddie/Treasury&lt;/a&gt;, and &lt;a href="http://www.bloomberg.com/apps/quote?ticker=FHMGVN5:IND"&gt;5 yr Freddie/Treasury&lt;/a&gt;.&lt;br /&gt;&lt;p class="MsoNormal"&gt;Currently their spreads are above 150 bp. Since the US government has nationalized Fannie and Freddie, this 150 bp is a riskless profit. As the blog &lt;a href="http://accruedint.blogspot.com/2008/10/empire-doesnt-seen-leverage-as-any.html"&gt;Accrued Interest&lt;/a&gt; has pointed out, one reason this riskless profit exists is hedge fund deleveraging: nobody has the risk appetite to arbitrage this spread at a meaningful scale.  &lt;a href="http://blogs.cfr.org/setser/2008/10/25/one-easy-thing-china-could-do-to-help-stabilize-global-markets-buy-agencies/"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;a href="http://blogs.cfr.org/setser/2008/10/25/one-easy-thing-china-could-do-to-help-stabilize-global-markets-buy-agencies/"&gt;Brad Setser&lt;/a&gt;, a blogger at the Council of Foreign Relations, suggests that the Chinese government, who does have a lot of cash to benefit from this high yield, should go ahead and buy up these agencies debt. However, if you read the Chinese blogs and online comments, there is enormous internal pressure for the government to spend some of this money on infrastructure projects, social security, health care, etc., so I doubt that the Chinese government will have stabilizing the US mortgage market at the top of its agenda. As a result, arbitrageurs out there should have no fear that this opportunity will disappear any time soon.&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Times New Roman;font-size:100%;color:black;"   &gt;&lt;span style="font-size:12;"&gt;&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-9016327142228065093?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/9016327142228065093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=9016327142228065093' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/9016327142228065093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/9016327142228065093'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/10/some-riskless-profit-and-why-it-exists.html' title='Some riskless profit, and why it exists'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-7662385002117272132</id><published>2008-10-20T09:45:00.001-04:00</published><updated>2008-10-20T10:32:20.027-04:00</updated><title type='text'>How does the financial crisis affect quantitative trading?</title><content type='html'>Now that we are reasonably sure the financial world is not coming to an end yet, it is reasonable to ask how quantitative strategies have been faring under this extreme market stress. Despite reports of massive hedge fund deleveraging and negative YTD returns, I believe quantitative strategies, especially statistical arbitrage, have survived the period relatively unscathed. But here are a few of my thoughts:&lt;br /&gt;&lt;br /&gt;1) The paltry 10% annual returns that a mediocre statarb fund can deliver is suddenly looking pretty good when the risk-free rate is under 1% and a prolonged bear market is on the horizon.&lt;br /&gt;&lt;br /&gt;2) Mean-reversal models continue to beat momentum models in this crisis environment, as in previous crisis environments. This is not surprising because market returns have completely dominated specific returns, and of course market returns have been highly mean-reverting lately.&lt;br /&gt;&lt;br /&gt;3) Models involving shorts are under some tumoil because of regime-change induced by new and ever-changing short-sale regulations. (For a while, I even have difficulties locating SPY for hedging purposes!)&lt;br /&gt;&lt;br /&gt;4)  Models are generally trained on data with far lower volatility than is recently realized. (Even incorporting VIX in a model does not guarantee that it can match realized volatility any better.)&lt;br /&gt;As a result, P&amp;amp;L's fluctuations are also much higher than usual,  which induces deleveraging as a risk-management measure, which drains liquidity from the market, which in turn leads to still higher volatility. The usual viscious cycle.&lt;br /&gt;&lt;br /&gt;5) Political risks in an election year have further reduced leverage and increased volatility. What if there is an assassination? What if the wrong party got elected? What if the paper-trailess electronic voting machines cause another dispute for a month? The nightmares will continue at least until the morning of Nov 5.&lt;br /&gt;&lt;br /&gt;6) Normally, lack of liquidity in the market is good for statarb models since they profit from renting out temporary liquidity. However, this profitability assumes that there are buyers of last resort for the market: the long-term investors, the mutual funds, Warren Buffet, etc. When they are absent, statarb investors can be left holding the bag. Fortunately, Warren Buffet &amp;amp; Co. has indeed stepped in and we statarb traders can breathe a sigh of relief.&lt;br /&gt;&lt;br /&gt;7) I have been paying particular attention to 3 websites since the crisis began in order to judge whether I should return to my normal leverage: the &lt;a href="http://www.bloomberg.com/apps/quote?ticker=.TEDSP%3AIND"&gt;Ted spread&lt;/a&gt; (I am waiting for it to return to below 2), the &lt;a href="http://calculatedrisk.blogspot.com/"&gt;&lt;span style="text-decoration: underline;"&gt;Calculated Risk&lt;/span&gt;&lt;/a&gt; blog, and &lt;a href="http://krugman.blogs.nytimes.com/"&gt;Paul Krugman&lt;/a&gt;'s blog. This crisis is caused by panic in the credit market, so we should look for credit market returning to normal before declaring victory. The VIX? Not so much because I believe it is backward-looking in this environment.&lt;br /&gt;&lt;br /&gt;8) Watching Fannie, Freddie, Lehman, AIG, WaMu, Wachovia, Iceland, and the initial bailout bill failed feels like reading Chapter 8 of &lt;span style="font-style: italic;"&gt;Harry Potter and the Deathly Hallows&lt;/span&gt;: "The Ministry has fallen. Scrimgeour is dead. They are coming." The Dark Lord is taking over our economy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-7662385002117272132?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/7662385002117272132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=7662385002117272132' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/7662385002117272132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/7662385002117272132'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/10/how-does-financial-crisis-affect.html' title='How does the financial crisis affect quantitative trading?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-9144852041067988991</id><published>2008-09-29T19:35:00.001-04:00</published><updated>2008-09-29T19:41:17.700-04:00</updated><title type='text'>Webinar on algorithmic trading system</title><content type='html'>Recently I participated in a webinar on using an algorithmic trading system called Alphacet Discovery. A link to the webinar can be found &lt;a href="http://alphacet.com/site/webinar/092008/webinar.shtml"&gt;here&lt;/a&gt;. Some previous research using this system was described &lt;a href="http://epchan.blogspot.com/2008/05/machine-learning-regime-switching.html"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-9144852041067988991?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/9144852041067988991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=9144852041067988991' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/9144852041067988991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/9144852041067988991'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/09/webinar-on-algorithmic-trading-system.html' title='Webinar on algorithmic trading system'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-3318604895942990145</id><published>2008-09-08T20:03:00.001-04:00</published><updated>2008-09-08T20:37:55.638-04:00</updated><title type='text'>Index change strategy</title><content type='html'>Some years ago, I traded a simple index change strategy: buying stocks to be added to the SP500 index at the market open right after the index change announcement and exiting the position at the close, and similarly shorting stocks to be deleted. The results were mediocre at best.&lt;br /&gt;&lt;br /&gt;However, &lt;a href="http://www.ft.com/cms/s/0/8a737062-7d3c-11dd-8d59-000077b07658.html"&gt;new research&lt;/a&gt; by University of Edinburgh Business School suggests that a similar strategy works well for FTSE350 stocks (Hat tip to J. Rigg for the link). The trick is to predict which stocks are to be added or deleted 30 days before the announcement ("review date"), buy/sell the stocks, and close out the positions just before the review date.&lt;br /&gt;&lt;br /&gt;Since the criteria for inclusion in the FTSE index is &lt;a href="http://en.wikipedia.org/wiki/FTSE_100_Index"&gt;well-defined&lt;/a&gt; (and primarily based on market capitalization), it should not be hard for the interested traders to make their own predictions and profit from this rebalancing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-3318604895942990145?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/3318604895942990145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=3318604895942990145' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3318604895942990145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3318604895942990145'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/09/index-change-strategy.html' title='Index change strategy'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-9088012147801762472</id><published>2008-08-25T13:13:00.002-04:00</published><updated>2008-08-25T13:28:55.785-04:00</updated><title type='text'>Behavioral finance we can all use</title><content type='html'>In their new book "&lt;a href="http://www.amazon.com/gp/product/0300122233?ie=UTF8&amp;amp;tag=quantitativet-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0300122233"&gt;Nudge: Improving Decisions About Health, Wealth and Happiness&lt;/a&gt;", U of Chicago economist Richard Thaler (of behavioral finance fame) and Harvard law professor Cass Sunstein gave a few pieces of personal finance advice, one of which coincided with my point in a &lt;a href="http://epchan.blogspot.com/2008/07/what-are-we-hedging-here.html"&gt;previous post&lt;/a&gt;: buy insurance with the largest deductible available. The others are: don't invest much in your employer's stock, don't pay points on mortages, and don't pay for extended warranties. The book is reviewed in the &lt;a href="http://www.nytimes.com/2008/08/24/books/review/Friedman-t.html?ex=1377403200&amp;amp;en=ca573ccb7c540361&amp;amp;ei=5124&amp;amp;partner=permalink&amp;amp;exprod=permalink"&gt;NYT Book Review&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-9088012147801762472?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/9088012147801762472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=9088012147801762472' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/9088012147801762472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/9088012147801762472'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/08/behavioral-finance-we-can-all-use.html' title='Behavioral finance we can all use'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-7278750945682966118</id><published>2008-08-22T12:41:00.001-04:00</published><updated>2008-08-22T12:55:02.872-04:00</updated><title type='text'>Predicting SP500 futures using investor sentiment</title><content type='html'>Ronald Domingues, an economics graduate student, has done an interesting study of how well a group of qualified investors with superior skills can predict the movement of the  SP500 index. This group of qualified investors are selected by their track records of making correct predictions, and as a result of submitting their predictions going forward, they are eligible to be notified of the average predictions of other qualified investors, thus enabling them to make a better informed investment decision.&lt;br /&gt;&lt;br /&gt;In other words, the elite will benefit from the collective wisdom of other elites -- sort of like the real world, isn't it?&lt;br /&gt;&lt;br /&gt;How well does it work in practice? Well, they correctly predicted whether SP500 index will go up, down, or flat, a whopping 65.2% of the time. The details can be found on his &lt;a href="http://www.ronalddomingues.com/index.php?lang=1&amp;amp;s=g100&amp;amp;id=91"&gt;website&lt;/a&gt;, where you can also sign up to see if you can join the elite.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-7278750945682966118?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/7278750945682966118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=7278750945682966118' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/7278750945682966118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/7278750945682966118'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/08/predicting-sp500-futures-using-investor.html' title='Predicting SP500 futures using investor sentiment'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-6406243773315833275</id><published>2008-08-16T09:36:00.003-04:00</published><updated>2008-08-16T10:19:26.908-04:00</updated><title type='text'>More on parameterless trading model</title><content type='html'>I have written &lt;a href="http://epchan.blogspot.com/2008/05/parameterless-trading-models.html"&gt;before&lt;/a&gt; that my ideal trading model is one that has no parameters, and what ways there are to accomplish this. Actually, I forgot to mention that a &lt;a href="http://epchan.blogspot.com/2007/10/how-mean-reversion-strategy-performed.html"&gt;trading strategy&lt;/a&gt; proposed by Dr. Andrew Lo discussed previously is in fact parameterless, and the technique is so general that it can be applied to any mean-reverting strategy.&lt;br /&gt;&lt;br /&gt;The technique is simply this: maintain a long (or short) portfolio with capital proportional to the distance between a supposedly mean-reverting measure and its long-term mean value.&lt;br /&gt;&lt;br /&gt;For e.g. if you are pair-trading PEP vs KO, and you believe that the spread between PEP and KO is mean-reverting, then this spread is the mean-reverting measure you should employ.&lt;br /&gt;&lt;br /&gt;As the spread moves away from its mean, keep buying (or shorting) the spread in equal dollar amount. And as the spread reverts, keep selling (or buying) the spread in the same dollar amount. What this dollar amount should be depends on: a) the total buying power you possess, b) the expected maximum deviation of the spread from its mean, and c) how often you intend to buy/short. Note that point c is not a parameter: it is arbitrary and limited only by transaction costs, technology, and other operational issues. As for the expected maximum deviation, it can be obtained by observing the history of the spread since inception.&lt;br /&gt;&lt;br /&gt;This scheme thus obviates the need for entry or exit thresholds, and with them, the possibility of data-snooping bias. (You may still want to impose an entry threshold based on transaction cost consideration - but that would not count as a free parameter.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-6406243773315833275?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/6406243773315833275/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=6406243773315833275' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/6406243773315833275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/6406243773315833275'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/08/more-on-parameterless-trading-model.html' title='More on parameterless trading model'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-8014338790136681270</id><published>2008-07-18T14:51:00.000-04:00</published><updated>2008-07-18T15:34:47.182-04:00</updated><title type='text'>What are we hedging here?</title><content type='html'>I wrote a blog &lt;a href="http://epchan.blogspot.com/2007/04/hedging-isnt-always-better.html"&gt;article&lt;/a&gt; last year on why hedging isn't always better. The more I try to practice what I preached, the more I am convinced that most of the time, we are hedging the wrong risks.&lt;br /&gt;&lt;br /&gt;Hedging should &lt;span style="font-style: italic;"&gt;not &lt;/span&gt;be about reducing volatility in our portfolio. If reducing overall volatility is our goal, we should simply reduce leverage, as I have argued in my previous article. If volatility in a particular industry group is too much for us, (banks? brokerages? energy stocks?), just reduce the capital allocation in that group.&lt;br /&gt;&lt;br /&gt;Sure, if hedging does increase your overall Sharpe ratio, go ahead and hedge to your heart's content. Kelly's formula tells us that the higher the Sharpe ratio, the higher the compounded growth rate of your wealth. The problem is, many of us hedge even when doing so do not clearly increase Sharpe ratio. A further problem is that we can achieve this maximum growth rate only if we use the high leverage recommended by Kelly's formula, but this leverage often exceeds what our brokerage would allow us. It is not clear that it is beneficial to waste our buying power on the hedge if we can only operate at sub-optimal leverage.&lt;br /&gt;&lt;br /&gt;To me, hedging should be about eliminating the risk of ruin (equity reduced to zero) due to unexpected, catastrophic events. (Many sophisticated hedge fund managers cannot even meet this simple survival criterion, giving lie to the whole notion of  "hedge" funds.)&lt;br /&gt;&lt;br /&gt;For instance, let's assume that the worst one-day drop in the market index can be 20%. Furthermore, let's assume that you are able to endure a 30% reduction in equity during one trading period. Then you should not be afraid to have a net long exposure of 150% of your equity. In other words, not only should you not hedge, but you should go ahead and leverage your long-only portfolio 1.5 times.&lt;br /&gt;&lt;br /&gt;I believe this notion of hedging, or buying insurance, extends to all spheres of our lives. We should avoid ruin, not mere losses. Otherwise, you will be paying too much on the insurance policy over the long term. In other words,  max out the deductible on your insurance policy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-8014338790136681270?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/8014338790136681270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=8014338790136681270' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8014338790136681270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8014338790136681270'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/07/what-are-we-hedging-here.html' title='What are we hedging here?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-4434461296162858782</id><published>2008-06-26T15:40:00.001-04:00</published><updated>2008-06-26T16:05:14.491-04:00</updated><title type='text'>Have oil stocks exhausted their run?</title><content type='html'>&lt;h4 style="font-weight: normal;"&gt;Floyd Norris, the chief financial correspondent of The New York Times, suggested in his &lt;a href="http://norris.blogs.nytimes.com/2008/06/26/the-beginning-of-the-end-for-high-oil-prices/"&gt;blog&lt;/a&gt; today that we are looking at "The Beginning of the End for High Oil Prices". What is the basis of his optimism? He argued that oil stocks have been lagging oil prices lately, and therefore equity investors must believe that high oil prices are causing demand destruction which will eventually reduce oil prices and oil companies earnings.&lt;br /&gt;&lt;/h4&gt;I beg to differ.&lt;br /&gt;&lt;br /&gt;Look at the long-standing spread relation between an oil stock ETF and an oil commodity ETF, e.g. XLE vs USO, which I have been commenting on and tracking since &lt;a href="http://epchan.blogspot.com/2006/10/arbitrage-trade-between-energy-stocks.html"&gt;October 2006&lt;/a&gt;. At the moment, this spread is within 1.4 standard deviations of its historical value. See my table &lt;a href="http://www.epchan.com/subscription/spread.htm"&gt;here&lt;/a&gt; (subscription required).  In other words, oil prices and oil stock prices are at approximately their long-time historical average. I would hardly call that suggestive of the beginning of the end.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-4434461296162858782?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/4434461296162858782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=4434461296162858782' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/4434461296162858782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/4434461296162858782'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/06/have-oil-stocks-exhausted-their-run.html' title='Have oil stocks exhausted their run?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-5195378212612899413</id><published>2008-06-23T06:28:00.000-04:00</published><updated>2008-06-23T06:34:02.342-04:00</updated><title type='text'>Futures markets have no effect on spot prices</title><content type='html'>NYTimes columnist and Princeton economist Paul Krugman has previously (see my link &lt;a href="http://epchan.blogspot.com/2008/05/are-high-oil-prices-due-to-hedge-fund.html"&gt;here&lt;/a&gt;) argued that the trading of oil futures should have no effect on spot oil prices, contrary to what many politicians and pundits think. &lt;a href="http://krugman.blogs.nytimes.com/2008/06/21/calvo-on-commodities/"&gt;Here&lt;/a&gt; is his latest elaboration of that argument.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-5195378212612899413?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/5195378212612899413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=5195378212612899413' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5195378212612899413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5195378212612899413'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/06/futures-markets-have-no-effect-on-spot.html' title='Futures markets have no effect on spot prices'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-5478598931212356531</id><published>2008-06-21T11:33:00.000-04:00</published><updated>2008-06-21T11:49:08.684-04:00</updated><title type='text'>Statistical electoral vote predictor: Update</title><content type='html'>For readers who have been tracking the &lt;a href="http://epchan.blogspot.com/2008/06/statistical-model-predicts-mccain.html"&gt;Gott and Colley&lt;/a&gt; presidential electoral vote prediction, they will notice a sudden switch over to a predicted Obama victory in the last few days. That is because polls from OH, VA and MO are now available -- surprising because the 3 states are not hitherto known for their Democratic leanings.&lt;br /&gt;&lt;br /&gt;It seems to me that, after all, the stability of prediction at this early date is quite questionable due to the paucity of state polls, a point already made by Dr. Colley.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-5478598931212356531?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/5478598931212356531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=5478598931212356531' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5478598931212356531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5478598931212356531'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/06/statistical-electoral-vote-predictor.html' title='Statistical electoral vote predictor: Update'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-5961988145017362474</id><published>2008-06-12T12:46:00.001-04:00</published><updated>2008-06-12T14:37:20.777-04:00</updated><title type='text'>Statistical model predicts a McCain victory?</title><content type='html'>There has been a lot of &lt;a href="http://www.nytimes.com/2008/06/06/opinion/06tyson.html?pagewanted=all"&gt;buzz&lt;/a&gt; lately about a simple statistical model proposed by astrophysicists Prof. Gott and Dr. Colley that uses the median polls of each state to predict the November electoral vote. (For our un-American readers, the electoral vote is what determines the outcome of a general election, not the popular vote, in case the nightmarish 2000 election has not already drilled this fact into the world's collective consciousness.)&lt;br /&gt;&lt;br /&gt;Dr. Colley has set up a &lt;a href="http://www.colleyrankings.com/election2008/"&gt;website&lt;/a&gt; to track daily such polls to gauge the mood of the states. The authors have tested this method on the 2004 election, as well as numerous sporting events outcomes, and found it to be highly predictive.&lt;br /&gt;&lt;br /&gt;Right now, they are betting on a McCain victory.&lt;br /&gt;&lt;br /&gt;But there is one caveat that many bloggers have pointed out, and it is the same caveat that &lt;a href="http://epchan.blogspot.com/2006/11/is-political-futures-markets-really.html"&gt;I have previously applied to&lt;/a&gt; the predictive accuracy of political futures market such as intrade.com. The caveat is this: polls (and futures market) change with time. And at different times, they predict different election outcomes. So for example, at this point (June 2008), the polls predict a McCain victory, while the futures market at intrade.com predicts an Obama victory. Who is right?&lt;br /&gt;&lt;br /&gt;The answer is: neither. As Dr. Colley has explained to me, no backtest as far back as the June of an election year has been conducted. (Their research was based on polls from September onwards.) So we do not know if the June polling prediction has any accuracy. Similarly, as I pointed out before, the futures market can swing violently even on Election Day, even in the last hours of an election.&lt;br /&gt;&lt;br /&gt;One advantage of the Gott and Colley method though, is that the predictions resulting from median poll statistics are remarkably stable over time. In 2004, there was very little movement in the electoral tally from September through election day. Extrapolating this result, we can be somewhat more confident of their prediction vs. Intrade.com's, even at this early date.&lt;br /&gt;&lt;br /&gt;And in any case, I have observed that the political futures markets are highly mean-reverting, implying that the current large 20 points spread between the Obama and McCain futures is destined to decrease in the coming months.&lt;br /&gt;&lt;br /&gt;As an arbitrage trader, I have therefore proceeded to short the Obama future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-5961988145017362474?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/5961988145017362474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=5961988145017362474' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5961988145017362474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5961988145017362474'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/06/statistical-model-predicts-mccain.html' title='Statistical model predicts a McCain victory?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-6155564774666529236</id><published>2008-05-28T09:55:00.002-04:00</published><updated>2008-05-28T09:59:56.105-04:00</updated><title type='text'>Pre-order my book from Amazon.com</title><content type='html'>A reader told me that he can now pre-order my book &lt;a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;amp;location=http%3A%2F%2Fwww.amazon.com%2FQuantitative-Trading-Build-Algorithmic-Business%2Fdp%2F0470284889%3Fie%3DUTF8%26s%3Dbooks%26qid%3D1211982881%26sr%3D8-1&amp;amp;tag=quantitativet-20&amp;amp;linkCode=ur2&amp;amp;camp=1789&amp;amp;creative=9325%22%3EQuantitative%20Trading%3C/a%3E%3Cimg%20src=%22http://www.assoc-amazon.com/e/ir?t=quantitativet-20&amp;amp;l=ur2&amp;amp;o=1%22%20width=%221%22%20height=%221%22%20border=%220%22%20alt=%22%22%20style=%22border:none%20%21important;%20margin:0px%20%21important;%22"&gt;"Quantitative Trading: How to Build Your Own Algorithmic Trading Business"&lt;/a&gt; from Amazon.com. The scheduled publication date is November 24, 2008.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-6155564774666529236?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/6155564774666529236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=6155564774666529236' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/6155564774666529236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/6155564774666529236'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/05/pre-order-my-book-from-amazoncom.html' title='Pre-order my book from Amazon.com'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-935569181129638409</id><published>2008-05-27T10:08:00.004-04:00</published><updated>2008-05-27T10:44:57.934-04:00</updated><title type='text'>Parameterless trading models</title><content type='html'>A portfolio manager that I used to work for like to pronounce that his trading models have "no free parameters". As is customary in our secretive industry, he would not elaborate further on his technique.&lt;br /&gt;&lt;br /&gt;Lately, I begin to understand what a trading model with no free parameter means. It doesn't mean that it does not contain any lookback period for calculating trends, or thresholds for entry or exit. I think that would be impossible. It just means that all such parameters are &lt;span style="font-style: italic;"&gt;dynamically &lt;/span&gt;optimized in a moving lookback window. This way, if you ask: "Does the model have a fixed profit cap?", the trader can honestly reply: "No, profit cap is not an input parameter. It is determined by the model itself."&lt;br /&gt;&lt;br /&gt;The advantage of a parameterless trading model is that it minimizes the danger of overfitting the model to multiple input parameters. (The so-called "data-snooping bias".) So the backtest performance should be much closer to the actual forward performance.&lt;br /&gt;&lt;br /&gt;Now, it is quite computationally challenging to optimize all these parameters just-in-time for your next order, but it is often even more difficult to do that in a backtest, given that a multidimensional optimization need to be performed for each historical bar. As a result, I personally have seldom traded parameterless models, until I get to research my &lt;a href="http://epchan.blogspot.com/2008/05/machine-learning-regime-switching.html"&gt;regime-switching model&lt;/a&gt;. That model is almost parameterless (I left out a few parameters from optimization because of a lack of time, not because of any technical difficulties).&lt;br /&gt;&lt;br /&gt;The reason backtest optimization can now be done within a few minutes is due to my use of Alphacet Discovery's server-based optimization engine. There may be other optimization software out there that performs similar functions efficiently -- I welcome comments from the reader.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-935569181129638409?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/935569181129638409/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=935569181129638409' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/935569181129638409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/935569181129638409'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/05/parameterless-trading-models.html' title='Parameterless trading models'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-8680413474862597713</id><published>2008-05-26T08:36:00.003-04:00</published><updated>2008-05-26T08:38:51.063-04:00</updated><title type='text'>Regime switching paper</title><content type='html'>A preprint version of my &lt;a href="http://epchan.blogspot.com/2008/05/machine-learning-regime-switching.html"&gt;Regime Switching and Machine Learning&lt;/a&gt; article can be found on my &lt;a href="http://www.epchan.com/subscriptions.html"&gt;premium content&lt;/a&gt; area.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-8680413474862597713?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/8680413474862597713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=8680413474862597713' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8680413474862597713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8680413474862597713'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/05/regime-switching-paper.html' title='Regime switching paper'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-5509061539880948340</id><published>2008-05-23T14:26:00.005-04:00</published><updated>2008-05-23T14:38:35.460-04:00</updated><title type='text'>Machine Learning + Regime Switching = Profitability?</title><content type='html'>My article on a trading strategy based on regime switching and machine learning techniques is now available on &lt;a href="http://www.automatedtrader.net/automated-trader-strategies-1301.xhtm"&gt;Automated Trader magazine&lt;/a&gt; (subscription required). The software I used to research this model is &lt;a href="http://alphacet.com/"&gt;Alphacet Discovery&lt;/a&gt;,  an industrial-strength backtesting, optimization, and execution platform.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-5509061539880948340?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/5509061539880948340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=5509061539880948340' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5509061539880948340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5509061539880948340'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/05/machine-learning-regime-switching.html' title='Machine Learning + Regime Switching = Profitability?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-8351482840044680542</id><published>2008-05-12T07:33:00.002-04:00</published><updated>2008-05-12T07:48:59.814-04:00</updated><title type='text'>Are high oil prices due to hedge fund speculation?</title><content type='html'>The economist &lt;a href="http://www.nytimes.com/2008/05/12/opinion/12krugman.html?ex=1368331200&amp;amp;en=94f48ca72770aae6&amp;amp;ei=5124&amp;amp;partner=permalink&amp;amp;exprod=permalink"&gt;Paul Krugman&lt;/a&gt; advances an interesting argument today in the New York Times &lt;span style="font-style: italic;"&gt;against &lt;/span&gt;the idea that high oil prices are due to hedge fund speculation.&lt;br /&gt;&lt;br /&gt;He believes that speculative buying can lead to persistent high prices (which has been the case for the last few years) only if there is physical hoarding. Yet oil inventory level has been normal for this period.&lt;br /&gt;&lt;br /&gt;Indeed, I have been trying to find a mean-reverting strategy to trade oil and oil-related assets for some time now. So far, none have outperformed (even on a risk-adjusted basis) just buy-and-hold energy stocks for the long term!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-8351482840044680542?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/8351482840044680542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=8351482840044680542' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8351482840044680542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/8351482840044680542'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/05/are-high-oil-prices-due-to-hedge-fund.html' title='Are high oil prices due to hedge fund speculation?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-2682117114689398585</id><published>2008-05-10T12:57:00.003-04:00</published><updated>2008-05-10T13:22:19.466-04:00</updated><title type='text'>5%: an important number for real estate investors</title><content type='html'>Equity investors like to check out a company's price/earnings ratio before they invest in its stock. Likewise, real estate investors should do the same before buying a house. The equivalent of price/earnings ratio for real estate is the price/rent ratio, or inversely, the rent/price yield.&lt;br /&gt;&lt;br /&gt;What is a reasonable rent/price yield for US residential real estate? According to &lt;a href="http://morris.marginalq.com/DLM_fullpaper.pdf"&gt;Morris Davis of the University of Wisconsin-Madison, and Andreas Lehnert and Robert Martin of the Fed&lt;/a&gt;, the long-term average is 5% (i.e. the annual rent of a house should be about 5% of its market value). As the &lt;a href="http://www.economist.com/finance/displaystory.cfm?story_id=11333030"&gt;Economist magazine&lt;/a&gt; has reported, at the height of the US housing boom, this figure dropped to as low as 3.5%.&lt;br /&gt;&lt;br /&gt;Currently, this ratio is at about 4.3%, which implies that average US housing price has to drop another 14% in order to return to its historical fair value.&lt;br /&gt;&lt;br /&gt;Can quantitative traders profit from this prediction? Well, we can always short the &lt;a href="http://www.cmegroup.com/trading/real-estate/residential/SandP-case-shiller-home-price-index_FO.html"&gt;S&amp;amp;P/Case-Shiller Home Price Indices futures&lt;/a&gt; at the Chicago Mercantile Exchange.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-2682117114689398585?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/2682117114689398585/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=2682117114689398585' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/2682117114689398585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/2682117114689398585'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/05/5-important-number-for-real-estate.html' title='5%: an important number for real estate investors'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-1913571709569374319</id><published>2008-05-04T08:34:00.005-04:00</published><updated>2008-05-04T08:59:12.939-04:00</updated><title type='text'>A combination momentum and mean reversal model based on earnings annoucements</title><content type='html'>Mark Hulbert of the New York Times just &lt;a href="http://www.nytimes.com/2008/05/04/business/04stra.html?ex=1367553600&amp;amp;en=a16fc6e31bea8907&amp;amp;ei=5124&amp;amp;partner=permalink&amp;amp;exprod=permalink"&gt;discussed&lt;/a&gt; 2 momentum &lt;a href="http://w4.stern.nyu.edu/emplibrary/earnings_paper_082707.pdf"&gt;strategies&lt;/a&gt; investigated by professors David Aboody, Brett Trueman and Reuven Lehavy.&lt;br /&gt;&lt;br /&gt;Strategy A: pick stocks in the top percentile of 12-month returns. Buy them (individually) 5 days before their earnings announcements and sell them just before the announcement.&lt;br /&gt;&lt;br /&gt;Strategy B: pick stocks in the top percentile of 12-month returns. Buy them (individually) 5 days immediately after their earnings announcements and hold them for 5 days.&lt;br /&gt;&lt;br /&gt;Strategy A is very profitable: the annualized excess return is 47% before costs. (To be taken with a grain of salt due to the large transaction costs associated with trading momentum strategies, especially if small-cap stocks are involved.) Strategy B is very unprofitable: the annualized excess return is -43% before costs.&lt;br /&gt;&lt;br /&gt;So what are the ways we can make best use of this research?&lt;br /&gt;&lt;br /&gt;Naturally, instead of buying the top percentile after the earnings announcements, we should have shorted the stocks, thus making Strategy B a reversal strategy instead.&lt;br /&gt;&lt;br /&gt;Furthermore, what about the bottom percentile of stocks? Should we have shorted them prior to the announcements, and bought them after the announcements? If so, we would have a very nice dollar-strategy for you statistical arbitrageurs out there!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-1913571709569374319?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/1913571709569374319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=1913571709569374319' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1913571709569374319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1913571709569374319'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/05/combination-momentum-and-mean-reversal.html' title='A combination momentum and mean reversal model based on earnings annoucements'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-6579947106186264799</id><published>2008-04-20T17:30:00.003-04:00</published><updated>2008-04-20T17:39:17.516-04:00</updated><title type='text'>8 Recommended Sites for Economic Research</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;o:p&gt;I am happy to have my guest blogger Heather Johnson write about economics again. (I hope to emerge from my hiatus soon after finishing the final draft of my book on quantitative trading.)&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;br /&gt;=====================================&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;  &lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;8 Recommended Sites for Economic Research&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  By Heather Johnson&lt;br /&gt;       &lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;Without the proper research, your trading strategies are just a shot in the dark. Don't rely on soundbites and headlines to tell you how the economy is doing. A wise investor will be following trends and analyzing his or her own collected data. Below are eight recommended sites for economic research that traders should find very useful.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;a href="http://www.aei.org/research/filter.all/default.asp"&gt;AEI Research&lt;/a&gt;      - The American Enterprise Institute (AEI) for Public Policy Research is a      non-profit group that is dedicated to educating people on economics, as      well as politics, government and social welfare. You can find economic      policy reports here that may influence your trading. &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;a href="http://www.bea.gov/"&gt;BEA&lt;/a&gt; – The U.S. Bureau of Economic Analysis      (BEA) provides economic data in a timely and unbiased manner. This service      to the public helps people to gather a more accurate view of the &lt;st1:country-region st="on"&gt;&lt;st1:place st="on"&gt;U.S.&lt;/st1:place&gt;&lt;/st1:country-region&gt;      economy. Reports are categorized by region and industry.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;a href="http://research.cibcwm.com/res/Eco/EcoResearch.html"&gt;CIBC World      Markets&lt;/a&gt; – This organization is the corporate banking department of      CIBC, one of the largest North American financial institutions. The global      economic data provided by CIBC World Markets is considered to be amongst      the most reliable sources for economic indicators. &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;a href="http://www.fedstats.gov/"&gt;FedStats&lt;/a&gt; – This site offers the full      range of economic statistics provided by the &lt;st1:country-region st="on"&gt;&lt;st1:place st="on"&gt;U.S.&lt;/st1:place&gt;&lt;/st1:country-region&gt; federal government. It      also gathers data and trends from over 100 agency Websites.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;a href="http://www.federalreserve.gov/"&gt;Federal Reserve&lt;/a&gt; – A trader      should always be interested in what is going on with the Fed. Here, the      institution provides regularly updated bulletins and data.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;a href="http://forecasts.org/economic-indicator/index.htm"&gt;The Financial      Forecast Center&lt;/a&gt; – While this isn't a virtual crystal ball, it does      offer third-party, objective economic data and forecasts. Compiled by      artificial intelligence and available in a free subscription, everything      found on this site is completely quantitative. &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;a href="http://www.economy.com/freelunch/"&gt;Free Lunch&lt;/a&gt; – Ah, and you      thought there was no such thing. This source of economic data and analysis      begs the question, "Why pay anything?"&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;a href="http://www.bloomberg.com/markets/ecalendar/index.html"&gt;Bloomberg.com      Economic Calendar&lt;/a&gt; – This helpful calendar is brought to you by one of      the most well-known names in finance. A day trader will find this calendar      most useful when trying to determine how the market will move. &lt;/li&gt;&lt;/ol&gt;    &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;Although the list above is far from exhaustive, it should give you plenty of information to chew on for a while. Whether you are trying to forecast today's market or the market over the next six months, you will need to conduct some serious research beforehand. &lt;/p&gt;      &lt;p class="MsoNormal"&gt;&lt;o:p&gt; =====================&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Arial; color: black;"&gt;Heather Johnson is a freelance finance and economics writer, as well as a regular contributor for CurrencyTrading.net, a site for currency trading and &lt;a href="http://www.currencytrading.net/"&gt;forex trading&lt;/a&gt; information. Heather welcomes comments and freelancing job inquiries at her email address &lt;a href="mailto:heatherjohnson2323@gmail.com"&gt;heatherjohnson2323@gmail.com&lt;/a&gt; .&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-6579947106186264799?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/6579947106186264799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=6579947106186264799' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/6579947106186264799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/6579947106186264799'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/04/8-recommended-sites-for-economic.html' title='8 Recommended Sites for Economic Research'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-4029771616340552484</id><published>2008-03-20T07:12:00.002-04:00</published><updated>2008-03-20T07:20:43.252-04:00</updated><title type='text'>5 Steps to Managing Risk as a Microfinancier</title><content type='html'>It might surprise some of you that lending money to middle-class American home owners to buy houses may be much riskier than lending money to Bangladeshi farmers to buy their first cellphones. (The beauty of diversification at work here?)&lt;br /&gt;&lt;br /&gt;I have invited guest blogger Heather Johnson to explain microfinancing, and the quantitative risk management tools available if you want to do it yourself.&lt;br /&gt;&lt;br /&gt;====&lt;br /&gt;&lt;h1 class="firstHeading"&gt;  &lt;/h1&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;u&gt;5 Steps to Managing Risk as a Microfinancier&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt;By Heather Johnson&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Microfinancing is a growing trend among investors, as it offers low-risk money opportunities and a way to bring social change to poverty-stricken communities. "Low-risk" doesn't equal "no risk," of course, so many potential microlenders are keen to learn the ins and outs of credit risk management in this arena. After all, most microborrowers have poor credit or no credit at all. A villager who needs $200 for starting a third-world chicken farm isn't going to fare well in that department, as you can imagine. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The good news is, even in the event of a loan delinquency, you won't be losing a substantial amount of money. Most microloans range from a few hundred to a few thousand dollars. Any losses are unfortunate, though, so you will want to manage your microlending risks and keep loan delinquencies to a minimum.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Here are five steps to managing your risk as a microfinancier:&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Research      Your Borrower – If you're lending through a site, such as &lt;a href="http://www.prosper.com/"&gt;Prosper&lt;/a&gt;, then you will have access to      your borrower's profile and credit reports. However, don’t be afraid to      ask more questions if you have any doubts about this person's ability to      repay the loan. If you are lending the money through other channels,      definitely start with the credit reports and interview the borrower. &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Lend      With a Group – Though this won't make your borrower any more likely to      repay a loan, lending with a group will help to spread out the cost and      share responsibility. In other words, you will be risking less money and      will have other people with the same interests to consult with.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Use      Analytical Tools – Third-party applications can help you determine what is      working best with your microlending. Both seasoned microlenders and      newcomers are highly encouraged to use such tools. Microfinance sites that      come with excellent built-in tools include &lt;a href="http://www.trickleup.org/"&gt;Trickle Up&lt;/a&gt;, &lt;a href="http://www.opportunity.org/"&gt;Opportunity International&lt;/a&gt; and &lt;a href="http://www.heifer.org/"&gt;Heifer International&lt;/a&gt;. &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Provide      Incentives – Consider an incentive program for those who pay on time. A      small, inexpensive gift will be very appreciated by those living in      third-world countries. Lenders have used food, such as rice or corn meal,      as a bonus.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Be      Proactive in Collecting – This doesn't mean you should harass your      borrowers. However, you should research your delinquent accounts as soon      as payments are late, rather than letting them go into default. There      could be a simple breakdown in communication or an emergency on the      borrower's end. &lt;/li&gt;&lt;/ol&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;One of the biggest draws of microfinancing is the relatively low risk involved. However, that doesn't mean that you will have a 100% success rate. The best way to get your feet wet is to start with a small loan. Something as low as $100 will let you learn the process and allow you to become more comfortable with the system. Microfinancing isn't for everyone, but you may just find your niche with this kind of investment. &lt;/p&gt;====&lt;p class="MsoNormal"&gt;Heather Johnson is a freelance finance and economics writer, as well as a regular contributor for CurrencyTrading.net, a site for &lt;a href="http://www.currencytrading.net/"&gt;currency trading&lt;/a&gt; and forex trading information. Heather welcomes comments and freelancing job inquiries at her email address &lt;a href="mailto:heatherjohnson2323@gmail.com"&gt;heatherjohnson2323@gmail.com&lt;/a&gt; .&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-4029771616340552484?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/4029771616340552484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=4029771616340552484' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/4029771616340552484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/4029771616340552484'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/03/5-steps-to-managing-risk-as.html' title='5 Steps to Managing Risk as a Microfinancier'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-9000794182419075181</id><published>2008-03-03T14:58:00.002-05:00</published><updated>2008-03-03T15:01:43.149-05:00</updated><title type='text'>Upcoming seminar on subprime mortgage crisis</title><content type='html'>For readers who live in the New York area, here is an interesting upcoming seminar at Columbia University:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; The subprime mortgage crisis of 2007:  Anatomy of a market failure&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Date: 03-10-2008&lt;br /&gt;Start Time: 6:00pm&lt;br /&gt;End Time: 7:30pm&lt;br /&gt;Speaker: Kenneth A. Posner, Morgan Stanley&lt;br /&gt;Location: 412 Schapiro CEPSR, Davis Auditorium&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ABSTRACT&lt;br /&gt;&lt;br /&gt;As home prices soared in 2004-5, consumers, realtors, mortgage lenders,&lt;br /&gt;homebuilders, and investment banks all benefited.  But few thought the good&lt;br /&gt;times would last -- after all, everyone had learned to recognize a bubble&lt;br /&gt;when they saw one.  If that's the case, how did mortgage losses turn out so&lt;br /&gt;large, and why do we find ourselves today confronting a major financial&lt;br /&gt;crisis?  This presentation will survey the damage resulting from the&lt;br /&gt;subprime mortgage crash and provide a possible explanation for the magnitude&lt;br /&gt;of the surprise which may be relevant to investors and risk managers in&lt;br /&gt;other markets.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;BIO&lt;br /&gt;&lt;br /&gt;Kenneth Posner is a managing director and head of the mortgage finance and&lt;br /&gt;specialty finance equity research team. Prior to joining the Equity Research&lt;br /&gt;department in 1995, Ken worked in Morgan Stanley's investment banking group,&lt;br /&gt;where he focused on commercial real estate transactions. He previously&lt;br /&gt;served as a captain of infantry in the US Army, and was airborne and ranger&lt;br /&gt;qualified. Ken earned a B.A. from Yale University in 1985 and an M.B.A. with&lt;br /&gt;honors from the University of Chicago Graduate School of Business in 1991.&lt;br /&gt;He is a Certified Public Accountant and holds the Chartered Financial&lt;br /&gt;Analyst and Financial Risk Manager designations&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-9000794182419075181?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/9000794182419075181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=9000794182419075181' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/9000794182419075181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/9000794182419075181'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/03/upcoming-seminar-on-subprime-mortgage.html' title='Upcoming seminar on subprime mortgage crisis'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-5482583439533196450</id><published>2008-02-22T08:24:00.002-05:00</published><updated>2008-02-22T08:28:36.877-05:00</updated><title type='text'>Had it been really that bad?</title><content type='html'>According to &lt;a href="http://dealbook.blogs.nytimes.com/2008/02/22/january-the-cruelest-month-for-hedge-funds-since-2000/"&gt;Eurekahedge Hedge Fund Index&lt;/a&gt;, hedge funds had the worst performance in eight years during this past January. And long-short equity funds had the poorest performance among them all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-5482583439533196450?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/5482583439533196450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=5482583439533196450' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5482583439533196450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5482583439533196450'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/02/had-it-been-really-that-bad.html' title='Had it been really that bad?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-1093900044164707520</id><published>2008-02-19T08:24:00.004-05:00</published><updated>2008-02-19T10:09:10.313-05:00</updated><title type='text'>Looking for momentum? Check outside the US</title><content type='html'>Momentum vs. mean-reversion has been a perennial theme in investing, not least quantitative investing. My contention has always been that momentum strategies are generally less reliable than mean-reversal strategies. (See &lt;a href="http://epchan.blogspot.com/2008/01/are-quant-strategies-in-trouble-yet.html"&gt;here &lt;/a&gt;or &lt;a href="http://epchan.blogspot.com/2007/08/perils-of-momentum-strategies.html"&gt;here&lt;/a&gt;.) My reader Mr. J. Rigg told me about a recent &lt;a href="http://www.ft.com/cms/s/0/5a9bada2-dbf5-11dc-bc82-0000779fd2ac.html"&gt;article&lt;/a&gt; in the Financial Times suggesting that momentum strategies are alive and well, according to the &lt;a href="http://www.london.edu/assets/documents/786_GIRY2008Synopsis.pdf"&gt;research&lt;/a&gt; by Prof. Elroy Dimson &lt;span style="font-style: italic;"&gt;et al &lt;/span&gt;at the London Business School. The strategy is very simple: buy the stocks with the highest returns in, say, the last 12 months, short the ones with the lowest returns, and hold for, say, 1 month. If you run this strategy for the top 100 UK stocks from 1900 to 2007, the average annualized return before costs is about 10%.&lt;br /&gt;&lt;br /&gt;There are, however, a number of caveats worth noting in this study:&lt;br /&gt;&lt;br /&gt;First, it is very transaction-costly to implement momentum strategies for small or even mid-cap stocks. If you factor in costs, 10% can easily become 5% -- not an impressive number even for a dollar-neutral strategy. (Though one should note that the infrequent rebalancing renders transaction costs consideration less important.)&lt;br /&gt;&lt;br /&gt;Second, the drawdown durations are quite lengthy -- sometimes exceeding 2 years. This is not acceptable performance for many hedge funds. Such lengthy drawdowns have been a common feature of many momentum strategies that I have personally studied and traded.&lt;br /&gt;&lt;br /&gt;Third, and most interestingly, in the period 2001-2007, this momentum strategy has stopped working altogether for the US market, while continuing to deliver positive returns in other markets!&lt;br /&gt;&lt;br /&gt;What may be the reason for this dichotomy between US and international markets? Momentum strategies generally derive their power from the slow diffusion and analysis of information: if all investors are simultaneously aware of all the relevant financial information about a company and can analyze the significance of the information instantaneously, they will have come to a consensus fair market value instantaneously and no momentum in the price will result.  Hence  perhaps the  disappearance of momentum in the US equity market means what most people know already: that it is the most efficient equity market of all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-1093900044164707520?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/1093900044164707520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=1093900044164707520' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1093900044164707520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1093900044164707520'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/02/looking-for-momentum-check-outside-us.html' title='Looking for momentum? Check outside the US'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-7717792629515216671</id><published>2008-01-27T12:17:00.000-05:00</published><updated>2008-01-27T12:54:03.377-05:00</updated><title type='text'>Are quant strategies in trouble yet again?</title><content type='html'>There were reports that quant strategies have been suffering again in January, given the market turmoil generated partly by the Societe Generale scandal. Mr. Matthew Rothman of Lehman Brothers pinned the blame on momentum strategies (Hat tip: &lt;a href="http://www.1440wallstreet.com/index.php/"&gt;1440 Wall Street&lt;/a&gt;). I partly agree with that assessment, but the full picture is more nuanced.&lt;br /&gt;&lt;br /&gt;As I have written in my &lt;a href="http://epchan.blogspot.com/2007/12/sea-of-pain.html"&gt;previous post&lt;/a&gt;, December has been a disastrous month for value (or mean-reverting) strategies, based on both public commentaries and personal experience. Yet, as always, mean-reverting strategies bounced back in January and all the pain is gone. In fact, the Societe Generale scandal and the subsequent 1/22 Fed bailout has been a &lt;span style="font-style: italic;"&gt;huge &lt;/span&gt;bonanza to mean-reversion traders, just like the &lt;a href="http://epchan.blogspot.com/2007/08/why-are-quantitative-funds-losing-money.html"&gt;August disaster&lt;/a&gt; had been. (Remember: mean-reversion traders profit from providing liquidity during market panic.) Meanwhile, though December has been a good month for momentum strategies, January has become increasingly inhospitable to them. But one should not be surprised at all. As I have explained &lt;a href="http://epchan.blogspot.com/2007/08/perils-of-momentum-strategies.html"&gt;before&lt;/a&gt;, momentum strategies generally tend to be more unstable and have lower Sharpe ratios than reversal strategies. Any wise quantitative portfolio managers would always allocate a lower proportion of capital to momentum strategies than to reversal strategies. Hence it is no excuse at all to say that a quant portfolio has been hurt by losses in momentum trading -- they are to be expected quite frequently!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-7717792629515216671?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/7717792629515216671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=7717792629515216671' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/7717792629515216671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/7717792629515216671'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2008/01/are-quant-strategies-in-trouble-yet.html' title='Are quant strategies in trouble yet again?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-5630577022888816387</id><published>2007-12-15T16:21:00.000-05:00</published><updated>2007-12-15T16:32:01.318-05:00</updated><title type='text'>A sea of pain</title><content type='html'>This Economist Magazine &lt;a href="http://economist.com/finance/displaystory.cfm?story_id=10286619"&gt;article&lt;/a&gt; confirms my personal experience that value investing is in a sea of pain at the moment. The reasons are quite different from the last time (during the dotcom era) when value investing was in the doldrums. This time around, people are not full of euphoria about the prospects of growth stocks -- they are just getting increasingly gloomy of value stocks which seem to be getting cheaper by the minute.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-5630577022888816387?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/5630577022888816387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=5630577022888816387' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5630577022888816387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5630577022888816387'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2007/12/sea-of-pain.html' title='A sea of pain'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-1935620440117571489</id><published>2007-11-23T07:45:00.000-05:00</published><updated>2007-11-23T08:03:23.432-05:00</updated><title type='text'>Seasonal trades in stocks</title><content type='html'>Readers of this blog have seen my discussions of various seasonal trades in commodities futures (e.g. see this &lt;a href="http://epchan.blogspot.com/2007/05/are-claims-of-seasonality-in-commodity.html"&gt;article&lt;/a&gt;). Recently, &lt;a href="http://www.nytimes.com/2007/11/18/business/yourmoney/18stra.html"&gt;Mark Hulbert&lt;/a&gt; of the NYTimes drew our attention to a seasonal trade in stocks. The strategy is very simple: each month, buy a number of stocks that performed the best in the same month a year earlier, and short the same number of stocks that performed poorest in that month a year earlier. The average annual return is more than 13% before transaction costs, and since it is market neutral, this already considerable return can be leveraged to 2 or 3 times higher. Also, since it turns over the stocks only once a month, transaction costs should not be a major  problem. The strategy was developed by Profs. Steven Heston and Ronnie Sadka, and details can be found online &lt;a href="http://lcb1.uoregon.edu/rcg/seminars/seasonal072604.pdf"&gt;here&lt;/a&gt;. Besides its simplicity, the strategy is not as affected by survivorship bias in the data set as a mean-reverting strategy, since survivorship bias would tend to lower its backtest performance by excluding very poorly performing stocks that we would short. All in all, it seems to be a market neutral strategy made for retail trading!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-1935620440117571489?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/1935620440117571489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=1935620440117571489' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1935620440117571489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/1935620440117571489'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2007/11/seasonal-trades-in-stocks.html' title='Seasonal trades in stocks'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-5692343213200201281</id><published>2007-10-27T10:34:00.000-04:00</published><updated>2007-10-27T11:02:32.199-04:00</updated><title type='text'>Economist article on quant funds</title><content type='html'>The media seems to have an endless fascination with quant funds. Here is the latest &lt;a href="http://economist.com/finance/displaystory.cfm?story_id=10026288"&gt;article&lt;/a&gt; from the Economist magazine, summarizing the postmortem published by several researchers. (Hat tip, once again, to reader Mr. J. Rigg.)&lt;br /&gt;&lt;br /&gt;The key points are as follows:&lt;br /&gt;&lt;br /&gt;1) Quant funds are now becoming the primary market makers in many securities, which normally would provide liquidity and decrease volatility.&lt;br /&gt;&lt;br /&gt;2) Unlike ordinary market makers, however, quant funds are highly leveraged.&lt;br /&gt;&lt;br /&gt;3) Because of the high leverage, in the face of large losses these market-making quant funds are forced to liquidate their assets instead of buying them, thus behaving in a way opposite to ordinary market makers just when the need for liquidity is direst.&lt;br /&gt;&lt;br /&gt;4) Thus quant funds are actually contributing to instability of the market despite their apparent market-making function.&lt;br /&gt;&lt;br /&gt;Fortunately, when all else has gone wrong, there is alway Mr. Bernanke to count on ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-5692343213200201281?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/5692343213200201281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=5692343213200201281' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5692343213200201281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/5692343213200201281'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2007/10/economist-article-on-quant-funds.html' title='Economist article on quant funds'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-3756588528008520383</id><published>2007-10-07T09:30:00.000-04:00</published><updated>2007-10-07T09:44:13.063-04:00</updated><title type='text'>Emerging markets stocks vs. natural resource stocks</title><content type='html'>Emerging market stocks have been reaching new highs almost everyday (see this &lt;a href="http://economist.com/finance/displaystory.cfm?story_id=9912520"&gt;article&lt;/a&gt; in the Economist magazine), and the natural resource sector has been on a tear as well. Given the giddy valuations of both sectors, which one is a better relative buy at this point? For those of you who have been following the IGE-EEM spread that I &lt;a href="http://epchan.blogspot.com/2006/11/does-canada-belong-to-emerging-markets.html"&gt;proposed&lt;/a&gt; before, its value is at an all-time-low these days -- it was at -6.77 standard deviations. Given their historical cointegration, I wouldn't be surprised if it will revert to a more sane value in the near future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-3756588528008520383?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/3756588528008520383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=3756588528008520383' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3756588528008520383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3756588528008520383'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2007/10/emerging-markets-stocks-vs-natural.html' title='Emerging markets stocks vs. natural resource stocks'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-3244506492170317025</id><published>2007-10-06T09:41:00.000-04:00</published><updated>2007-10-06T10:33:30.305-04:00</updated><title type='text'>How a mean-reversion strategy performed in August</title><content type='html'>Prof. Andrew Lo and Mr. Amir Khandani at MIT recently wrote a paper on &lt;a href="http://web.mit.edu/alo/www/Papers/august07.pdf"&gt;"What Happened To The Quants In August 2007?"&lt;/a&gt; (Hat tip to my reader Mr. J. Rigg for the article). Most of their conclusions confirm what many observers already suspected: that the loss is likely due to the  simultaneous forced liquidation of portfolios holding similar positions by various quantitative funds. What is noteworthy, however, is that they constructed a mean-reversion strategy and observed what happened to it during August. This strategy is very simple: buy the stocks with the worst previous 1-day returns, and short the ones with the best previous 1-day returns. Despite its utter simplicity, this strategy has had great performance since 1995,  ignoring transaction costs. The Sharpe ratio was an astounding 53.87 in 1995, gradually decreasing to 4.47 in 2006. However, the strategy also had a disastrous few days on August 7-9, suffering a cumulative (arithmetic) return of -6.85% in those 3 days. Then on August 10, it rebounded, like the rest of the quant funds, with a return of 5.92%, almost reversing all of its previous losses. For me, this experiment reveals three interesting points: 1) a simple price factor seems to capture most of the performance of the complex factor models run by the gigantic hedge funds; 2) even technical mean-reverting factors suffer losses, not just momentum (growth) factors based on fundamentals; and 3) if one wants to avoid disasters and enjoy spectacular returns, even a one-day holding period is too long. I haven't done the experiment myself yet, but I bet that if we were to liquidate the portfolio at market close each day, not only would we avoid the loss of -6.85% in those 3 days, but would probably end up with a positive return of a similar magnitude!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-3244506492170317025?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/3244506492170317025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=3244506492170317025' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3244506492170317025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3244506492170317025'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2007/10/how-mean-reversion-strategy-performed.html' title='How a mean-reversion strategy performed in August'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-3978927121411863815</id><published>2007-09-20T08:04:00.000-04:00</published><updated>2007-09-20T08:09:30.290-04:00</updated><title type='text'>So how much did quantitative strategies actually lose last quarter?</title><content type='html'>The numbers have started to come in: Morgan Stanley &lt;a href="http://dealbook.blogs.nytimes.com/2007/09/19/morgan-stanleys-profit-drops-17-percent/"&gt;lost $480MM&lt;/a&gt; last quarter due to quantitative trading -- about 10% of operating profits.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-3978927121411863815?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/3978927121411863815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=3978927121411863815' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3978927121411863815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3978927121411863815'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2007/09/so-how-much-did-quantitative-strategies.html' title='So how much did quantitative strategies actually lose last quarter?'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35364652.post-3064520964500511062</id><published>2007-09-19T14:07:00.001-04:00</published><updated>2007-09-19T14:17:14.881-04:00</updated><title type='text'>Hedge fund replication</title><content type='html'>I &lt;a href="http://epchan.blogspot.com/2007/03/seven-factors-that-capture-most-of.html"&gt;wrote about&lt;/a&gt; how hedge fund returns can be replicated with simple factor models. I just learn that IndexIQ,  a company in Rye Brook, NY, &lt;st1:place st="on"&gt;&lt;st1:city st="on"&gt;&lt;span style=";font-family:Arial;font-size:85%;color:navy;"   &gt;&lt;span style=";font-family:Arial;font-size:10;color:navy;"   &gt;&lt;/span&gt;&lt;/span&gt;&lt;/st1:city&gt;&lt;/st1:place&gt; has &lt;a href="http://seekingalpha.com/article/47405-indexiq-takes-fleites-where-does-it-go-from-here"&gt;just launched&lt;/a&gt; such products available to retail investors as managed accounts.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35364652-3064520964500511062?l=epchan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://epchan.blogspot.com/feeds/3064520964500511062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35364652&amp;postID=3064520964500511062' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3064520964500511062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35364652/posts/default/3064520964500511062'/><link rel='alternate' type='text/html' href='http://epchan.blogspot.com/2007/09/hedge-fund-replication.html' title='Hedge fund replication'/><author><name>Ernie Chan</name><uri>http://www.blogger.com/profile/02747099358519893177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
