Attacking High-Frequency Trading Networks

Turns out you can make money by manipulating the network latency.

cPacket has developed a proof of concept showing that these side-channel attacks can be used to create tiny delays in the transmission of market data and trades. By manipulating specific trading activities by several microseconds, an attacker could gain unfair trading advantage. And because the operation occurs outside the range of monitoring technology, it would remain invisible. “We believe that such techniques pose a substantial risk of creating unfair trading, if used by the wrong people,” Kay says.

It’s hard to know how real this threat is. Certainly micro-traders pay attention to latency, and sometimes even place their computers physically close to exchanges so they can reduce latency. And while it would be illegal to deliberately manipulate someone else’s trades, it is probably okay to place a gazillion trades at the same time which—as a side effect—increases latency for everyone else. My guess is that this isn’t a movie-plot threat, and that traders are trying lots of things along this line to give them a small advantage over everyone else.

On the same subject, can anyone explain this?

Posted on January 12, 2011 at 6:59 AM60 Comments

Comments

BF Skinner January 12, 2011 7:13 AM

Not sure if the knife has any effect. If it does such as exploiting the latency then that implies an actor who should be identifiable.

What I couldn’t find Donovan saying was it was from one or multiple sources. Shouldn’t that be identifiable?

Can we even establish motive without effect or identity?

Slonob January 12, 2011 7:16 AM

I know someone who was paid to do this sort of thing for energy trading. He saw plenty of evidence to suggest that competing companies were doing so as well. One aspect involved colocating servers in the same facilities as the trading system, then proxying trades through that. No competition when the only available sockets are your own. That’s just one example of the methods employed.

Michael January 12, 2011 7:23 AM

You might send trades that are unlikely ever to be matched to a market to measure the latency, as you can measure the time taken until you see your order in the full market depth feed.

Jeff Martin January 12, 2011 7:24 AM

Slashdot had a feature on this story as well, there was some excellent commentary debunking this concept.

Chris Becke January 12, 2011 7:35 AM

I have to suspect that a lot of the weird digital artifacts introduced by HFT could be softened if exchanges, essentially attempted to operate like a MMO. Decide on a minimum reference trade latency – say 1 second. Batch all transaction requests in 1 second lumps. If there are any conflicting trades in a batch, choose one randomly and reject the rest.

Carlo Graziani January 12, 2011 7:35 AM

Latency attacks on high-frequency traders are analogous to DDOS attacks on virus writers.

High-frequency trading is itself an essentially parasitic activity, bearing no relationship to the efficient capital allocation that (if we trouble to recall) is supposed to be the concern of players in capital markets. It’s a form of legalized insider trading, wherein market players leverage their privileged positions with respect to trading “floors” to indulge in trading activities that ordinary investors are shut out from.

If this useless (but remunerative) game is now itself being gamed, the appropriate reaction is HAHAHAHAHAHA, not concern.

Jeff Martin January 12, 2011 7:45 AM

re: the second linked article, I cant take anyone who would use the term ‘algorithmic terrorism’ seriously

bob (the original bob) January 12, 2011 8:01 AM

Obviously, this “knife” effect is some sort of communications medium for terrorists to encode messages into a high-reliability data stream and send them to each other for C3. We should immediately establish a Federal Czar and pay him shitloads of money and give him a huge staff in order to root this out.

Marrrr January 12, 2011 8:07 AM

Another reason why a per-transaction tax on stock trading would be a good idea. No real effect on legitimate traders, would hit manipulators hard.

c January 12, 2011 8:16 AM

Not sure how important this is to you but Zero Hedge has shown trading charts in the past with this pattern of “clogging” the trade flow so I think this goes beyond concept. Yes, I realize ZH approaches conspiracy-theory land but that doesn’t mean an occasional article can’t carry some truth.

Robert Mannal January 12, 2011 8:18 AM

Good developers test before releasing. Could these diverse quotes be tests before settling on an optimum solution…which may have significant consequences?

Tim January 12, 2011 8:21 AM

This is ridiculous. How is trading that is sensitive to microsecond delays legal?

I think the governments should legislate that trades occur on one second intervals, rather than pseudo-instantly.

Samuel Tardieu January 12, 2011 8:23 AM

