NANEX: Nightmare on Elm Street for HFT Traders

A thoughtful headline and a very good article about the small firm NANEX in this week’s Bloomberg piece:

Staring at four computer monitors, Eric Scott Hunsader, the founder of market-data provider Nanex LLC, looks for hints of illicit trading hidden in psychedelic images of triangles dancing with dots that represent quotes to buy and sell U.S. stocks broken down by the millisecond.

Charts of trading produced by Hunsader’s eight-person firm have captivated everyone from regulators to art gallery owners. One stunt involved a computerized piano piece mimicking quotes for an exchange-traded fund. He infuriates some traders, who say Nanex draws unwarranted conclusions and spreads conspiracy theories.

To Hunsader, the images created from market feeds are evidence of high-frequency trading firms exploiting market rules to turn a profit in a lawless environment. Though others in the industry see his reports and charts as propaganda, Nanex’s interpretations are helping to drive the public debate about the fundamental fairness of the modern stock market.

I’ve blogged about the importance of NANEX’s post on the blog in the past, particularly this excellent post titled “Einstein and The Great Fed Robbery.”

Why care about NANEX is doing? Because:

To illustrate computerized trading to the general public, Nanex has turned trading data into animated videos, with triangles and dots representing tens of thousands of orders dashing between exchanges. One video he posted on YouTube showed a 50-millisecond period in which quotes for Nokia Oyj dashed around the market at a rate of 22,000 per second. The video, published on Oct. 9, has been viewed more than 6,400 times.

He programmed a computer to play piano notes corresponding to different bids and offers for a popular exchange-traded fund, resulting in a manic staccato composition even when slowed down. It was meant to highlight what Hunsader says is the absurdity of modern computerized trading.

Worth reading the entire piece here.

What Happened in the Markets on September 18, 2013 at 2PM?

This is an intriguing analysis at Nanex of what happened in the financial markets (equities and futures) on September 18, 2013 milliseconds before the FED announcement of “no taper” at precisely 2:00PM.

One of Einstein’s great contributions to mankind was the theory of relativity, which is based on the fact that there is a real limit on the speed of light. Information doesn’t travel instantly, it is limited by the speed of light, which in a perfect setting is 186 miles (300km) per millisecond. This has been proven in countless scientific experiments over nearly a century of time. Light, or anything else, has never been found to go faster than 186 miles per millisecond. It is simply impossible to transmit information faster.

Too bad that the bad guys on Wall Street who pulled off The Great Fed Robbery didn’t pay attention in science class. Because hard evidence, along with the speed of light, proves that someone got the Fed announcement news before everyone else. There is simply no way for Wall Street to squirm its way out of this one.

Before 2pm, the Fed news was given to a group of reporters under embargo – which means in a secured lock-up room. This is done so reporters have time to write their stories and publish when the Fed releases its statement at 2pm. The lock-up room is in Washington DC. Stocks are traded in New York (New Jersey really), and many financial futures are traded in Chicago. The distances between these 3 cities and the speed of light is key to proving the theft of public information (early, tradeable access to Fed news).

We’ve learned that the speed of light (information), takes 1 millisecond to travel 186 miles (300km). Therefore, the amount of time it takes to transmit information between two points is limited by distance and how fast computers can encode and decode the information on both sides.

Our experience analyzing the impact of hundreds of news events at the millisecond level tells us that it takes at least 5 milliseconds for information to travel between Chicago and New York. Even though Chicago is closer to Washington DC than New York, the path between the two cities is not straight or optimized: so it takes information a bit longer, about 7 milliseconds, to travel between Chicago and Washington. It takes little under 2 milliseconds between Washington and New York.

Therefore, when the information was officially released in Washington, New York should see it 2 milliseconds later, and Chicago should see it 7 milliseconds later. Which means we should see a reaction in stocks (which trade in New York) about 5 milliseconds before a reaction in financial futures (which trade in Chicago). And this is in fact what we normally see when news is released from Washington.

