You are on page 1of 13

27/03/2012

a bestiary of algorithmic trading strategies

Locklin on science

Skip to content Skip to search - Accesskey = s

Locklin on science
a bestiary of algorithmic trading strategies
Posted in finance, systematic trading by Scott Locklin on August 17, 2009 One of the things which confronted me when I got interested in quantitative finance is the varieties of different kinds of quant. Now I realize this is pretty simple. Quants come in three basic varieties. 1. Structurers: people who price complex financial instruments. 2. Risk managers people who manage portfolio risk 3. Quant traders people who use statistics to make money by buying and selling It took me quite a while to figure this out. I dont know why people havent bothered to state this taxonomy of quant jobs. I suspect its because most quants are structurers. Of course, there is often bleed over between these varieties -but its a useful taxonomy for looking for work. Ive done a little of all three at this point (very little, honestly), and have always liked quant trading problems more than the other two varieties. Its the most ambitious, and the most likely to net you a career outside of a large organization (go me: Army of one!). Its also the most mysterious, since successful quant traders dont like to talk about what they do. Structurers and risk managers have to talk about what they do, almost by definition. Quant traders gain little from talking about their special sauce. The ones who have spilled the beans are guys like Ed Thorp -who only talk about old strategies, or guys like Larry Harris, who wrote the best book there is on trading, though he wrote it without any interesting equations in it. Of course, there are going to be quant jobs which dont fit exactly into these categories; there is a lot of overlap between traders and risk managers, for example: Im only presenting them as a useful framework to hang some thoughts on. Since Im not presently employed as a quant trader, I dont mind talking about it a little bit. I hope to outline below a rough but mostly complete taxonomy of how this stuff works. Later on, I might outline some specifics of how these basic ideas are applied in practice.

scottlocklin.wordpress.com/2009/08/17/a-bestiary-of-algorithmic-trading-strategies/

1/13

27/03/2012

a bestiary of algorithmic trading strategies

Locklin on science

To make money as a trader, assuming your motivation is to make a profit, you need to buy low and sell high. Thats really all there is to it. Losing sight of this is the source of much trading ruin. People often lose sight of this. They build spectacular technical analysis models based on whatever wavelet/fractical special sauce they can dream up, and forget that they are supposed to be buying low and selling high. To do this, you need some kind of insight or information that other people in the market lack, or you need a structural edge which other market participants dont have. The latter brings me to the first kind of trading strategy in my bestiary: 1. Liquidity peddlers. Market makers earn the spread. What does this mean? They will display prices for buying and selling an instrument, the difference of which is the spread. In an ideal situation, this means theyll buy from people who want to sell, then sell the same thing to someone else who wants to buy, earning the price difference. Theyre taking a risk on that there will be no seller or buyer on the other leg of the trade, and that the price will move against their resulting position. If youre not competing with other people who do this, you can make tidy, low volatility profits. If you have a captive audience, youre not competing with others who do this, and so this is a pretty good trade. This is what most people think of as liquidity provision or making markets. How this gets done may be as simple as what I just outlined, or it can get very complex indeed.

This is why liquidity is good

2. Arbitrageurs earn a different kind of spread. These guys rely on a structural advantage of some kind. It may take the form of having very fast software. It may be because they are large market participants in geographically distant market locations. It may be because they happen to own a large boat with oil in it, and they drive the boat to the place theyre most likely to get a nicer spot price. Sometimes they arb things which are identical: FOREX futures for example. Sometimes they arb things which are supposed to be identical, like index futures versus index ETFs. And again, sometimes it gets complicated. 3. Statistical arbitrageurs are a sort of squishy area, similar to arbs, but distinct from them. They find pieces of securities which are theoretically equivalent. For example, they may notice a drift between prices of oil companies which should revert to a mean value. This mean reversion should happen if the drift doesnt have anything to do with actual corporate differences, like one companys wells catching on fire. What youre doing here is buying and selling the idea of an oil company, or in other words, a sort of oil company market spread risk. Youre assuming these two companies are statistically the same, and so theyll revert to some kind of mean when one of the prices move. Similarly, in the merger between two companies, there is a risk spread in the relative values of the stock prices of the companies, lest the merger doesnt go through. If your statistics or inside information is good enough, you can buy this spread at a profit. In some sense, statistical arbitrageurs are a hybrid of liquidity
scottlocklin.wordpress.com/2009/08/17/a-bestiary-of-algorithmic-trading-strategies/ 2/13

