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 don’t know why people haven’t bothered to state this taxonomy of quant jobs. I suspect it’s because most quants are structurers. Of course, there is often bleed over between these varieties -but it’s a useful taxonomy for looking for work. I’ve 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. It’s the most ambitious, and the most likely to net you a career outside of a large organization (go me: Army of one!). It’s also the most mysterious, since successful quant traders don’t 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 don’t fit exactly into these categories; there is a lot of overlap between traders and risk managers, for example: I’m only presenting them as a useful framework to hang some thoughts on.

Since I’m not presently employed as a quant trader, I don’t 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.

pit

To make money as a trader, assuming your motivation is to make a profit, you need to buy low and sell high. That’s 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 don’t 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 they’ll buy from people who want to sell, then sell the same thing to someone else who wants to buy, earning the price difference. They’re 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 you’re not competing with other people who do this, you can make tidy, low volatility profits. If you have a captive audience, you’re 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.
    340x_bearsterns

    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 they’re 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 ETF’s. 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 doesn’t have anything to do with actual corporate differences, like one company’s wells catching on fire. What you’re doing here is buying and selling the idea of an oil company, or in other words, a sort of oil company market spread risk. You’re assuming these two companies are statistically the same, and so they’ll 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 doesn’t 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 peddlers and arbitrageurs. They earn their money in both ways.search-engine-arbitrage
  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 they’re 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. That’s why guys like me get upset when media fiends go after “high frequency.” You know who they’re going after? The small businessman; aka me, that’s who. Little guys like me who didn’t go to Yalevard and don’t have any bazillionaires on the rolodex can still make a living as arbs or liquidity peddlers. Oh, the media makes it sound like they’re going after bloated behemoths like Goldman. I wouldn’t 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 they’re 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 lot of what they do isn’t 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.

    billgates-warren-hooters

    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. They’re 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 don’t make any sense from the profit making or hedging point of view. The most obvious category here are idiots with computers who don’t know what they’re 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 don’t know any central bankers, looking at Forex ticks, what they’re 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. I’m 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: let’s say I’m trading on the spread between an actual basket of stocks comprising an index, and an ETF or index future. I’d categorize that as statistical arbitrage. Sure, people have a special name for it: index arbitrage, but it’s really a kind of stab art, the same way as trading pairs is: you’re just trading a lot more pairs. But wait: it could get more complicated. Let’s 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 I’m 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 non-trivial problem. Speed is important in all kinds of trades. Latency isn’t always that important, however. For example, while speed is probably important in your hypothetical index arb problem, I’m pretty sure latency is a secondary consideration. Latency of course is important in pure arbitrage and most kinds of liquidity provision.

artzy24-bigy

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

40 Responses

Subscribe to comments with RSS.

  1. […] a bestiary of algorithmic trading strategies « Locklin on sciencescottlocklin.wordpress.com […]

  2. chris said, on August 18, 2009 at 4:42 am

    can you explain how tracking an index ETF is an NP hard problem?

    • Scott Locklin said, on August 18, 2009 at 5:14 am

      Probably, though not very well off the top of my head. I shouldn’t 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 let’s 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 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 you’re smart, you’ll resample it a zillion times to make sure you’re right. Worst of all is when you don’t really know what the index is made of.

      I was confronted with such a problem, and read about it’s NP-hardness in some paper with a Genetic Algo solution (couldn’t 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.

      • hy said, on August 18, 2009 at 5:50 pm

        Yeah, you shouldn’t have said anything about NP-hard, made yourself sound less intelligent than you probably are.

        • Scott Locklin said, on August 18, 2009 at 9:27 pm

          I was an auto mechanic before I went to college: I’m used to people thinking I’m a dumb grease monkey, and don’t mind it one bit. Being smart is overrated.

  3. […] 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 simple. Quants come in three basic varieties. […]

  4. […] Scott Locklin wrote an interesting post today ona bestiary of algorithmic <b>trading strategies</b> « Locklin on scienceHere’s a quick excerpt […]

  5. Daily Links #86 | CloudKnow said, on August 18, 2009 at 2:06 pm

    […] Scott Locklin: A bestiary of algorithmic trading strategies. […]

  6. […] Breaking down the world of algorithmic trading strategies.  (Scott Locklin) […]

  7. […] 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 […]

  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?

    • Scott Locklin said, on August 18, 2009 at 10:04 pm

      Well, you could say any of the categories I’ve cooked up are directional trading in some sense of the word, and hopefully they all use risk control. I’m more interested in breaking it down by where their money comes from than what techniques they use to actually do it. If you don’t know where the money comes from, you don’t know nuthin!

      • 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.

        • 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 company’s prospects than everyone else does, and the people who were more ignorant of this than you are the ones paying you.

  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 […] […]

  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) […]

  11. […] Source […]

  12. zeqa said, on August 27, 2009 at 11:00 pm

    nice info hope i can learn it

  13. andi said, on August 28, 2009 at 1:57 pm

    thank’s your info 😀

  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 country’s security. Thank you for this useful news.

    • 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 he’s talking about more than I do, so it’s likely to be better. I have no idea where it’s going to be published: hopefully somewhere where lots of people read it.

  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 I’m really happy to visited your blog. keep those posts coming

    • Scott Locklin said, on September 1, 2009 at 7:53 pm

      Thanks!

  16. Forex signals today .com said, on September 3, 2009 at 7:11 pm

    Very good text !
    R.E.S.P.E.C.T.

  17. Eva said, on September 4, 2009 at 4:26 am

    One thing don’t forget manage your margin. Nobody know the way of price so trader should study MM-money management.

    • Scott Locklin said, on September 4, 2009 at 4:41 am

      No doubt about that; I’ll be discussing MM at some point in the future. MM is arguably more important than forecasting.

  18. Eric said, on September 16, 2009 at 5:33 pm

    Common sense is the most important thing. Quantitative methods don’t 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.

  19. handy said, on November 11, 2009 at 2:19 pm

    Nice article. Thanks for share.

  20. Dennis said, on January 2, 2010 at 10:54 pm

    Great article! I will look into it a bit deeper
    Forex books

  21. Onix said, on January 28, 2010 at 2:06 pm

    Magnificent article

  22. […] a bestiary of algorithmic trading strategies « Locklin on science (tags: algorithm finance quant algorithms economics investing analytics trading toread) […]

  23. Minh said, on December 7, 2010 at 12:58 am

    Nice article. Like your objective of bringing to light charlatanry pseudo-science. Btw, I’m 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 (I’m in my 20s) get jobs out of school ?

    • 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, I’d 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.

  24. FugSesgurce said, on June 2, 2011 at 11:10 am

    What is the best search engine google.com or yahoo.com?

  25. Quora said, on December 28, 2011 at 3:38 am

    Where can I find an introduction to HFT algorithms?…

    Most of the well performing ones are of course, hidden, that shouldn’t however discourage you. Forgive me if I’m being imprecise, but when most people say HFT, they mean Algorithmic Trading, rather than the general low-latency strategy of placing a l…

  26. […] Source […]

  27. […] 7. A bestiary of algorithmic trading strategies […]

  28. […] except for his plucky outsider heroes. If “nobody” understood it, how was I was able to write about it on my blog in 2009? If I remember correctly, over 100,000 people read my various blogs on HFT that […]


Leave a comment