However, upon close analysis of millisecond time-stamps of trades in stocks and futures (and options, and futures options, and anything else publicly traded), we find that activity in stocks and futures exploded in the same millisecond. This is a physical impossibility. Also, the reaction was within 1 millisecond, meaning it couldn’t have reached Chicago (or New York): another physical possibility. Then there is the case that the information on the Fed Website was not readily understandable for a machine – less than a thousandth of a second is not enough time for someone to commit well over a billion dollars that effectively bought all stocks, futures and options.

The conclusions the authors draw? The announcement was leaked:

The Fed news was leaked to, or known by, a large Wall Street Firm who made the decision to pre-program their trading machines in both New York and Chicago and wait until precisely 2pm when they would buy everything available. It is somewhat fascinating that they tried to be “honest” by waiting until 2pm, but not a thousandth of a second longer. What makes this a more likely explanation is this: we’ve found that news organizations providing timed release services aren’t so good about synchronizing their master clock – and often release plus or minus 15 milliseconds from actual time. Their news machines in New York and Chicago still release the data at the exact same millisecond, but with the same drift in time as the master clock. That is, we’ll see an immediate market reaction at say, 15 milliseconds before the official scheduled time, but in the same millisecond of time in both New York and Chicago. Historically, these news services have shown a time drift of about 30 milliseconds (+/- 15ms), which places the odds that this event was from a timed news service at about 10%. 

Something does sound fishy based on the charts provided by Nanex. I’ve read some of their analyses before and they have been overwhelmingly convincing. We’ll see how this one unfolds pretty soon, I think.

Did Goldman Sachs Overstep in Criminally Charging Its Ex-Programmer?

Michael Lewis’s latest piece for Vanity Fair is an 11,000 examination of how Goldman Sachs acted after finding that one of its ex-programmers, Sergey Aleynikov, allegedly stole computer code. There was a federal trial, and the 41-year-old father of three was sentenced to eight years in federal prison. Investigating Aleynikov’s case, Michael Lewis holds a second trial. The entire piece is worth reading, especially the interviews with Aleynikov in which he presents his views on life (quoted at the bottom in this post).

First, this was an interesting anecdote on why Russians are the best programmers on Wall Street:

He’d been surprised to find that in at least one way he fit in: more than half the programmers at Goldman were Russians. Russians had a reputation for being the best programmers on Wall Street, and Serge thought he knew why: they had been forced to learn programming without the luxury of endless computer time. “In Russia, time on the computer was measured in minutes,” he says. “When you write a program, you are given a tiny time slot to make it work. Consequently we learned to write the code in a way that minimized the amount of debugging. And so you had to think about it a lot before you committed it to paper. . . . The ready availability of computer time creates this mode of working where you just have an idea and type it and maybe erase it 10 times. Good Russian programmers, they tend to have had that one experience at some time in the past: the experience of limited access to computer time.”

A new rule created by the SEC in 2007 called Regulation NMS led to the proliferation of high frequency trading (HFTs):

For reasons not entirely obvious (yet another question for another day), the new rule stimulated a huge amount of stock-market trading. Much of the new volume was generated not by old-fashioned investors but by extremely fast computers controlled by high-frequency-trading firms, like Getco and Citadel and D. E. Shaw and Renaissance Capital, and the high-frequency-trading divisions of big Wall Street firms, especially Goldman Sachs. Essentially, the more places there were to trade stocks, the greater the opportunity there was for high-frequency traders to interpose themselves between buyers on one exchange and sellers on another. This was perverse. The initial promise of computer technology was to remove the intermediary from the financial market, or at least reduce the amount he could scalp from that market. The reality has turned out to be a boom in financial intermediation and an estimated take for Wall Street of somewhere between $10 and $20 billion a year, depending on whose estimates you wish to believe.

Goldman decided to hire Serge Aleynikov to beef up their algorithms to compete with the likes of big hedge funds like Citadel:

A lot of the moneymaking strategies were of the winner-take-all variety. When every player is trying to buy Pepsi after Coke’s stock has popped, the player whose computers can take in data and spit out the obvious response to it first gets all the money. In the various races being run, Goldman was seldom first. That is why they had sought out Serge Aleynikov: to improve the speed of their system.

The article explains how Goldman is a money-making machine, but the appearance of black swan events led many Wall Street firms to lose millions of dollars at the height of the financial crisis, Goldman included:

Day after volatile day in September 2008, Goldman’s supposedly brilliant traders were losing tens of millions of dollars. “All of the expectations didn’t work,” recalls Serge. “They thought they controlled the market, but it was an illusion. Everyone would come into work and were blown away by the fact that they couldn’t control anything at all. . . . Finance is a gambling game for people who enjoy gambling.”

This was probably the most damning paragraph in the piece about Goldman’s relationship with open source software:

But most of his time was spent simply patching the old code. To do this he and the other Goldman programmers resorted, every day, to open-source software, available free to anyone for any purpose. The tools and components they used were not specifically designed for financial markets, but they could be adapted to repair Goldman’s plumbing.

Serge quickly discovered, to his surprise, that Goldman had a one-way relationship with open source. They took huge amounts of free software off the Web, but they did not return it after he had modified it, even when his modifications were very slight and of general rather than financial use. “Once I took some open-source components, repackaged them to come up with a component that was not even used at Goldman Sachs,” he says. “It was basically a way to make two computers look like one, so if one went down the other could jump in and perform the task.” 

On the individualistic (selfish) nature of competition at Goldman, even when efforts were collaborative in nature:

It made no sense to him the way people were paid individually for achievements that were essentially collective. “It was quite competitive. Everyone’s trying to show how good their individual contribution to the team is. Because the team doesn’t get the bonus, the individual does.”

And then we get to the meat of the piece, where Michael Lewis invites people in the HFT industry to come up with their own verdict of whether Serge Aleynikov did something nefarious and/or illegal:

Our system of justice was a poor tool for digging out a rich truth. What was really needed, it seemed to me, was for Serge Aleynikov to be forced to explain what he had done, and why, to people able to understand the explanation and judge it. Goldman Sachs had never asked him to explain himself, and the F.B.I. had not sought help from someone who actually knew anything at all about computers or the high-frequency-trading business. And so over two nights, in a private room of a Wall Street restaurant, I convened a kind of second trial. To serve as both jury and prosecution, I invited half a dozen people intimately familiar with Goldman Sachs, high-frequency trading, and computer programming.

You have to read the piece for the conclusion. As one of the jurors assembled by Michael Lewis says: it was nauseating how Sergey was treated.

One last bit in the informal jury process that caught my attention was Serge’s demeanor and approach to life. Take things as they come; negativity is pointless:

At one point one of the people at the table stopped the conversation about computer code and asked, “Why aren’t you angry?” Serge just smiled back at him. “No, really,” said the other. “How do you stay so calm? I’d be fucking going crazy.” Serge smiled again. “But what does craziness give you?” he said. “What does negative demeanor give you as a person? It doesn’t give you anything. You know that something happened. Your life happened to go in that particular route. If you know that you’re innocent, know it. But at the same time, you know you are in trouble and this is how it’s going to be.” To which he added, “To some extent I’m glad this happened to me. I think it strengthened my understanding of what living is all about.”

What are your thoughts?

###

There’s a very interesting addendum in Vanity Fair in which Michael Lewis is interviewed about his piece. Here, he shares his personal thoughts on Sergey’s time in prison:

Q: For the past 200, 250 years, prison has been an essential part of the Russian experience. Like Dostoyevsky and other Russian authors, and their heroes, Serge found some sense of purpose in his incarceration. Do you think an American could have come away from the experience with that same perspective?