27/03/2012

a bestiary of algorithmic trading strategies

Locklin on science

peddlers and arbitrageurs. They earn their money in both ways.

4. Fundamentals traders: these guys are trying to be the electrical version of Warren Buffet. They buy what they consider bargain stocks, and hold until they can realize some kind of profit, either from harvesting dividends, or from the price appreciation of the stock. This gets a lot of press as being very subjective, but it can be entirely quantitative. Indeed, I suspect Buffet, like most traders, at least uses a quant screen to make his picks. Many, many hedge funds are buying and selling stocks based on accounting data, market trends, and other such information which may or may not have been baked into the price at any given moment. Liquidity providers and statistical arbitrageurs prey on fundamentals traders (among other people). Since fundamentals traders want to control large blocks to harvest large returns, they have to pay for their liquidity. This is the style most people think of as buying and selling stocks -it looks a lot like investing. The ironic thing about it is, this is also the area where most money is lost in algorithmic trading. When you hear about quant funds crashing all at once like in 2007, this is what theyre talking about. It will be a bunch of funds going after the same opportunities in ops cash flow versus accruals, price/book ratio or sector momentum stocks then something in the market goes not according to the model. Since these guys all use the same dumb quarterly rebalanced models, and the market value of the firms invested in is very large, lots of money gets lost. Arbs, liquidity peddlers? The amounts of money involved are much smaller. Arbs and liquidity peddlers can be one or two or five man operations with only a little money in the bank. Thats why guys like me get upset when media fiends go after high frequency. You know who theyre going after? The small businessman; aka me, thats who. Little guys like me who didnt go to Yalevard and dont have any bazillionaires on the rolodex can still make a living as arbs or liquidity peddlers. Oh, the media makes it sound like theyre going after bloated behemoths like Goldman. I wouldnt be surprised if such companies were actually behind this fake populist uproar. Goldman are certainly a lot more likely to profit from changing legislation or exchange rules than I am; that is why they seem to be all for new regulation. I guess fundamentals traders can also be small firms, though theyre going to be much more easily wiped out than a large firm due to the volatility inherent in such strategies. But it is worth realizing that virtually all large algorithmic firms are fundamentals traders. This is true because fundamentals trading is the only kind with the large capacity required to cut lots of paychecks on a 2/20 deal with investors. I have to admit some bias here: some fundamentals algo trading annoys the hell out of me. A
scottlocklin.wordpress.com/2009/08/17/a-bestiary-of-algorithmic-trading-strategies/ 3/13

27/03/2012

a bestiary of algorithmic trading strategies

Locklin on science

lot of what they do isnt much more sophisticated than picking stocks by price/earnings ratios. IMO, there should be Yahoo finance style services for individual investors to pick stocks in the same way these guys do. I have considered building one and making money selling ads the way Yahoo does. Selling ads on a finance webpage is a much lower volatility business than seeking alpha in yet another low Sharpe fundamentals trading business. Probably ads more value as well.

