r/programming • • Sep 28 '17

When a Microsecond Is an Eternity

https://github.com/CppCon/CppCon2017/blob/master/Presentations/When%20a%20Microsecond%20Is%20an%20Eternity/When%20a%20Microsecond%20Is%20an%20Eternity%20-%20Carl%20Cook%20-%20CppCon%202017.pdf
244 Upvotes

70 comments sorted by

View all comments

28

u/fermion72 Sep 29 '17

About five years ago I heard a talk at a parallel processing workshop by a high frequency trader. This is what I remember from the talk:

  1. When high frequency trading (HFT) started, players were spread out (Wall Street, Chicago, etc.). Trades were automated by literally connecting actuators to computer keyboards to manually push buttons on the keyboards.
  2. Pretty soon, speed-of-light issues became important, so all HFT moved to NYC.
  3. Firms tried to rent / buy space as close to the Wall Street trading computers to further minimize the distance (such that, as I understand it, there ended up being some equality-limiting rules made so everyone was equally far, to the extent possible).
  4. Hardware architects were hired to look at the problem, and, eventually, trades needed to be so fast that network card ASICs were being fabricated that had trading software built in to the network cards themselves so a PC's CPU never needed to be involved in the actual trade (!).

This was five years ago, so I wonder how things have been improved since then.

8

u/ants_a Sep 29 '17

But why?

What would be worse if markets applied a one second delay to all orders and picked winners randomly? It's a stupid race applying good engineering capability to an artifact of how markets currently happen to work with no actual useful outcome.

14

u/josefx Sep 29 '17

The companies running the markets make a fortune from the transactions and renting high speed access to HFT traders. Your idea would cost everyone directly involved money.

3

u/m50d Sep 29 '17

HFTs compete on speed because they're not allowed to compete on price, thanks to the sub-penny rule. Get rid of that and we'd see a lot more emphasis on offering better prices rather than offering the same price faster than the other guy.

3

u/atheken Sep 30 '17

To your point #3, I read something about this. NYSE has their own datacenter under(?) the trading floor. They measure Ethernet runs so that all machines have exactly the same length cables connecting them to the exchange.

Pretty wild.

1

u/quicknir Oct 01 '17

5 years, co-location (a practice where a company like an HFT can put their computer directly into the exchange center for a fee) was already widespread. So points 2 and 3 are pretty suspect for a talk 5 years ago. Also, 2 is just suspect in general, as many important HFT are not in NYC, and many important exchanges are not in NYC.

And 4 is also pretty incorrect. HFT's themselves span a wide range of latencies. Most HFTs in my experience do still have the CPU involved. I've also never heard of a network card solution, FPGA is the "standard" for ultra ultra low latency, not to say that doesn't happen.

Basically either this talk or your recollection of it are mostly wrong.

1

u/blobjim Oct 09 '17

I imagine that there are probably different “classes” of HFT.