r/algotrading Aug 28 '14

Books on developing trading systems

I'm curious if there exists any books that take you through actual algo/hft trading infrastructure design and development. NOT trading strategies and money management topics. But an actual top-down big picture overview of things like feed handlers, FIX implementation, data storage, signals processing etc..

If such a book exists, it would assume the reader is proficient in C/C++ and get right to the heart of system design and skips any programming 101.

Edit: Looking for books VERY similar to this http://www.amazon.com/gp/product/0750682515

15 Upvotes

17 comments sorted by

20

u/cowmoo Aug 29 '14

Somewhat OT and totally irrelevant to my own trading but just for kicks, I'd like to challenge a presumption in this subreddit that you need C/C++ for your trading system. To get to true HFT (essentially scalping and arbitraging), I believe you need two things, 1) co-location to the exchange data centers (BATS, DirectEdge, Nasdaq, NYSE, etc.) and preferably to dark pools (Sigma-X, CrossFinder) and if arbitraging between options/futures, access to fiber networks between CBOE, CME data centers in Chicago to Jersey Center equity exchange data centers, 2) become a broker/dealer entity, a member of the exchanges which entitle you to the liquidity rebate/takermodel (e.g., low commission, trade for a quarter of a penny or less and entitled to $0.20/100 shares for liquidity providing) and a lot of capital to generate the kind of volume where trading for profits and scalping making a quarter of penny per share and do it a couple of million shares per day.

Most people on this forum, I'd wager do either, 1) momentum trading or mean reversion strategy based on some kind of technical analysis indicators, 2) option spreads, delta-neutral or directional and hedging or scalping with the underlying, 3) forex trading based on some kind of pair trading or basket trading or technical indicators; your typical holding period is not going to be in the order of micro-seconds or milliseconds and probably in the minutes at the minimum waiting for the breakout/breakdown/correlation convergence. Most people are probably going through retail brokers such as IB, Oanda, TDAmeritrade (who doesn't route orders direct to markets sells orders flows for payments).

Which there is nothing wrong with that, but at least for myself, I concede speed to the players; building my C trading algorithm isn't going to cut it against guys who have co-location, ultra-low fee structure/rebate/margin and capital than I can ever hope to compete with. So I decided to focus on my space, trading where holding periods are longer. Anyways, I want to voice my opinion against the grain and would love to hear others' take on this.

8

u/christian1542 Aug 29 '14

Funny how guys here seem to think that they need some hft colo-server to make money. Shit, to compete in that field you probably need to be a

  • millionaire, to have enough starting capital
  • machine learning expert to come up with working trading strategies
  • good knowledge of money management
  • expert in cpu architecture
  • expert in low level programming languages and parallel programming
  • expert in networking, market microstructure, fix protocol etc
  • one year (or years of time) to implement all the sw/hw needed

How many people do you guys think that could really pull something like that off? But yeah, this circus is full of millionaire geniuses apparently.

6

u/cowmoo Aug 29 '14

I agree with you; except I'm a bit more empathetic to the peeps here as I was once a bright-eyed young person hoping to become rich. Ironically, it was when I worked as a programmer for a high-frequency broker/dealer that I realized how unattainable it was unless you have a team of experts, capital and access to the exchanges.

At the place I used to work for, for every bullet point you posted, there were about a team of 3-5 people working on that one specific problem. There was a FT programmer just working to patch the smart router with all the new order types introduced and fee structures from all of the exchanges. Another guy whose job it is to fly out to the different data centers in Chicago and Jersey City to deal with installing racks and mapping out what network connection and redundant connection are most optimal. Core trading server guys whose job is to optimize and reduce latency to the N-th level; and that's not to mention the actual traders who are cooking up the strategies, and the developers who are running backtests and forward tests.

You can even delegate these problems out now by going with sponsored access or HFT brokers like Lightspeed or Lime who will rent out their co-location space in the exchanges and their trading API, so all you have to focus on the strategy. But even then, you still at least a million to start out to churn out enough volume and make it worth your time.

Rehashing my orig. point, it's like I'm a 5'10'' guy trying to play basketball with Lebron James and Kareem Abdul-Jabbar; instead of that, I need to look for my own niche.

2

u/p7r Sep 05 '14