This is why it s good to be a fundamentals trader: lots of company Less pertinent to profit making algorithmic trading strategies, but worth mentioning anyway: 5. Hedgers: are not necessarily interested in making a profit by executing a trade. Theyre more interested in trading as a form of insurance. The insurance generally locks in a profit, or minimizes losses someplace else in a business, but the hedging trade itself is not meant to be profitable. Much of the options, short interest and index futures market consists of people who are buying a form of market insurance. I partly mention this category out of historical interest: people sometimes blame the crash of 1987 on a hedging algorithm in common use in those days. Still, profitable trading strategies often contain hedges, and hedging is a large part of trading volume, so it is worth mentioning explicitly. Hedgers can also be a great source of profits. While this may sound very tooth and claw -you can also look at it as providing hedging services to people who want to be hedged. 6. Noise traders: many trading algorithms dont make any sense from the profit making or hedging point of view. The most obvious category here are idiots with computers who dont know what theyre doing. Less obvious than this are index ETFs; all they want to do is track an index. This is harder than it sounds; in fact, it is NP hard. Another not-so-obvious category are central banks trying to manipulate their currency prices. While this is a rather grab-bag category, I have to put these guys somewhere. While I dont know any central bankers, looking at Forex ticks, what theyre doing appears to be at least partially algorithmic. Noise traders are also a great source of profits. They are also a very large fraction of trading volume. My categories are somewhat arbitrary, just as my aforementioned categories of quant are somewhat arbitrary. Again, these categories are to hang thoughts on. Im pretty sure you can chop any quantitative trading system into one or more of these categories as a useful way of thinking about things. For example: lets say Im trading on the spread between an actual basket of stocks comprising an index, and an ETF or
scottlocklin.wordpress.com/2009/08/17/a-bestiary-of-algorithmic-trading-strategies/ 4/13

27/03/2012

a bestiary of algorithmic trading strategies

Locklin on science

index future. Id categorize that as statistical arbitrage. Sure, people have a special name for it: index arbitrage, but its really a kind of stab art, the same way as trading pairs is: youre just trading a lot more pairs. But wait: it could get more complicated. Lets say you want to build an index better than the actual and use the index to hedge risk: is that still stab art? Or is it more like fundamentals trading? Really, it is a bit of both. To build an index beating portfolio (usually a subindex), you need to do some fundamentals modeling. Is the Tu Jeng Hound of the Hedges plant or an animal? Maybe he is a little of both. Which of these are high frequency? All of them. That is not an exaggeration, though I am mostly saying it to make clear that Im not breaking things down by time scale. People like Warren Buffet may have a long investment horizon, but they also need to pay as little as possible for liquidity. Shopping the block is a nontrivial problem. Speed is important in all kinds of trades. Latency isnt always that important, however. For example, while speed is probably important in your hypothetical index arb problem, Im pretty sure latency is a secondary consideration. Latency of course is important in pure arbitrage and most kinds of liquidity provision.

What is a predatory algorithm? Generally speaking, this is an algorithm that makes your life inconvenient on any of these trades. Seriously: thats what the phrase means. Anyone who tells you otherwise is selling something.

scottlocklin.wordpress.com/2009/08/17/a-bestiary-of-algorithmic-trading-strategies/

5/13

27/03/2012

a bestiary of algorithmic trading strategies

Locklin on science

Sha e hi : Like hi :

S mbleUpon Like Be he fi

Digg

Reddi

o like hi po .

38 comments Icons of engineering quality: part 1 Myths of technological progress

38 Responses
Subscribe to comments with RSS. 1. a bestiary of algorithmic trading strategies Locklin on science Netcrema - creme de la social news via digg + delicious + stumpleupon + reddit said, on August 18, 2009 at 3:45 am [...] a bestiary of algorithmic trading strategies Locklin on sciencescottlocklin.wordpress.com [...] Reply 2. chris said, on August 18, 2009 at 4:42 am can you explain how tracking an index ETF is an NP hard problem? Reply Scott Locklin said, on August 18, 2009 at 5:14 am Probably, though not very well off the top of my head. I shouldnt really have mentioned it, since there are obvious solutions like, buy by weighted sector rather than looking in the universe of equity stocks for an equity which will help a basket track an index. It sounds simple: just buy the whole index, but lets say you are faced with some real world constraints. My basket consists of one share each of the components of the CAC-40, which is capitalization weighted. I have $1000. What stocks do I buy to make my dumb basket track CAC-40 better? It gets crazier with dividends, taxes and stuff, but the basic idea is, without
scottlocklin.wordpress.com/2009/08/17/a-bestiary-of-algorithmic-trading-strategies/ 6/13

