Defending against high-frequency attacks

It was the summer of 2008. I was 22 years old, and it was my second week working in the crude oil and natural gas options pit at the New York Mercantile Exchange (NYMEX.) My head was throbbing after two consecutive weeks of disorientation. It was like being born into a new world, but without the neuroplasticity of a young human. And then the crowd erupted. “Yeeeehawwww. YeEEEeeHaaaWWWWW. Go get ’em cowboy.”

It seemed that everyone on the sprawling trading floor had started playing Wild Wild West and I had no idea why. After at least thirty seconds, the hollers started to move across the trading floor. They moved away 100 meters or so and then doubled back towards me. After a few meters, he finally got it, and I’m sure he learned a life lesson. Don’t be the biggest jerk in a room filled with traders, and especially, never wear triple-popped pastel-colored Lacoste shirts. This young aspiring trader had been “spurred.”

In other words, someone had made paper spurs out of trading receipts and taped them to his shoes. Go get ’em cowboy.

I was one academic quarter away from finishing a master’s degree in statistics at Stanford University and I had accepted a full time job working in the algorithmic trading group at DRW Trading. I was doing a summer internship before finishing my degree, and after three months of working in the algorithmic trading group in Chicago, I had volunteered to work at the NYMEX. Most ‘algo’ traders didn’t want this job, because it was far-removed from our mental mathematical monasteries, but I knew I would learn a tremendous amount, so I jumped at the opportunity. And by learn, I mean, get ripped calves and triceps, because my job was to stand in place for seven straight hours updating our mathematical models on a bulky tablet PC as trades occurred.

I have no vested interests in the world of high-frequency trading (HFT). I’m currently a PhD student in the quantum information group at Caltech and I have no intentions of returning to finance. I found the work enjoyable, but not as thrilling as thinking about the beginning of the universe (what else is?) However, I do feel like the current discussion about HFT is lop-sided and I’m hoping that I can broaden the perspective by telling a few short stories.

What are the main attacks against HFT? Three of them include the evilness of: front-running markets, making money out of nothing, and instability. It’s easy to point to extreme examples of algorithmic traders abusing markets, and they regularly do, but my argument is that HFT has simply computerized age-old tactics. In this process, these tactics have become more benign and markets more stable.

Front-running markets: large oil producing nations, such as Mexico, often want to hedge their exposure to changing market prices. They do this by purchasing options. This allows them to lock in a minimum sale price, for a fee of a few dollars per barrel. During my time at the NYMEX, I distinctly remember a broker shouting into the pit: “what’s the price on DEC9 puts.” A trader doesn’t want to give away whether they want to buy or sell, because if the other traders know, then they can artificially move the price. In this particular case, this broker was known to sometimes implement parts of Mexico’s oil hedge. The other traders in the pit suspected this was a trade for Mexico because of his anxious tone, some recent geopolitical news, and the expiration date of these options.

Some confident traders took a risk and faded the market. They ended up making between $1-2 million dollars from these trades, relative to what the fair price was at that moment. I mention relative to the fair price, because Mexico ultimately received the better end of this trade. The price of oil dropped in 2009, and Mexico executed its options enabling it to sell its oil at a higher than market price. Mexico spent $1.5 billion to hedge its oil exposure in 2009.

This was an example of humans anticipating the direction of a trade and capturing millions of dollars in profit as a result. It really is profit as long as the traders can redistribute their exposure at the ‘fair’ market price before markets move too far. The analogous strategy in HFT is called “front-running the market” which was highlighted in the New York Times’ recent article “the wolf hunters of Wall Street.” The HFT version involves analyzing the prices on dozens of exchanges simultaneously, and once an order is published in the order book of one exchange, then using this demand to adjust its orders on the other exchanges. This needs to be done within a few microseconds in order to be successful. This is the computerized version of anticipating demand and fading prices accordingly. These tactics as I described them are in a grey area, but they rapidly become illegal.

