How To Lose $172,222 a Second For 45 Minutes
An anonymous reader writes "Investment firm Knight Capital made headlines in 2012 for losing over $400 million on the New York Stock Exchange because of problems with their algorithmic trading software. Now, the owner of a Python programming blog noticed the release of a detailed SEC report into exactly what went wrong (PDF). It shows how a botched update rollout combined with useless or nonexistent process guidelines cost the company over $172,000 a second for over 45 minutes. From the report: 'When Knight used the Power Peg code previously, as child orders were executed, a cumulative quantity function counted the number of shares of the parent order that had been executed. This feature instructed the code to stop routing child orders after the parent order had been filled completely. In 2003, Knight ceased using the Power Peg functionality. In 2005, Knight moved the tracking of cumulative shares function in the Power Peg code to an earlier point in the SMARS code sequence. Knight did not retest the Power Peg code after moving the cumulative quantity function to determine whether Power Peg would still function correctly if called. ... During the deployment of the new code, however, one of Knight's technicians did not copy the new code to one of the eight SMARS computer servers. Knight did not have a second technician review this deployment and no one at Knight realized that the Power Peg code had not been removed from the eighth server, nor the new RLP code added. Knight had no written procedures that required such a review.'"
See, the private sector can blow money faster than the public sector (OmabaCare site).
Table-ized A.I.
I'm sure someone will chime in and claim to be the em-effing Change MASTER! but this seems like an ordinary error, the sort I've seen a hundred times before, where one server is a tiny bit wonky, and during the change, something doesn't happen as expected. Normally it's an "inexpensive" error, where some of your VPN users get randomly disconnected... ...and sometimes it's the sort of error where you lose half a billion dollars an hour by HFT trading... ...badly.
This level of trading does not do the market any good, and puts individual investors at a severe disadvantage against firms like this.
It can be stopped. And it should be stopped. And the only reason it is not being stopped is because too many rich and powerful people make too much money on it.
Damn the validation. Full speed to prod!
No proper change management, no peer review, no proper lab testing. Dev should always reflect production to the greatest reasonable level. No proper maintenance windows. You should never be surprised by a change in production. This is a case study in incompetence and the failure to execute industry best practices. I'm guessing the guy or gal who raised the best practices flag was ignored as being inconvenient or too expensive.
If I'd done this kind of thing when I was working with the exchanges I would have been fired in a heartbeat. Whoever failed to utilize best practices, or whoever failed to allow the utilization of best practices had damn well better have been fired. This is incompetence of the highest level and a perfect example of why ITIL based best practices were born.
They had some code that processed orders in a special way. There was a flag on the order they could set that would trigger that code. We will call this Power Peg. They later moved away from that functionality but it still existed in the system. It sat there for years untested and unused. 9 years later they added new functionality and decided to reuse that same flag. The new code also disabled Power Peg.
When they pushed the new code into production, they missed a server. That missed server still had Power Peg looking for that flag. Orders started setting that flag and it was processed correctly on all but one server. But that last server was placing orders incorrectly. The logic that Power Peg used was not valid anymore. In a panic they rolled back the code on the servers. Not knowing that Power Peg was the issue, they now had all the servers running Power Peg again.
In the same thread where I can find 1000 people going on about how efficient capitalism is I can find another (sometimes the same) 1000 people complaining all the dumb things their companies do. Well, which one is it? It doesn't work both ways people. Could it be that people are people, no matter what banner they're organized under?
Hi! I make Firefox Plug-ins. Check 'em out @ https://addons.mozilla.org/en-US/firefox/addon/youtube-mp3-podcaster/
Didn't RTFA, but summary makes me go WTF in several places:
1. Python. I thought all the quants liked C, assembler, and even VHDL for their high frequency stuff. No matter
2. "2nd technician to review". If this were flight hardware or a bridge or skyscraper, there would be a second "technician" to review and at least one "engineer" to personally sign off that what was built/deployed is a) done right and b) is what you want
3. "no written procedures". There are a very small number of things in life about which it is absolutely imperative to keep a rod firmly up one's ass: a. moving machinery, b. formal mathematics, and c: hundreds of millions of dollars of your clients and shareholders' money.
Actually, they asked the SEC to bail them out and got the boot. They had to do a round of private investment and diluted shareholders' value quite a bit. It's generally cited as the "right way" to deal with companies that fuck up and lose billions. Shame we can't do the same with the banks.
If I have been able to see further than others, it is because I bought a pair of binoculars.
$400 billion per year in interest payments is "essentially zero"? That number is actually almost manageable, the BIG problem is that it's snowballing.
You'll recall Obama has been saying that if he wasn't allowed to borrow more, the government would default - wouldn't be able to pay the interest due. We're borrowing to the interest on our borrowing. That's when you know you're fucked, when you're maxing out one credit card to pay the minimum payment on another card. That's essentially what the US government is doing. We're in a trap the we're borrowing more and more in order to make the payments on existing debt, so the debt and the interest just keeps getting bigger and bigger until 100% of our tax money goes to pppay interest, leaving no money for essential government services.
Looking at what has happened in other countries, the "you're fucked" point, the point at which you can't escape the death spiral, is about 100% of GDP - when a country owes as much as it generates. Eight years ago, our debt to GDP ratio was about 35%. In 2014, it should hit 70%. That tells us we are about six to eight years from becoming Greece.
The difference between Greece and though, is that Greece is small enough to be bailed out. Nobody has $5 trillion to bail the US out.
Two things. First, the free market does things efficiently, including dumb things. Microsoft built the Surface efficiently - $390 per tablet. Government spent over $1,000 each buying them.
Secondly, there's dumb, and there's government dumb.
A dumb corporation requires three people to do a job that one person could do. A government gets the same job done by creating a new agency which contracts with three companies at $320 million each, requires that it be done in Pascal, and prohibits any testing until the project is "complete", at which time it's six years after tube event that the project was created to handle.
I just saw one of our most efficient government agencies, one that wins efficiency awards, spend over $19,000 on a project I could do in two days. Funny thing is, I WORK for that agency, so it would have cost them almost nothing to have me do it.
No. You're basically wrong on every point you bring up.
"Looking at what has happened in other countries, the "you're fucked" point, the point at which you can't escape the death spiral, is about 100% of GDP - when a country owes as much as it generates."
No, there is no magic debt/GDP limit: http://krugman.blogs.nytimes.com/2013/05/26/reinhart-and-rogoff-are-not-happy/
"That tells us we are about six to eight years from becoming Greece."
No, Greece doesn't have its own currency, so we are in no way the same as Greece: http://krugman.blogs.nytimes.com/2013/10/18/the-china-debt-syndrome/?_r=0
To err is human. To screw up 100,000 things per second requires root.
>> Capitalism is very effective in what it does
Pumping the money from the poor to the rich.