27/03/2012

a bestiary of algorithmic trading strategies

Locklin on science

having any more information about the components, you have to try a lot of different permutations and combinations to find the best way to track the index. And if youre smart, youll resample it a zillion times to make sure youre right. Worst of all is when you dont really know what the index is made of. I was confronted with such a problem, and read about its NP-hardness in some paper with a Genetic Algo solution (couldnt find the specific paper easily, sorry). I kind of freaked out, until I realized that just buying by sector was a pretty good answer, and what the boss wanted anyway. Reply hy said, on August 18, 2009 at 5:50 pm Yeah, you shouldnt have said anything about NP-hard, made yourself sound less intelligent than you probably are. Reply Scott Locklin said, on August 18, 2009 at 9:27 pm I was an auto mechanic before I went to college: Im used to people thinking Im a dumb grease monkey, and dont mind it one bit. Being smart is overrated. Reply gappy said, on August 18, 2009 at 8:07 pm The answer is simpler than that. The portfolio tracking problem asks to match a given expected return and minimize the expected square difference between a known security (including a synthetic one, like an index) and a target portfolio with a max cardinality. The covariance matrix and the return vector are assumed to be known. NP-hardness comes from the fact that the cardinality (i.e., the max number of different stocks in the target portfolio) is bounded. There is a corresponding number of 0/1 variables for each stock, and this makes it look like a quadratic knapsack. Dan Bienstock (of Columbia U) worked on this about ten years ago. A first reference is here (check under cardinality). The approach is currently implemented by at least a couple large investment banks. Reply Scott Locklin said, on August 18, 2009 at 9:25 pm Thanks! Im glad my memory was not faulty here. Reply 3. Closer To The Ideal Blog Archive A bestiary of algorithmic trading strategies said, on August 18, 2009 at 4:52 am [...] A bestiary of algorithmic trading strategies One of the things which confronted me when I got interested in quantitative finance is the varieties of different kinds of quant. Now I realize this is pretty
scottlocklin.wordpress.com/2009/08/17/a-bestiary-of-algorithmic-trading-strategies/ 7/13

27/03/2012

a bestiary of algorithmic trading strategies

Locklin on science

simple. Quants come in three basic varieties. [...] Reply 4. a bestiary of algorithmic trading strategies Locklin on science The Forex News said, on August 18, 2009 at 1:08 pm [...] Scott Locklin wrote an interesting post today ona bestiary of algorithmic <b>trading strategies</b> Locklin on scienceHeres a quick excerpt [...] Reply 5. Daily Links #86 | CloudKnow said, on August 18, 2009 at 2:06 pm [...] Scott Locklin: A bestiary of algorithmic trading strategies. [...] Reply 6. Tuesday links: trading too much Abnormal Returns said, on August 18, 2009 at 5:11 pm [...] Breaking down the world of algorithmic trading strategies. (Scott Locklin) [...] Reply 7. 2008 Tax Return Conundrum: With Funding Dropping, How Will Feds Pick up the Slack? RapidTax Blog said, on August 18, 2009 at 7:33 pm [...] new things to illegalize and fine: High-Frequency Trading is a fiendishly complex subject which is only partly understood, even by PhDs and industry experts. Fortunately, the qualifications for having an opinion on it are a bit lower. One new proposal is a [...] Reply 8. Roberto said, on August 18, 2009 at 9:53 pm What about directional trading using money management/risk control. You know. The guys who make money pretty much year-in year-out? Reply Scott Locklin said, on August 18, 2009 at 10:04 pm Well, you could say any of the categories Ive cooked up are directional trading in some sense of the word, and hopefully they all use risk control. Im more interested in breaking it down by where their money comes from than what techniques they use to actually do it. If you dont know where the money comes from, you dont know nuthin! Reply Roberto said, on August 18, 2009 at 11:19 pm The money comes from clients (or traders themselves) who wish to make directional bets AND size their positions based upon risk (many measures) and their Equity. This adds an important category to your list. Reply
scottlocklin.wordpress.com/2009/08/17/a-bestiary-of-algorithmic-trading-strategies/ 8/13

