For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

Earlier this month Matthew Goldstein of Reuters broke the story of Sergey Aleynikov, a naturalized Russian immigrant who’s been charged with stealing trade secrets from Goldman Sachs. The secret in question was computer code. In particular, according to the feds, it was 32 megabytes of code that Aleynikov encrypted and uploaded to a UK-owned website in Germany prior to leaving Goldman to go work for a competitor at a much, much higher salary.

And what did this incredibly valuable code do? Answer: it ran Goldman’s high frequency trading operation, and it’s drawn attention to the shadowy but wildly lucrative HFT trading sector.

Basically, HFT relies on speed. Traders buy and sell stock thousands of times a second and their profits rely on being able make their trades slightly before ordinary traders make theirs. Speed is so important that a key component of HFT — aside from fast computers, big pipes, and rocket science code — is colocation of their servers. That is, they set up their operations physically close to stock exchange data centers so that trading data has less distance to travel before it gets to them. A few milliseconds in reduced latency time makes all the difference. And that’s not all: you’ll be unsurprised to learn that there’s a regulatory loophole that provides HFT traders with yet another advantage over ordinary schmoes. The New York Times provides an example today of how it all works:

It was July 15, and Intel, the computer chip giant, had reporting robust earnings the night before. Some investors, smelling opportunity, set out to buy shares in the semiconductor company Broadcom. (Their activities were described by an investor at a major Wall Street firm who spoke on the condition of anonymity to protect his job.) The slower traders faced a quandary: If they sought to buy a large number of shares at once, they would tip their hand and risk driving up Broadcom’s price. So, as is often the case on Wall Street, they divided their orders into dozens of small batches, hoping to cover their tracks. One second after the market opened, shares of Broadcom started changing hands at $26.20. The slower traders began issuing buy orders. But rather than being shown to all potential sellers at the same time, some of those orders were most likely routed to a collection of high-frequency traders for just 30 milliseconds — 0.03 seconds — in what are known as flash orders. While markets are supposed to ensure transparency by showing orders to everyone simultaneously, a loophole in regulations allows marketplaces like Nasdaq to show traders some orders ahead of everyone else in exchange for a fee. In less than half a second, high-frequency traders gained a valuable insight: the hunger for Broadcom was growing. Their computers began buying up Broadcom shares and then reselling them to the slower investors at higher prices. The overall price of Broadcom began to rise. Soon, thousands of orders began flooding the markets as high-frequency software went into high gear. Automatic programs began issuing and canceling tiny orders within milliseconds to determine how much the slower traders were willing to pay. The high-frequency computers quickly determined that some investors’ upper limit was $26.40. The price shot to $26.39, and high-frequency programs began offering to sell hundreds of thousands of shares. The result is that the slower-moving investors paid $1.4 million for about 56,000 shares, or $7,800 more than if they had been able to move as quickly as the high-frequency traders.

Tyler Durden has been all over this for a while and estimates that HFT might account for as much as a quarter of Goldman’s total earnings. And here I always thought that fixed income trading was where all the money was. Live and learn.

Anyway, HFT has turned into an arms race, but it’s an arms race that only the elite are allowed to play. You and I just get to foot the bill, a tenth of a cent at a time. Sound familiar?