<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:georss="http://www.georss.org/georss" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-35364652</atom:id><lastBuildDate>Tue, 10 Nov 2009 06:18:17 +0000</lastBuildDate><title>Quantitative Trading</title><description>Quantitative investment and trading ideas, research, and analysis.</description><link>http://epchan.blogspot.com/</link><managingEditor>ernest@epchan.com (Ernie Chan)</managingEditor><generator>Blogger</generator><openSearch:totalResults>130</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/QuantitativeTrading" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-8319033952725088325</guid><pubDate>Thu, 05 Nov 2009 02:54:00 +0000</pubDate><atom:updated>2009-11-04T21:54:18.827-05:00</atom:updated><title>In praise of ETF's</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/_Ch0VUntlgY/in-praise-of-etfs.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">22</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/11/in-praise-of-etfs.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-5357582507849235663</guid><pubDate>Sun, 11 Oct 2009 13:00:00 +0000</pubDate><atom:updated>2009-10-11T16:27:03.245-04:00</atom:updated><title>The best environment for quantitative trading</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/CRB-aVFUk6A/best-environment-for-quantitative.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">27</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/10/best-environment-for-quantitative.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-5862933347698894330</guid><pubDate>Sun, 20 Sep 2009 15:27:00 +0000</pubDate><atom:updated>2009-09-20T12:06:47.548-04:00</atom:updated><title>Are flash orders really so bad?</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/_UaM5qOtOrc/are-flash-orders-really-so-bad.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">13</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/09/are-flash-orders-really-so-bad.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-1219719782378820898</guid><pubDate>Sat, 12 Sep 2009 00:57:00 +0000</pubDate><atom:updated>2009-09-11T22:28:41.124-04:00</atom:updated><title>Can a trader be a do-gooder?</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/nHrbfTBKN8M/can-trader-be-do-gooder.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">17</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/09/can-trader-be-do-gooder.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-2504547293694181036</guid><pubDate>Thu, 03 Sep 2009 01:35:00 +0000</pubDate><atom:updated>2009-09-02T21:57:21.581-04:00</atom:updated><title>Have you traded 10,000 hours yet?</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/YBq971HmlKQ/have-you-traded-10000-hours-yet.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">18</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/09/have-you-traded-10000-hours-yet.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-5797275456507718243</guid><pubDate>Sat, 22 Aug 2009 01:15:00 +0000</pubDate><atom:updated>2009-08-21T21:27:15.469-04:00</atom:updated><title>Using R to Test for Cointegration</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/mKbceFL-Zbo/using-r-to-test-for-cointegration.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">50</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/08/using-r-to-test-for-cointegration.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-4295964969672081655</guid><pubDate>Fri, 14 Aug 2009 18:22:00 +0000</pubDate><atom:updated>2009-08-15T09:09:03.725-04:00</atom:updated><title>Interview on backtesting</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/DfzM4q9njwM/interview-on-backtesting.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">7</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/08/interview-on-backtesting.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-3235598805149463067</guid><pubDate>Mon, 27 Jul 2009 16:09:00 +0000</pubDate><atom:updated>2009-07-27T12:49:12.765-04:00</atom:updated><title>Are Triple Leveraged ETFs suitable for long-term holding?</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/OCaIN_gILi8/are-triple-leveraged-etfs-suitable-for.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">22</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/07/are-triple-leveraged-etfs-suitable-for.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-2907384345452807373</guid><pubDate>Fri, 17 Jul 2009 16:18:00 +0000</pubDate><atom:updated>2009-07-17T12:36:44.879-04:00</atom:updated><title>A free Matlab-to-Interactive Brokers API</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/H1VKrwVB2SU/free-matlab-to-interactive-brokers-api.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">5</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/07/free-matlab-to-interactive-brokers-api.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-7078827379111105701</guid><pubDate>Mon, 29 Jun 2009 17:11:00 +0000</pubDate><atom:updated>2009-06-29T13:57:32.377-04:00</atom:updated><title>My interview, stop loss, and the Principle of Latest Information</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/cJq5_0xmGtI/my-interview-stop-loss-and-principle-of.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">34</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/06/my-interview-stop-loss-and-principle-of.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-3018250710882678494</guid><pubDate>Thu, 25 Jun 2009 14:35:00 +0000</pubDate><atom:updated>2009-06-25T10:42:38.327-04:00</atom:updated><title>A job opening for quants</title><description>&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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/ElYLbPRnPN4/job-opening-for-quants.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">5</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/06/job-opening-for-quants.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-3574027655155220907</guid><pubDate>Mon, 15 Jun 2009 15:14:00 +0000</pubDate><atom:updated>2009-06-28T08:22:08.934-04:00</atom:updated><title>A good book for quantitative traders</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/4_cDBxs9z3U/good-book-for-quantitative-traders.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">10</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/06/good-book-for-quantitative-traders.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-5217214331910067113</guid><pubDate>Fri, 29 May 2009 20:10:00 +0000</pubDate><atom:updated>2009-05-29T17:00:27.466-04:00</atom:updated><title>MATLAB as an Automated Execution System</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/rwO5aKUX2g4/matlab-as-automated-execution-system.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">47</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/05/matlab-as-automated-execution-system.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-6638795298173825912</guid><pubDate>Thu, 07 May 2009 17:02:00 +0000</pubDate><atom:updated>2009-05-07T13:14:40.781-04:00</atom:updated><title>My pairs trading workshop in London</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/hRDhn0tSg2Y/my-pairs-trading-workshop-in-london.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">49</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/05/my-pairs-trading-workshop-in-london.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-8697111353773450297</guid><pubDate>Fri, 01 May 2009 00:19:00 +0000</pubDate><atom:updated>2009-04-30T20:41:50.009-04:00</atom:updated><title>Seasonal trades in natural gas and gasoline futures</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/7uqkbr3DxSc/seasonal-trades-in-natural-gas-and.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">9</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/04/seasonal-trades-in-natural-gas-and.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-1971622997139482701</guid><pubDate>Sun, 19 Apr 2009 13:44:00 +0000</pubDate><atom:updated>2009-04-19T10:09:49.572-04:00</atom:updated><title>Fios and EC2</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/oXlw_9BIoUU/fios-and-ec2.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">16</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/04/fios-and-ec2.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-6658530107671328767</guid><pubDate>Sun, 12 Apr 2009 16:07:00 +0000</pubDate><atom:updated>2009-04-12T12:27:31.427-04:00</atom:updated><title>The upcoming Black Swan of Black Swans?</title><description>&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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/Fv0ZucnxLDw/upcoming-black-swan-of-black-swans.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/04/upcoming-black-swan-of-black-swans.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-1784842031130327716</guid><pubDate>Fri, 27 Mar 2009 18:10:00 +0000</pubDate><atom:updated>2009-03-27T14:17:31.102-04:00</atom:updated><title>A reader comments on trading using Excel VBA and Factor Model</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/AP-R-sFqKz4/reader-comments-on-trading-using-excel.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">7</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/03/reader-comments-on-trading-using-excel.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-8765104603384141773</guid><pubDate>Fri, 13 Mar 2009 15:44:00 +0000</pubDate><atom:updated>2009-03-13T12:27:32.535-04:00</atom:updated><title>Mean-reversion is getting stronger</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/IkqdN0AWK6E/mean-reversion-is-getting-stronger.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">12</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/03/mean-reversion-is-getting-stronger.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-954574937704467958</guid><pubDate>Thu, 26 Feb 2009 22:34:00 +0000</pubDate><atom:updated>2009-02-26T18:32:12.753-05:00</atom:updated><title>A new service for retail investors</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/rfEX8px7kQc/new-service-for-retail-investors.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/02/new-service-for-retail-investors.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-3645364978152453403</guid><pubDate>Sun, 22 Feb 2009 16:22:00 +0000</pubDate><atom:updated>2009-02-22T11:34:26.529-05:00</atom:updated><title>Trader tax proposal will be the death knell for statistical arbitrage</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/VmqbWC8qijM/trader-tax-proposal-will-be-death-knell.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">10</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/02/trader-tax-proposal-will-be-death-knell.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-2660125305502670153</guid><pubDate>Wed, 18 Feb 2009 17:01:00 +0000</pubDate><atom:updated>2009-02-18T12:03:20.718-05:00</atom:updated><title>Finding seasonal spreads</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/EZZQaS5xL6M/finding-seasonal-spreads_18.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">7</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/02/finding-seasonal-spreads_18.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-1036360938813887011</guid><pubDate>Thu, 12 Feb 2009 23:19:00 +0000</pubDate><atom:updated>2009-02-12T18:36:01.352-05:00</atom:updated><title>The limitation of Sharpe ratio</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/EPd_PL6YDew/limitation-of-sharpe-ratio.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">15</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/02/limitation-of-sharpe-ratio.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-7806088588151401882</guid><pubDate>Fri, 06 Feb 2009 23:53:00 +0000</pubDate><atom:updated>2009-02-06T19:04:07.816-05:00</atom:updated><title>The peril of VaR</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/pDfbXMwyIyk/peril-of-var.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">10</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/02/peril-of-var.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-35364652.post-1560782960143176110</guid><pubDate>Sun, 01 Feb 2009 13:11:00 +0000</pubDate><atom:updated>2009-02-01T08:22:14.554-05:00</atom:updated><title>Kelly formula revisited</title><description>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'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/QuantitativeTrading/~3/lsKZInlwyCM/kelly-formula-revisited.html</link><author>ernest@epchan.com (Ernie Chan)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">18</thr:total><feedburner:origLink>http://epchan.blogspot.com/2009/02/kelly-formula-revisited.html</feedburner:origLink></item></channel></rss>