27/03/2012

a bestiary of algorithmic trading strategies

Locklin on science

Scott Locklin said, on August 19, 2009 at 12:40 am It is a technique used in all listed categories. Saying the money comes from the clients who make bets is not what I am talking about. If there is a trend, and you cash out of it, where does your money come from? If your trend lasts a millisecond, it probably comes from some dude paying the spread. If the trend comes from unrolling a mean-reverting trade, your money comes from market participants who were slow to digest the information which made the first equity diverge from the second. if your trend comes from some long term mispricing, it comes from you knowing more about a companys prospects than everyone else does, and the people who were more ignorant of this than you are the ones paying you. Reply 9. Top Posts WordPress.com said, on August 19, 2009 at 12:20 am [...] a bestiary of algorithmic trading strategies One of the things which confronted me when I got interested in quantitative finance is the varieties of different kinds [...] [...] Reply 10. Knowtu links for 2009-08-19 said, on August 20, 2009 at 1:12 am [...] a bestiary of algorithmic trading strategies Locklin on science (tags: economics algorithms statistics) [...] Reply 11. A Bestiary of Algorithmic Trading Strategies Economics Info said, on August 23, 2009 at 2:13 pm [...] Source [...] Reply 12. zeqa said, on August 27, 2009 at 11:00 pm nice info hope i can learn it Reply 13. andi said, on August 28, 2009 at 1:57 pm thanks your info Reply 14. Sri Lestari said, on August 31, 2009 at 7:45 am Finance is a very vital issue for a country. Especially in America who became the mainstream of world trade. Financial situation in countries affected by many things, one of the countrys security. Thank you for this useful news.
scottlocklin.wordpress.com/2009/08/17/a-bestiary-of-algorithmic-trading-strategies/ 9/13

27/03/2012

a bestiary of algorithmic trading strategies

Locklin on science

Reply Scott Locklin said, on August 31, 2009 at 8:04 am Aaron Brown is apparently coming up with something like this as well. He generally knows what hes talking about more than I do, so its likely to be better. I have no idea where its going to be published: hopefully somewhere where lots of people read it. Reply 15. structuredsettlement said, on September 1, 2009 at 1:19 pm you have some really good posts here. Im going to spend the next few days reading them. i love your writing style and Im really happy to visited your blog. keep those posts coming Reply Scott Locklin said, on September 1, 2009 at 7:53 pm Thanks! Reply 16. Forex signals today .com said, on September 3, 2009 at 7:11 pm Very good text ! R.E.S.P.E.C.T. Reply 17. Eva said, on September 4, 2009 at 4:26 am One thing dont forget manage your margin. Nobody know the way of price so trader should study MM-money management. Reply Scott Locklin said, on September 4, 2009 at 4:41 am No doubt about that; Ill be discussing MM at some point in the future. MM is arguably more important than forecasting. Reply 18. Eric said, on September 16, 2009 at 5:33 pm Common sense is the most important thing. Quantitative methods dont serve any purpose without inherent common sense. Buy Low and Sell High is part of common sense. There are other elements like exposure and risk concentration etc. Reply 19. handy said, on November 11, 2009 at 2:19 pm
10/13

scottlocklin.wordpress.com/2009/08/17/a-bestiary-of-algorithmic-trading-strategies/

27/03/2012

a bestiary of algorithmic trading strategies

Locklin on science

