10 May 2013

Animation of computerized high-frequency stock trading

It shows one half-second of trading in just one stock, boring old Johnson & Johnson, on May 2. The video slows down the trades so that the milliseconds -- thousandths of a second -- tick slowly by, and so that human eyes can comprehend what's happening.

What you see is trading gone haywire, hopelessly beyond the control of any regulators that might want to make sure all of these trades are legitimate. This flood of trading confuses even other machines, creating mismatches in orders that high-speed traders can exploit, millisecond by millisecond.

"These guys are not stealing dollars, they're stealing pennies," says Nanex founder Eric Hunsader, who presented the video at a recent Wired conference. "It's like paper cuts instead of first-degree murder."..

Inside of the one half-second of trading represented by the video, more than 1,200 orders and 215 actual trades occur, Hunsader says. (The colored boxes in the video represent exchanges, and the dots that go flying represent individual orders.)  
I fully understand that all of this is legal and I will readily concede that the process might "enhance liquidity in the market" (I know that when I place an order online at Schwab, it is completed as fast as I can click the "check order status" button).  But... this still scares the shit out of me.
Regulators are desperately trying to keep up. The European Union last year approved a new rule mandating that all trades must exist for at least a half-second, in order to try to minimize the kind of quote-stuffing that frightens and confuses markets. It turns out that half-second is an eternity. 
It is a financial Armageddon just waiting to happen.  Why doesn't anyone have the cojones to limit this activity?

Addendum:  A well-informed reader wrote to me privately re the content of this post, asking to remain anonymous, and offering the following counterpoints, which I thought were valid enough to bring above the fold to the content of the post -
That HuffPo article is kind of silly, what it shows and what it concludes don't follow at all. What the video seems to show is the pretty straightforward implementation of a regulation called RegNMS. If you send an order to one exchange but there's a better price at another one it's required that the exchanges get you that better price. Obviously that means the exchanges are going to have to talk to each other whenever an order comes in that might have a better price somewhere else. All you're seeing is those "hey can you beat this price" messages going out to all the other exchanges. Skip to 2:50 and you can see one or two happen all alone, the crazy visual is just a lot of that happening all at once. 
Notably there's no indication that anything in the video has anything at all to do with HFT. This is the exchanges and only the exchanges trying to clear trades as fast as they can while complying with the rules they operate under. The cacophony seems to be because there are a lot of orders and computers can execute the straightforward (and, again, legally mandated) arithmetic astonishingly quickly. All the underlying orders could very well be boring mutual funds trading with each other without it looking very different.

Which is not to say that there's no nefarious stuff going on in the markets just that this video doesn't show anything like that. I'm happy to be corrected if I've misinterpreted it of course; I'm not an expert in market microstructure.
(Nanex has an older but more detailed page about some of this at http://www.nanex.net/Research/IsNBBOIgnored.html that seems to be addressing a slightly different issue about which I know nothing)

As an aside, one reason your Schwab trades execute immediately may be that they never even make it to the public market. They're either matched inside Schwab by another customer doing the reverse trade or sent to a 'dark' venue that pays Schwab for doing so:

This is called 'payment for order flow'. Note that this still falls under RegNMS so Schwab (or the venue where your trade eventually ends up) must do the 'notify all exchanges' dance from the video. You can see a nice breakdown of where actual trading volume happens in the US at Bats' website: http://www.batstrading.com/market_summary/. The NASD and TRF volumes are things like Schwab filling the trade internally without ever reaching an exchange but also trades that happen on 'dark pools', like the ones that Schwab sends to. Note I'm not calling out Schwab in particular here, this is common practice. 
I will be the first to agree that the Huffington Post tends to be sensationalist in hyping mundane material to increase clicks, and while the comments above temper my angst a bit, I remain uncomfortable with the overall concept of HFT.  Re the latter, the reader who wrote to me also provided a link to A High Frequency Trader's Apology, which discusses the concept in some detail.


  1. Frank Herbert was ahead of his time.

    Jihad, Butlerian: (see also Great Revolt) — the crusade against computers, thinking machines, and conscious robots begun in 201 B.G. and concluded in 108 B.G. Its chief commandment remains in the O.C. Bible as "Thou shalt not make a machine in the likeness of a human mind."

    Not that computers are evil but perhaps our reliance or willingness to replace reasoning with calculation is questionable, especially in markets. We've seen cases where a misparsed document caused havoc in the market. When do we see this happen by design? Or when do we discover it?

  2. I'd like to see the same animation technique applied around the time the HF stock trading kicked in a few weeks ago after the hacked tweet claiming that the white house had been bombed caused the entire market to drop a huge amount of valuation in seconds, recovering same within seconds once it was deemed a hoax.


  3. There are plenty of trick Wall Street has.

    Did you know that the shares you own in your 401k are rented out without you knowing it? Your portfolio might own 1000 shares of Johnson and Johnson. You bought those those shares with your money. They should belong to you... right? Not really.

    What the brokerages do is actually give you an IOU for 1000 shares of J&J. They take the actually shares and rent them to short sellers. They are making extra money on assets that you own. They are gambling with your money.

    They claim that that they will cover any losses. And they are supposed to. However, some aren't and in fact are passing the losses on to massive 401k's and pensions, hoping they that don't notice.

    A couple of very mathematically smart 401k account holders did notice when the did the math and noticed that their balances didn't add up to the total of assets that they were promised. There have been some lawsuits over this. However, the DOL hasn't done a damn thing about it.

    Most 401K account holders never notice. The brokers bet on this ignorance, so they can gamble with your assets. Their word is their bond, so they claim. Look at how sacred that promise has been.

    This is perfectly legal, and buried in the fine print of your 401k, IRA, or investment account.

  4. This could be controlled easily:
    * 5% Tax on all stocks held less than a minute
    * 2.5% Tax on all stocks held less than a day
    * 1% Tax on all stocks held less than a month
    * 0.1% Tax on all stocks held less than a year
    * No tax on stocks held more than a year (i.e. people/institutions who truly want to invest in a company and see it succeed)

    The fraction of a penny per share they are currently making on these super-fast trades would easily be wiped out by the tax.


Related Posts Plugin for WordPress, Blogger...