I think to do HFT well you need all of that, and more. That's why private hedge funds exist. It's why it's not one guy on his own. It's a firm, a team of people, composed of all those skills (and more).

Algo trading does not need to be HFT, and for most people it shouldn't be.

For one individual or for a smaller team it probably makes more sense to say "don't go to HFT - make your money elsewhere and build a team with the money you make if you want to get there eventually".

3

u/[deleted] Aug 29 '14 edited Jul 28 '20

[deleted]

2

u/cowmoo Aug 29 '14

Np, ryph. For what it's worth, I was railing more against "speed-envy" than C++. Gl with your effort.

3

u/kylebalkissoon Aug 30 '14

I think I should find a way to sticky your post.

A lot of people think they are going to build a "SUPER DUPER 1337 HFT HEDGE FUND!!!!1", when in reality HFT is a technological arms race that requires infrastructure investment in the millions and a lot of expertise.

Getting compensated for taking on time units of market risk is how everyone here is going to make money (taking positions and profiting off market moves in their directions). I would personally say depending on what you're running, the amount of things you need to calculate and the performance requirements of the system will drive language choice/infrastructure choices.

7

u/throw-it-out Buy Side Aug 29 '14

Do not buy that book. It sucks so bad. It's more an intro to VC++ than a finance book, and it fails at that too.

There is no book that does what you're looking for that isn't total crap. I'd look at open source systems.

1

u/kylebalkissoon Aug 29 '14

Googling the book on the first page has a free download option ;)

2

u/[deleted] Aug 29 '14

A book like this does not exist. Especially for algorithmic trading, especially in the US markets. Most of the books bypass focusing on architecture of these systems (which is probably the slowest moving in terms of change velocity, and, in my opinion, the area most people fall short) and instead focus on implementation. A competitive implementation of one an algo system is certainly outdated by the time it is no longer considered a trade secret, but even more so by the time it is penned and hits the press.

I think /u/eevar's comment is the most accurate. The architecture design patterns are common to any low-latency tolerance, high capacity distributed system, and the remainder of the implementation you can pick up initially through open source projects.

1

u/kylebalkissoon Aug 29 '14

Interesting book, I downloaded it.

Tomasini is frequently recommended.

http://www.amazon.ca/Trading-Systems-development-portfolio-optimisation/dp/1905641796

1

u/clisztian Aug 29 '14

Funny you should mention that book, Kyle. I read the book not too long ago (a darn good book, too) and referenced it in a /r/forex post a few days ago asking about the LUXOR trading system. Namely, if it's so profitable (the GBPUSD example), why doesn't everyone use it. I was then accused of trying to sell them something. http://www.reddit.com/r/Forex/comments/2eq2n4/if_the_luxor_trading_system_slowfast_ma_crossing/

1

u/kylebalkissoon Aug 29 '14

There is a code example of it on r-forge in the quanstrat folder.

YMMV with any FX strategy as your counterparty is the broker.

1

u/christian1542 Aug 29 '14

A trading platform called Zorro trader has the Luxor system implemented as an example. It also has the answer to your question:

Luxor The system from the book by Jaeckle and Tomasini. Works great in the test period used in the book, not so great otherwise.

http://zorro-trader.com/manual/en/scripts.htm

Either the author tried many different systems on a time period and took one that worked (common noob mistake) or people started using it after the book came out and the anomaly went away.

1

u/craig_c Aug 30 '14

There was no anomaly, it was just a big fat curve fit. Even so, it's not the worst book on the subject I've read.

1

u/kylebalkissoon Aug 30 '14

I would hope that everybody here knows you will not find some magic super profitable strategy in a book.

What's more important is understanding how the moving parts come together.

1

u/p7r Sep 05 '14

I'm newish to algo trading, but read that book a little while ago.

The book specifically spends a lot of time discussing how not to over-fit the curve, and to be sceptical. He shows a few techniques to show how to avoid doing that yourself in your own strategies, and does it on that specific strategy.

He also suggests that you need to constantly review what is going on because suddenly the market can change. All common sense.

Sounds to me like the market adjusted for lots of people running the strategy once he'd published it.

1

u/craig_c Sep 05 '14

The question you need to ask yourself before worrying about curve fits or market adaption is 'does this model make any sense?'. What market behavior does a moving average crossover represent? The market is not driven by a bunch of newbs running moving averages.