Nice article. Thanks for share. Reply 20. Dennis said, on January 2, 2010 at 10:54 pm Great article! I will look into it a bit deeper Forex books Reply 21. Onix said, on January 28, 2010 at 2:06 pm Magnificent article Reply 22. links for 2010-06-25 | Michael Ong | On9 Systems said, on June 26, 2010 at 12:09 am [...] a bestiary of algorithmic trading strategies Locklin on science (tags: algorithm finance quant algorithms economics investing analytics trading toread) [...] Reply 23. Minh said, on December 7, 2010 at 12:58 am Nice article. Like your objective of bringing to light charlatanry pseudo-science. Btw, Im applying to a number of PhD Finance prog. next year. The ones I think I have hope of getting into are mid-tier ones such as USC, UCLA, Baruch, UC San Diego Is a PhD at those schools sufficient to turn me into a quant ? Where do PhD kids (Im in my 20s) get jobs out of school ? Reply Scott Locklin said, on December 7, 2010 at 2:06 am The last Ph.D. in finance I met in the business worked at Bear Stearns, modeling mortgage backed securities. His Ph.D. was of 70s vintage though; I have no idea where modern ones get jobs, or if you can be a quant. Most quants I know are more or less like me: former hard science types. If you really want to work as a quant, Id advise you or anyone else who is asking to just get a job and work your way up the totem pole. College is kind of useless. Reply 24. FugSesgurce said, on June 2, 2011 at 11:10 am What is the best search engine google.com or yahoo.com? Reply 25. Quora said, on December 28, 2011 at 3:38 am

scottlocklin.wordpress.com/2009/08/17/a-bestiary-of-algorithmic-trading-strategies/

11/13

27/03/2012

a bestiary of algorithmic trading strategies

Locklin on science

Where can I find an introduction to HFT algorithms? Most of the well performing ones are of course, hidden, that shouldnt however discourage you. Forgive me if Im being imprecise, but when most people say HFT, they mean Algorithmic Trading, rather than the general low-latency strategy of placing a l Reply 26. What the heck is Statistical Arbitrage? | mansiparikh said, on December 31, 2011 at 7:31 pm [...] Source [...] Reply

Leave a Repl
Enter our comment here...

Fill in our details below or click an icon to log in: Email (required) Name (required) Website

(Address never made public)

Notif me of follow-up comments via email.

Post Comment

Buy me beer!

Past blogs
Select Categor

Pages
About Scott Locklin
scottlocklin.wordpress.com/2009/08/17/a-bestiary-of-algorithmic-trading-strategies/ 12/13

27/03/2012

a bestiary of algorithmic trading strategies

Locklin on science

Statistical jackass of the month nominations Clojure notes

Email Subscription
Enter your email address to subscribe to this blog and receive notifications of new posts by email. Join 92 other followers

Sign me up!

Blogroll
Win-Vector/John Mount blog Win Vector often blogs on matters of software development, finance and mathematics arXiv blog Some guy who goes through arXiv looking for interesting developments: beats waiting for PRL My writing for Taki Taki Theodoracopulos has been kind enough to publish some of my ideas in his magazine Open Data Group blog These guys work on very similar, though generally larger scale projects: My amazon reviews I make fun of books and movies too. Bruce Charlton writes about some interesting philosophy of science The Hallowed Halls of Nuclear Phynance Best financial phorum on earth. Possibly the best internet forum there is. Best of all; if youre a moron, theyll kick you out. Jon Kinlay's blog Jons ideas are very close to my own; I wish hed shut up Project Bronzekopf My present raison detre Quantivity blog This guy thinks even more like me than Jon: I really wish hed shut up Max Dama's blog Max Dama is smarter than you. Erehweb's blog A friend of mine on life and mathematics git Some crap Im dumping to github

News sources
Cracked Magazine Econophysics forum the latest econophysics Blog at WordPress.com. Theme: The Journalist 1.3 by Lucian Marin.

scottlocklin.wordpress.com/2009/08/17/a-bestiary-of-algorithmic-trading-strategies/

13/13

You might also like