I’ve always wondered if we could change the some trading systems into synchronous ones where, for example, sell and buy orders are sent during interval [N;N+1[ and executed at N+1, let’s say every second. This way, latency wouldn’t play a role, and I guess most actors would vote for such a solution. 86400 times a day should be enough for a sane economy.

Randy January 12, 2011 9:05 AM

@Marrrr – Re: “per-transaction tax”
I wonder if $1.00 would stop them.

@Tim – Re: “legislate that trades occur on one second intervals”
I would even go further and say once every minute. These behaviors do not help society or the economy in any way. These people are leaches. If you have to game a system to make money, you should find another business.

Randy.

Phil January 12, 2011 9:43 AM

@samuel tardeieu : I think most actors would go along, but the true players would basically veto it, since HFT is a parasitic activity to begin with by which they create massive profits.

Foolish Jordan January 12, 2011 9:45 AM

My theory about the sawtooth shapes are that you have two robots, both of which want to be the best bid. So, one goes a penny in front of the other. A very small amount of time later, the other one goes a penny in front of the first. Repeat a few dozen times until one of the bots says, “oh, this is too high”, and then leaves the market completely. Now the other bot says, “hey, why am I up here 30 cents above the next best bid when I could be bidding only 1 cent above the next best bid?!” so it cancels its order and goes back to 1 cent above the non-bot best bid. Now the second bot which had been pouting in a corner now sees that it can improve the best bid by a penny and be in front again. Rinse, repeat, etc.

BF Skinner January 12, 2011 10:24 AM

@Tim “How is trading that is sensitive to microsecond delays legal?”

Because it hasn’t yet been identified as a significant problem or unfair advantage? Even if it does don’t expect any regulation from the Treasury/SEC or Commerce…unless it hurts GoldmanSachs and other 2big2fails

I’m not doing this cause all my trades cost me money.

john Campbell January 12, 2011 11:23 AM

A long time ago in a building they moved away from, I worked on the Common Message Switch for SIAC, the system that connected the member firms to the trading floor.

I find it distinctly odd that we’ve wandered away from financial interactions that human beings had to mediate (all right, so the Bonds Market was automated at that time) into the realm of duelling computers (sounds like an ST:TOS episode, don’t it?) where it’s more than just two systems going at it, it can be thousands, all competing for an “edge”.

The calls for one-second granularity for all trades makes some sense, but, really, maybe we need to go back to the floor and the “Floor Communications Standards” and then shake things out.

(shrugs)

I dunno, this sounds like the early part of Tom Clancy’s “Debt of Honor” (readers of which likely think the ending inspired Al Qaeda).

phred14 January 12, 2011 11:26 AM

Let me be a real Luddite for a moment, and drop back to the concept of “investing”, or my understanding thereof.

I always thought that you begin with someone, somewhere who knows how to make something or do something that will make money – except that it takes money to get into that business, and he/she doesn’t have that money. An “investor” comes along and says, “Here’s the money you need to do your business, and in return for use of the money, I get some sort of consideration from you.” (Cash, a percentage, a piece of the business, etc.)

I also thought that the idea of the Stock Market was to scale this up, and bring investors and investees together into a marketplace.

Nobody can do anything in the real world with money he has for only a millisecond. In fact it seems to me that the Stock Markets have become as much a betting parlor as they are an investment mechanism. I guess the “value” of fast trading might be that it’s a mechanism to determine the “value” of the various investment options.

Enter HFT and the like, and it seems to be that valuation of an investment option becomes more a matter of statistical noise in the system than any sort of rational evaluation of that investment option. In other words, I don’t see any real-world value to HFT, and in fact it hampers real-world investment. I also realize that very big players make a lot of money with HFT, and therefore it’s not going away.

But this article illustrates that HFT enables new potential fail mechanisms. From what I read in the links, it sounds like these phenomena are a combination of statistical noise, oddly-acting robots, and a bit of deliberate latency gaming by some of the players. Imagine what a determined malicious attack would be or could do.

Back to my Luddite start… I would say that my strategy would be to invest in seasons rather than nanoseconds. The amount that HFT could skim from me would be limited because I’ve described very few transactions. The biggest problems to me of HFT would be finding the fair value to trade, and the potential for HFT artifacts to sink or impair a company I’ve invested in with one of those “statistical oddity valuations.”

Petréa Mitchell January 12, 2011 11:36 AM

Timing delays: As part of the analysis of the financial crisis and the overall changes in the economy since about 1980, there’s a growing awareness of how huge the first-mover advantage has gotten. I’m not qualified to say if the attack described is practical in the real world, but I’m open to the possibility.

Bizarre patterns: I would bet (and remember that we are all betting actual money that financial markets work the way we think they do) it’s the result of either two bots interacting, or even one bot whose rules have gotten so complex it can’t be properly tested anymore.

RH January 12, 2011 11:46 AM

Possible uses for sawtooths and a possible side-channel attack: a HFT MUST know its latency to a very high degree of accuracy. In a market, where volume can change latency, they need to measure it. I would guess that not only do these strange bids yield pricing information for the HFT, but latency information as well.

If you know your latency, you can predict it. If you are predicting your latency, anyone who can modify your latency unpredictably can beat your algorithm.

Dirk Praet January 12, 2011 12:04 PM

Fascinating stuff.

By far the coolest scenario would be that BATS has become self-aware and is in the early stages of preparing the financial equivalent of Judgement Day. DHS geeks may be looking into it, searching for clues that some foreign agency is experimenting with software to destabilise financial markets as part of some cyberwar effort.

Unfortunately, the most likely explanation is that some financial whiz kids and the hands that feed them have found yet another new and exciting way to con competitors, small investors and other folks out of their money.

aikimark January 12, 2011 12:37 PM

I would recommend creating a buffer for automated trades that would only flush every 1/10 second (or every second). Duplicate bids and cancelling bids would be dropped.

Doug Coulter January 12, 2011 12:45 PM

@Foolish Jordan,
You’ve pretty much nailed it here. What you are seeing is poorly written code by people who couldn’t close a feedback loop with delay in a single program, much less have it work with the other players and be stable. These quants just don’t get signal processing theory, and so are limited to sort of “try everything” approaches and dumb small increments. I’ll give them this, once SEC (or whoever) cancelled some way-out trades, on my level II data, you’d always see one joker out there willing to buy a million shares of $Stock for a penny, while simultaneously offering a few shares at $100,000. You’d think that would serve as a pretty good debug for other people’s code, heh. But that’s lagged off of late, since those trades get canceled.

Many of these HFT things are for a lot of shares and in fractions of a penny where joe online trader can’t even participate, but with 100k shares or so a pop, and the frequency it adds up to bucks per day for someone.

I wrote about this and some manipulation ploys in the market here, on my blog (which is mostly about other things, but I trade for a living here).

http://www.coultersmithing.com/forums/viewtopic.php?f=42&t=178

You can see some of this on the usual suspects even with “mere” level II data (which used to cost thousands a year for an entity to get, now it’s free or nearly so on most online brokerages).

The usual suspects being C, BAC, SPY, always have the largest volume when these players are at it. My advice is to simply avoid issues that show this chop — you’re not going to beat those guys. And in general, the HFT seems to hold up any big moves, kind of smoothers them out in these little dinky increments. The stocks these guys don’t (and can’t) play are better to work with. They can’t play with most stocks, as their computers are at this point still to stupid to account for their own effects on things, which is one reason they are so jittery and have to dump at the slightest sign a trade is going against them. No human judgment (heck in many cases, not even a median smoothing) to say, hey, lets “give this a little, it looks good just slightly longer term”. Of course, a sane human wouldn’t have dropped that many eggs in one basket at a time hoping for a tiny gain per trade on it in the first place, and might have some reason for longer term confidence, based on things we don’t know how to tell computers about, say the rare earth situation for example.
No way to put “news” into the trading algorithm.
And most existing measures of “sentiment” are bogus, wrong, and late. Humans who trade have to pick that up from the ephemera and the gut.

But this is all moves over a penny or so, these guys don’t do the big market manipulations, which more or less takes a human in the loop. I describe a few of the more well known ploys for that in the articles referenced. In that case, the moves are large enough for an astute trader to ride along with.

Investing is dead, and was mostly a farce during most of its reign. You were never really investing, you were buying paper you hoped to sell to “the greater fool” later. You can’t take your stock back to the company and demand some product for it, you know. It’s just paper (nowadays, just bits).

And this is gambling, but it’s not roulette, it’s poker, where a good player affects his chances, fair and square. It’s watching human behavior and being on the other side of a trade of it when it’s dumb. It can be sort of soul-killing as you cannot use your emotions in this — they will make you lose money every time, you must suppress them. You’re counting on the other guys inappropriate use of his emotions to beat him.

I admit, it is fun to take money from evil investment banks and guys who club baby seals and give it to a good cause (my fusion research).

Just like in poker, you can choose only to sit at tables where the other players are mostly bad guys who deserve to lose…That makes it feel better, anyway.

Doug Coulter January 12, 2011 12:55 PM

Forgot to add — you are right phred — no one can do anything with money for a few milliseconds other than to trade with it.

You didn’t think that when you bought stock you were buying it from the company, or even having any affect whatsoever on their fortunes, did you?

In all but new offerings, you’re just trading it from one entity to another — the company is almost totally unaffected either way unless they own a lot of their own stock….

The huge amount of trading that goes on has no effect on the company people think they are “investing” in. They got their money already, and never have to pay it back, ever. Until people understand that, they should not be in this game.
Yes, some companies pay dividends at their pleasure, but it’s not a requirement at any time and can be (and is) canceled whenever they feel like it. They pay dividends to keep people in stocks of their company (since they usually own some too), because a divvie is usually a tacit admission that the big growth in basic value is over with. Also, it makes it more difficult to short a stock at a profit if it’s going to pay dividends. Not impossible, just harder.

And by the way, I rarely day-trade, seasons suit me fine too — and that’s trading, not investing by most definitions. I still use day trading skills to pick entries and exits, as I play high beta stocks that might have a 2% swing in a day, and adding twice that to every “season” trade doesn’t hurt one bit. About the only time I day trade is when I make a big mistake, and it’s better to admit that and get back out right away when it happens. Or at the other extreme, call it just right, make 10% in a couple hours, and too good to be true is correct — get out while you can, as it will revert to “just good” soon enough.

T January 12, 2011 1:01 PM

Professional trading has always been a competition. Before computers, the speed of the competition was limited both by how fast humans could react and by geometrically increasing coordination costs as the number of humans increased linearly. But, as humans were the decision makers, the market could be understood by humans.

With computerized trading, these limitations are removed. In this new paradigm, professional trading has become an arms race. Heuristic algorithms are an important tool in the race. As more heuristic algorithms become active, they start to interact in complex, unexpected, and (often) indiscernible ways.

As the high frequency market becomes more chaotic, deterministic algorithms become less relevant. There is more need for heuristic algorithms trained to respond to the chaos. Essentially, it becomes a positive feedback loop, encouraging chaos. Humans become less relevant in designing trading tactics and our ability to fully comprehend what is going on diminishes.

In a perfect world, none of this would matter to everyday people. But, sometimes that chaos leads to momentary instability that can leak out into the regular stock market, causing problems. I doubt that the government has the ability to control this arms race. I hope that they figure out a way to insulate the chaotic effects from the larger stock market. It’s a faint hope.

Doug Coulter January 12, 2011 2:06 PM

@T,
probably all us honest traders would agree, and in fact are largely glad that the information asymmetry is going away. You used to have a broker who was the only guy who could afford instant by instant information, you had really limited bandwidth to him, and had to trust him to execute (or not) based on your interests, or worse, to just manage your account, which no one cares as much about when it’s not their own money.

Wish I could put up some screen shots (I do on my forums). It’s luckily pretty obvious which equities and other instruments these HFT guys are playing, and for now, easy to avoid those, there’s a lot of fish in this sea.

I at any rate, do better playing stocks that aren’t super-liquid (which these guys require), and for which I’ve kind of developed a feel for “who is sitting across the table” so I can develop what the “tells” are of the other players. Still plenty of room there. For the moment.

I agree they should cut this parasite off at the knees, it’s not really doing anyone any good but (a few of) them. Not too much harm either, so far, if you stay out of the issue they’re slamming back and forth, except for those issues which tend to drag the markets along with them.

ETF’s are actually a worse curse in the markets now. Suppose I want to be in just best-in-breed stocks in whatever sectors are doing best now. I could do my homework, due diligence, check the numbers, see if a company was well managed, and more or less earn my gains fair and square doing that. And in general, I prefer to be long in stocks, rather than short, I just feel better about that. And there are some standout companies that are doing well because they’re good at what they do, but aren’t in the news much.

Now, when a big ETF comes along and covers a whole sector, it smears the effect of good vs bad companies out — when people jump into the ETF, they all go up, deserving or not. When people bail out (probably because one of the bad holdings drags the whole thing down), the reverse is true, deserving or not. This ties the good companies to the bad ones in ways that the entire competitive system was designed to avoid…and encourages twitchy “dumb money” to play in things they really shouldn’t. They make people think they don’t have to do their homework and are somehow now “safe”. No, what this really is, is the people who create these instruments know they can make more on what look like small percentage fees — they don’t have to trade successfully anymore, they have a meal ticket.
Far from being pros who can make money at trading, they are simply skimming off everyone, it’s purely a one way flow of money, which you can’t quite even say about the HFT guys — sometimes you can beat them, at least…no way to beat someone who just sits in the middle and collects money risk free (to them). It might be a tiny fraction of your money, but they have no skin to speak of in the game (they know it’s risky and difficult) — so for them it’s nearly pure profit, risk free. That’s a pretty good definition of parasite in my book, and it messes things up for the rest of us even if we don’t use them ourselves.

DayOwl January 12, 2011 3:05 PM

The attack strategy is interesting and could be a concern on a theoretical level. Has it occurred already? Or is it just a possibility?

HFT is regarded as “unfair trading” and the very definition of manipulation anyway. Now we’re supposed to worry because someone might out-cheat the cheaters?

DayOwl January 12, 2011 3:12 PM

The conclusion of the article is a serious disappointment. “More regulation!” Yah, that’s working really well.

How can any government regulate something so few people understand? When was the last time the government’s efficiency and smarts impressed you?

JT January 12, 2011 3:29 PM

Algorithmic Terrorism + Exotic Location + Evil Villain + Bogus Crypto + Hot Female + British Actor = New James Bond Movie.

Gabriel January 12, 2011 6:31 PM

Perhaps the trading algorithms have formed a collective conscious. I’m sure we will soon hear from our new masters. I for one will welcome our AI overlords. I am certain they will do a much better job than our current leaders.

If that doesn’t work out, then we can pick our favorite AI resistance movie as a guideline.

Dirk Praet January 12, 2011 6:51 PM

@ Doug Coulter

Many thanks for your valuable insights into HFT and ETF. I really don’t know squat about these things, so pardon my ignorance in asking how – if at all – this is contributing to the market and the economy in any way ? Would it be fair to compare it to some new drug that gives an athlete an unfair advantage and usage of which the governing bodies haven’t regulated or come up with a way to diagnose yet ?

RobertT January 12, 2011 6:59 PM

@Doug,
I have done some consulting work with two HFT groups. One was clueless, they just seemed to rely on the concept that the underlying momentum could be sensed by small purchases either side of the last price. In this way it was impossible for a big institutional trade to slip through without the HFT seeing the trade and extracting a tax.

The other group was far far more sophisticated, their tests looked at market stability and even tried to introduce intentional instability. It was amazing to see how many stocks behaved as under-damped oscillators. Of-course if you created the order impulse and you know there is no real order behind the trade (just a crossed trade) than you can profit from the predictable response. It was interesting to see how a few well timed executions could even amplify an oscillation.

The latter group actually modeled the channel gain and the trading phase shift, for each equity, they also did real time stability analysis somewhat akin to the Middlebrook method for feedback stability in electronic systems. They also had some very interesting tests for market manipulation (that was not there own) these tests assessed channel linearity and represented the channel as a series of bi-linear and tri-linear equations. Lots of interesting Number theory math.

I’ll avoid judging the morality of their actions, because what they do is legal and even creates liquidity for the small individual investor. It is strictly institutional investors that really pay the HFT tax.

sddengineer January 12, 2011 7:28 PM

Clearly, they are raising the noise floor according to a code they can easily filter out for their own use. Soon you can expect them to go polymorphic since their patters are very simplistic so far. We did this years ago in optical communications systems.

Jimbo January 12, 2011 8:14 PM

There are actually companies hiring hardware and FPGA designers to make hardware specifically for this stuff. Apparently the run of the mill computers aren’t fast enough.

It’s ridiculous.

Anton January 12, 2011 9:04 PM

When I was consulting to a BIG swiss bank, the IT guy was very worried about service level on this private network because their traders would not tolerate even a 1 second latency when trading on the other side of the Atlantic.

dob January 12, 2011 11:58 PM

@DayOwl: Quite a defeatist attitude you’ve got going on there.

The USPS is a marvel of logistics and efficiency. They provide fast, highly reliable and inexpensive delivery, while under service mandates that would make private industry despair. The CDC, NIH, and NSF are paragons of academic excellence. Medicare delivers coverage to the most risky portion of the populace with a small fraction of the overhead of private insurers. The VA health care system, a public enterprise along the lines of the NHS, routinely delivers the best care available in the United States. I could go on, but you should get the picture. Your blanket assumption that government is by definition dumb and inefficient is foolish.

On a time, the SEC was a regulatory agency with power and deep understanding, there’s no reason to believe it couldn’t become so again.

Richard Steven Hack January 13, 2011 12:29 AM

This stuff reminds me of Charles Stross’ “Accelerando” novel in which, quoting Wikipedia:

“They discover that they are being hosted in a Matrioshka brain, the builders of which seem to have disappeared (or destroyed by its own creations), leaving an anarchy ruled by sentient, viral corporations and scavengers who attempt to use newcomers as currency… The crew upload their virtual states into new bodies, and find that they are all now bankrupt, unable to compete with the new Economics 2.0 model practiced by the inner system.”

Another descrption: “The supercomputing dyson spheres of the inner system created Economics 2.0 which ended up crippling human and posthuman economies. Economics 2.0 is made for the corporate AIs and optimized for them, and as flexible as posthumans are, they can’t keep up.”

And again: “Matrioska brains are the logical product of evolution, and around the time that they are created, the intelligence that created them tends to get outcompeted by business software, and they take over the whole brain.”

I never quite got this business, but this post on trading glitches starts to make sense of it. Or not.

Phocks January 13, 2011 4:44 AM

@ dob:

Really?
The USPS operates at a loss, and controls the bleeding by having a monopoly. Medicare operates at…a huge loss of course, but also is ‘efficient’ in the sense that they literally can mandate how much they want to pay, and the seller has to accept that price – which is why many private health systems (Mayo Clinic, anyone?) are flirting with opting out. The VA, AGAIN, isn’t efficient, it simply has a ton of money. If you were a veteran, you might have tried using the system, and discovered that it is NOT the shining example of efficiency the government claims. The other agencies you mention, I do agree with you, but I submit that this is mostly because they are by government standards tiny organizations, and staffed by the sort of people who tend to be quite devoted to their profession. Look at OSHA, an organization similar in concept to the NIH, but operating as a bloated monster of ridiculous but ‘common-sense’ rules. Competency by a government body has become the exception, not the rule unfortunately.

Greg January 13, 2011 5:11 AM

Remember that some algorithmic trading will be driven by genetic algorithm that “learn”, without anyone in any sense “understanding” why any given strategy works. Given that, it is highly likely that some trading programs have already independently discovered this so-called attack as a profitable trading strategy.

As to whether this is a good thing, well that’s a different question entirely…

Daniel Wijk January 13, 2011 6:46 AM

Greg: I find it a little hard to believe that the system itself took that descision thou.

Most likley they have constraints as well as to not cause them to commit to illegal action without the owners consent.

Dirk Praet January 13, 2011 8:25 AM

@ Daniel Wijk

I wouldn’t put my money on that assumption.

Having done quite some programming myself in my day – and I occasionally still do – , I know just how hard it is to prevent even ordinary users from subverting a system in an interactive environment. When working with complex learning algorithms in a high-speed environment with minimal human interaction and limited knowledge of what to anticipate and what to constrain – most of this stuff probably being version 1.0 – this becomes even more difficult.

Add to that that many programmers still are more concerned with getting a program to run rather than getting it to run safely, I don’t think Greg’s idea is that far fetched.

John January 13, 2011 8:45 AM

I don’t see the value of allowing 800,000 trades in 1 second. I mean, obviously the exploitative money-making algorithms here are able to twiddle the market machine a bit and play bot-wars to siphon money into their accounts; but what’s the greater advantage to the economy overall?

My solution to this problem is to boundary every trade to 1 second. So queue all trades received between 13:17:26 and 13:17:27; make their effective execution time 13:17:27, not 13:17:26.{000-999}. Enjoy.

Ender of Microsecond Trades January 13, 2011 9:17 AM

The simple solution is to institute a tax on trades inversely proportional to the length of time holding a stock:

50% of the price of the stock if selling a stock held for one minute;
1% of the price of the stock if selling a stock held for one day.

Millisecond trading would dry up in a hurry and actual investors (who hold the stock for a year or more) would barely be affected.

VoodooTrucker January 13, 2011 10:15 AM

Sounds like latency testing attacks on CPUs. Try different orders, see how long they take to complete. You might be able to tell how many other people have placed similar bids by how long the database takes to return a result. (Just a guess, I know about computers, but nothing about trading)

Doug Coulter January 13, 2011 10:37 AM

@RobertT,
Thanks for the info, I’ve suspected as such, and even kind of confirmed some of your observations, just sitting watching trades go down “trade by trade” or more accurately about about 1 sec intervals. Maybe it helps that I did a lotta years at signal processing, but to my eyes many of the patterns are under-damped oscillations as you say.

Another interesting observation is that at the slower speeds I can observe at (~1 sec is my lower limit) you can see the “center frequency” change according to human anxiety. I’d assume that this is mostly the humans involved, but it’s a good indicator on how twitchy a market is at the moment, which helps me trade.

@John,
Yep, that would help, batch them up for a second and trade synchronously, if they could figure out how to do that. Keeping a bunch of clocks together on widely spaced systems might be an issue. I pay taxes enough already, this doesn’t require that. I note that the canceling of some trades that happened during the flash crash has cut down on some of the more ridiculous bids and asks…probably a good thing most of the time.

Of course, the reason they did that is to keep humans from doing it themselves. Why not place bids on every stock at a tiny fraction of its worth, and sell orders at many times its worth, and hope for a glitch that makes you rich? You get a beep, exit the trade, bingo. I’ve myself gained an extra percent or two on many trades just by setting an offer price lower than the current norm, and had one odd trade get it filled, and then do the same thing later when it’s time to sell. All those single digit extra percents add up nicely over a years time on week-duration trades.

One could imagine some rule that hinders “quote stuffing” as well. These things clutter up the markets with many quotes that are canceled instantly just so they can see if there are any effects. My trading software doesn’t show these, someone is obviously able to filter them out, so…maybe the exchanges should, too. I’m not sure if that’s profitable for them — would have to look into that, maybe they don’t mind as the exchanges themselves get a little money out of this? Another example though of a simple rule that might help things.

Me, I just wish the API to my trading platform wasn’t all XML (yuck) or I’d be doing neural nets driving state machines here myself — but only as indicators. I like to have final control, I know way too much about computers and possible unforeseen situations making (apparently) good software of all kinds do something stupid — even simple state machines that seemed well designed at the time. When it’s real money, that’s just too scary. Full automation seems like a good way to fail quickly most of the time, and abdicate responsibility for it in the bargain. I’m not that kind of guy!

mk11 January 13, 2011 3:51 PM

There was an interesting discussion about this (nanex) at the time on a trading forum, though I can’t find where. From memory, there were a few different views:

  • software testing
  • badly coded, misbehaving software
  • feelers sent out by quoting systems to see how other systems react and calibrate accordingly
  • noise meant to confuse rival systems
  • the birth of Skynet

Personally, as a simple humanoid who used to be a stock option market maker in the second half of the nineties, any combination of the first four seems pretty plausible. We humans used to do stuff like this manually at say closing times to skew margin calls in our favour on strikes that hadn’t traded. Obviously, this has now been amplified a thousandfold through technical evolution and automated systems. I’m not sure how standardised exchanges have become now, but at least in my time while single mistrades would be cancelled by the exchange, spreads were not covered and although there was a gentleman’s agreement to back out, this had to be negotiated case by case and a “finder’s fee” was usually due. So there certainly was an incentive to quote absurd prices on spreads.

Latency was already a major concern for some, but in my view trumped by connection stability. As I think Doug mentions above, we had major issues with exchange requirements being dumped on us (NT and trading platforms coded in VB) with which we had to replace our VAXen and in-house software. Cue screams and/or insane cackling.

The digitalisation of the exchanges was also pushed through with extreme pressure from banks and a lot of corners were cut on the systemic level. There has certainly been an exponential rise in complexity since then and when from time to time I meet people who have inside knowledge of how this was built, in a certain sense it’s quite wondrous that it all works as well as it does, since I think there is is absolutely no one who has a clue as to how it all fully functions, which is both scary and somewhat reassuring to the more paranoid-minded among us, as a it precludes any kind of global hack. That’s not to say the market is fair, it’s not, some players simply have too much clout, but it’s more a case of smaller companies looking for any kind of edge/hack, the big boys just rake it in and get bailed out when they screw up.

That said, the market has been decoupled from the economy for a long time and in the case of an economy which is shifting from manufacture to services, I’m not sure it makes much sense to gripe about it. Evolution is neither good nor bad, it simply is.

RobertT January 13, 2011 9:44 PM

@Doug,
there seems to be some misunderstanding here in the group about the value of reducing trade latency and the corresponding value of maintaining a constant known sample latency. I’m certainly not an expert in this area but let me suggest a few ideas to get people thinking about the importance of these parameters.

If you think of the whole system as a network that is generating unknown (but bandwidth limited) real time signal, then you know, from signal theory, that the three most important measurements are sample frequency, amplitude accuracy (quantization) and sample jitter.

Since the signals are all contiguous connections of discrete trades, it makes sense that you use an oversampling type converter (cascade of integrators) to detect underlying activity. Ideally for this type of converter the sample size should be small and constant, hence the focus on regular 100 unit orders. Constant sampling is important because jitter in the sample interval folds noise down into the desired signal band.

If you are trying to profitably manipulate the natural behavior of the signal, than you want the highest possible sample frequency (avoids aliasing) and lowest possible sample jitter (best noise floor). Anything that decreases this timing accuracy will pollute the measurement and alias extraneous data into band.

So any external system that can create sample jitter, especially for a know adversary, will cause them to see increased in-band noise. This added channel noise is very important to any institution (read pension fund) especially if it is trying to algorithmically hide their transactions.

Additionally, as with any algorithmic signal spreading, the most important secret is the spreading algorithm and spreading key (PN sequence). If your adversary can ever discover the spreading sequence than he can use this to implement “processor gain” and recover a trading signal previously buried in the system noise floor.

So, to conclude, Institutions can profit from intentionally introducing and shaping latency, without necessarily tricking anyone into executing a silly trade, just the added channel noise can be valuable.

RobertT January 14, 2011 3:30 AM

@John
“My solution to this problem is to boundary every trade to 1 second. So queue all trades received between 13:17:26 and 13:17:27; make their effective execution time 13:17:27, not 13:17:26.{000-999}.”

Sounds very difficult to implement, e.g. how would you stop order entry from being observed before the transaction. There would be a fortune to be made in knowing if a large buy or sell order was bundled into that 1 sec interval. The HTF trader could reduce risk considerably by just knowing which intervals contained large orders and only making market for those blocks. Worse still what happens to a big order that is not crossed, does it enter the next interval as an observable overhang. Such a clear signal of market sentiment would need to be disguised / obfuscated, this would probably require the addition of per interval order “noise”. There would be a very real cost (risk) in adding sufficient noise that even large overhangs are not visible. Who exactly would assume this risk? and for what possible reward?

To some extent a market has evolved that is similar to what you want, this is so called “dark pools”. Because of a perceived order execution advantage, these pools attract a lot of large orders. IMHO only a truly naive
player would believe that “dark pool” order entry is not being actively data mined (sometimes by the creator of the dark pool)

Randall January 19, 2011 12:59 AM

The knife — maybe they think the bid price may rise to somewhere in the middle of the range they’re covering, and want to be in place to take the best advantage if it does. If they just set their ask to the lower end of the “knife” they’d sell it for less than they could get away with if the bid rose a lot, and if they set it to the higher end they’d miss opportunities to sell when the bid price rose but not to the top of their range. And by sending these quotes out blind, there’s no reacting to a bid price movement once it happens — no latency.

If that’s why the knife exists, exchanges could make it useless by letting traders submit two bid or ask prices and using some randomized process to pick a transaction price when another trader’s price overlaps their range.

Other ideas: software has a guess about when at the millisecond level a change is most likely to happen and the knife somehow exploits that, or it creates a strategic difficulty for other large traders that a single bid price wouldn’t, or the knife doesn’t in fact do anything useful but someone thinks it does.

Confusing other high-frequency traders just doesn’t seem like the most likely motive. Strategies you can see with your eyeballs are easy to train software to filter out.

Stubby triangles — they must be getting back information from responses to those cancelled orders, maybe from traders who erroneously reply as if the order weren’t cancelled/before it’s cancelled. That’s the least hard to explain. The order size variation in the second-to-last example must be based on a similar idea.

pay June 13, 2019 1:20 PM

This absolutely is going on, everyone should follow what Eric Hunsader produces, he’s the best stock data analyst and a whistleblower who is constantly revealing manipulation and errors mainly by HFT firms, the exchanges, and SEC corrpution.

Here’s one example of evidence that HFT traders have deliberately DOS’d stocks.
http://www.nanex.net/aqck2/3660.html

Leave a comment

Login

Allowed HTML <a href="URL"> • <em> <cite> <i> • <strong> <b> • <sub> <sup> • <ul> <ol> <li> • <blockquote> <pre> Markdown Extra syntax via https://michelf.ca/projects/php-markdown/extra/

Sidebar photo of Bruce Schneier by Joe MacInnis.