Making money from nothing: arbitrage opportunities have existed for as long as humans have been trading. I’m sure an ancient trader received quite the rush when he realized for the first time that he could buy gold in one marketplace and then sell it in another, for a profit. This is only worth the trader’s efforts if he makes a profit after all expenses have been taken into consideration. One of the simplest examples in modern terms is called triangle arbitrage, and it usually involves three pairs of currencies. Currency pairs are ratios; such as USD/AUD, which tells you, how many Australian dollars you receive for one US dollar. Imagine that there is a moment in time when the product of ratios \frac{USD}{AUD}\frac{AUD}{CAD}\frac{CAD}{USD} is 1.01. Then, a trader can take her USD, buy AUD, then use her AUD to buy CAD, and then use her CAD to buy USD. As long as the underlying prices didn’t change while she carried out these three trades, she would capture one cent of profit per trade.

After a few trades like this, the prices will equilibrate and the ratio will be restored to one. This is an example of “making money out of nothing.” Clever people have been trading on arbitrage since ancient times and it is a fundamental source of liquidity. It guarantees that the price you pay in Sydney is the same as the price you pay in New York. It also means that if you’re willing to overpay by a penny per share, then you’re guaranteed a computer will find this opportunity and your order will be filled immediately. The main difference now is that once a computer has been programmed to look for a certain type of arbitrage, then the human mind can no longer compete. This is one of the original arenas where the term “high-frequency” was used. Whoever has the fastest machines, is the one who will capture the profit.

Instability: I believe that the arguments against HFT of this type have the most credibility. The concern here is that exceptional leverage creates opportunity for catastrophe. Imaginations ran wild after the Flash Crash of 2010, and even if imaginations outstripped reality, we learned much about the potential instabilities of HFT. A few questions were posed, and we are still debating the answers. What happens if market makers stop trading in unison? What happens if a programming error leads to billions of dollars in mistaken trades? Do feedback loops between algo strategies lead to artificial prices? These are reasonable questions, which are grounded in examples, and future regulation coupled with monitoring should add stability where it’s feasible.

The culture in wealth driven industries today is appalling. However, it’s no worse in HFT than in finance more broadly and many other industries. It’s important that we dissociate our disgust in a broad culture of greed from debates about the merit of HFT. Black boxes are easy targets for blame because they don’t defend themselves. But that doesn’t mean they aren’t useful when implemented properly.

Are we better off with HFT? I’d argue a resounding yes. The primary function of markets is to allocate capital efficiently. Three of the strongest measures of the efficacy of markets lie in “bid-ask” spreads, volume and volatility. If spreads are low and volume is high, then participants are essentially guaranteed access to capital at as close to the “fair price” as possible. There is huge academic literature on how HFT has impacted spreads and volume but the majority of it indicates that spreads have lowered and volume has increased. However, as alluded to above, all of these points are subtle–but in my opinion, it’s clear that HFT has increased the efficiency of markets (it turns out that computers can sometimes be helpful.) Estimates of HFT’s impact on volatility haven’t been nearly as favorable but I’d also argue these studies are more debatable. Basically, correlation is not causation, and it just so happens that our rapidly developing world is probably more volatile than the pre-HFT world of the last Millennia.

We could regulate away HFT, but we wouldn’t be able to get rid of the underlying problems people point to unless we got rid of markets altogether. As with any new industry, there are aspects of HFT that should be better monitored and regulated, but we should have level-heads and diverse data points as we continue this discussion. As with most important problems, I believe the ultimate solution here lies in educating the public. Or in other words, this is my plug for Python classes for all children!!

I promise that I’ll repent by writing something that involves actual quantum things within the next two weeks!

