June 8th, 2009

On the importance of sanity-checking values where money is involved

Last year, one of my colleagues noticed that one particular company’s stock, which normally trades in the mid- to upper-$20 range, showed one day of extremely unusual results, very similar to the last example in this series of funny screenshots.

XYZ Company (NASD:XYZ) – Delayed quote data
28.06 Daily Range 27.92 – 100000.00
1:18PM ET

Closer inspection revealed that there was an order to buy 28 shares at $100,000.

Obviously, somebody got the “number of shares” and “bid price” fields backwards and ended up losing over two million dollars for the error. If this were an NYSE stock, this error would have been caught because trades on the New York Stock Exchange are still executed by human beings on a trading floor, so somebody would have said, “Wait, the two fields are clearly in reverse order” and fixed the error or at least double-checked with the buyer before executing it. (At least I hope so. Maybe the people on the floor don’t care.)

But nope, this is NASDAQ, and some lucky market maker walked off with over two million dollars. Maybe the unlucky trader’s software will now display a warning if the price entered is more than, say, twice the current market price. (With appropriate exceptions for penny stocks.)

In response to the unusual price activity, another colleage chimed in, “Rats! This always happens to me. I had a limit order at $100,001.”

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.