[Michael Lewis]: In the 1950s, European filmmakers, when their films were going to be made for both a Russian and American audience, would change the ending. They would make a happy ending for the American audience and a tragic one for the Russian audience. There’s a photographer named Tacita Dean who has done a series of photographs called “Russian Endings” where she has played on this. I would say that in some ways, there’s something in the water in Russia that enables you to derive a kind of pleasure from a tragic experience. That is not in the water in America. A kind of richness from a tragic experience. And whatever chemical is in the water, Serge drank plenty of it. He is very persuasive on the subject that this was not an all-together bad experience for him. It woke him up to many aspects of life that he had previously been asleep to. I believe him. I don’t think it’s just superficial rationalizing.

When you’re with him, it’s shocking how without anger or bitterness he is. You would never guess, at the dinners I had, that he was one who spent time in jail. You would have picked every other person there.

Also worth highlighting is financial blogger Felix Salmon on his reaction to Lewis’s piece:

I’m increasingly coming to the conclusion that America’s system of jurisprudence simply isn’t up to the task of holding banks and bankers accountable for their actions. The only people who ever get prosecuted are small fry and insider traders, rather than the people who really caused the biggest damage. And the lesson of Sergei Aleynikov is that if and when the laws get beefed up, the banks will simply end up taking advantage of those laws for their own vindictive purposes, rather than becoming victims of them. Given the ease with which Goldman got the FBI to do its bidding, one has to assume that, most of the time, the government will be working on the same side as the big banks, rather than working against them. Do we really want to give those banks ever more powerful weapons?

The Knight Capital “Glitch”

Yesterday, The Knight Capital Group lost $440 million when it sold all the stocks it accidentally bought Wednesday morning because of a “computer glitch.” According to Dealbook:

The losses are greater than the company’s revenue in the second quarter of this year, when it brought in $289 million.

The company said the problems happened because of new trading software that had been installed. The event was the latest to draw attention to the potentially destabilizing effect of the computerized trading that has increasingly dominated the nation’s stock markets.

Until this week, Knight had been one of the biggest beneficiaries of the evolution of the market, helping clients trade in and out of stocks at high speeds.

The glitch occurred over a span of 45 minutes, during which Knight Capital lost $10 million per minute. The stock tumbled 30% yesterday and is down 60% today to a low of $2.75/share.

For a specific glance at the stocks that were affected yesterday, check out this blog post. The blog post begins appropriately “What follows should strike you as crazy. If it doesn’t, read it again, because it is.”

Incredible how much value can be wiped out in a company because someone on the High Frequency Trading desk didn’t do his/her homework.

Mark Cuban on High Frequency Trading

The Wall Street Journal interviewed the brazen Mavericks owner Mark Cuban about his thoughts on high-frequency trading. His response is gritty:

WSJ: What do you say to the argument that high-speed traders provide liquidity to markets and narrow spreads? The argument is that those benefits outweigh the negative side effects that you’re talking about. If the HFTs are pushed out of the market, they say, regular investors will wind up paying more to buy and sell stocks.

Mark Cuban: That’s a bogus argument. By definition they can’t go into an equity unless there already is liquidity. To say they’re adding liquidity is like saying spitting in a thunderstorm is adding liquidity.

As far as narrowing spreads, that’s absolutely true, but in absolute terms what does it translate into? For the individual investor it might save them a quarter a month. So what? Relative to the risk that’s the worst tradeoff in the history of tradeoffs

And the argument is horrible for another reason. If you’re an investor you shouldn’t care if the spread widened by a penny, nickel dime or quarter. If you’re anything but a trader the change is of no impact to whether or not the company will be successful and create returns for investors. In fact, that anyone even considers this a valid argument is a red flag that the exchanges are more interested in traders than investors.

WSJ: What’s the solution? There have been some calls for a transaction tax recently for instance.

Mark Cuban: Public companies need to figure out what business the exchanges are in. Is the market supposed to be a platform for companies to raise money for growth and to create liquidity and opportunity for shareholders as it has been in the past? Or is the stock market a laissez-faire platform that evolves however it evolves? The missing link in all the discussions is: What is the purpose of the stock market?

Good stuff.