17 thoughts on “Defending against high-frequency attacks

  1. What does this have to do with Quantum Theory. And why would you stain yourself by working with these people. Who cares?

    • Robert, this post has very little to do with describing the phenomena of Quantum Theory. I apologize if I wasted your time. However, for better or worse, this industry employs more than a few folks who were trained in quantum physics. I therefore see multiple reasons why this post is relevant to the mission of this blog.

  2. Thanks for the background information. As a one-time chemist I am all too familiar with the results of run-away kinetics in a self-catalyzed system. The same concerns led Fermi to include those graphite bricks in the nuclear pile they built under the Stagg Field stadium. Just as much of chemistry and physics happens at the balance point between kinetic and potential energy, so the market operates at the balance point between fear and greed. Kinetics makes all the difference. When I first heard about millisecond trading, my first thought was an expectation of wild and apparently random swings in the market. The Flash Crash showed up less than a month later. Ask any cyberneticist — speed up a positive feedback loop relative to the kinetics of negative control elements and you’re looking at a seriously unstable system.

    • Rich, thanks for your interesting perspective. I fully agree about the ramifications of speeding up a positive feedback loop–adiabiticty goes out the window and nonlinearities rule the day! Argh! For what it’s worth, history seems to shine favorably upon HFT’s role in the Flash Crash. However, we are in absolute agreement about speeding up positive feedback loops and the instabilities that may lead to. And it’s not just with financial markets–this is happening everywhere. If only control theorists ruled the world, and implemented control->robust control!

  3. Most arguments against HFT that I’ve seen aren’t against computerized trading at high speeds. They are only against computerized trading at unboundedly high speeds. In other words, enforce a minimum “clock tick” (on the order of milliseconds). All of your benefits seem to still apply, while avoiding many of the (potential) issues. Thoughts?

    • Thanks for the comment. I think there’s something to this idea, but in general, I’m very skeptical of our ability to regulate financial markets. It stems from a fundamental instability: you can make way more money working for a hedge fund than working for the SEC. This means that regulatory bodies generally lag behind the markets. Effectively, the more regulations you put in place, the more opportunities there are for abuse, and the harder it becomes to regulate. Don’t get me wrong REGULATION IS ESSENTIAL. What we need to do is to choose a few simple but essential regulations and then enforce them heavily. Minimum clock ticks (which would have to be implemented exchange side) is one potential choice. Thanks for the idea.

    • Thanks for the comment. I was trying to be punny, and the title is referencing that the pace at which critics are attacking HFT has ramped up severely over the past week. But I definitely agree it’s a cryptic title. Maybe not my best choice ever!

  4. We shouldn’t regulate away HFT, but we should introduce a high-frequency cutoff by averaging over the degrees of freedom higher than, say, 10 Hz. Just mandate that the trades faster than that timescale will have a random delay applied to them. You can trade as fast as you want, but your advantage from HFT diminishes significantly above the cutoff.

    • Would it appear contradictory if I said that I support what I think you’re implying? I absolutely agree that the world is in dire need of change–with an acute emphasis on long-term vision. That belief is one of the reasons I wrote this article.

      There are more important things for us to focus on than HFT. I believe it would be a shame if legislator’s decision-making went like this: there is clear discontent growing amongst our constituents, especially related to a widening wealth-gap. We therefore need to take action, but there is push back from the lobbies of established industries. Well, HFT has been made a symbol of this dissatisfaction, and it doesn’t yet have a large established lobby, so let’s focus our actions on that industry–appeasing everyone except the O(1-10k) algorithmic traders in the world.

      Thanks for the comment, and for linking to Wendell Berry’s thoughtful lecture.

  5. You actually make it seem so easy with your presentation but I find this topic to be actually
    something that I think I would never understand. It seems too complicated and extremely broad for me.
    I am looking forward for your next post, I will try to get the hang of
    it!

  6. I must thank you for the efforts you have put in writing this site.
    I really hope to check out the same high-grade blog posts from you later on as well.
    In truth, your creative writing abilities has encouraged me to get my very own website now 😉

Your thoughts here.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s