lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 11/29/12 10:43 PM, Rena wrote:
Hmm, someone wanted to buy -6 stocks? Was that a typo, a
misunderstanding of how to sell, or a deliberate act to see what
happens? Or was 4.3 billion interpreted as -6?


I don't think it was a deliberate act -- someone probably wanted to sell 6 shares of a stock? Somehow that internal intention was translated to the exchange protocol incorrectly, as massive unsigned integer.

Internal trading systems often represent positions with a signed integer -- with positive being a long position and negative being a short position. So a position of -100 is short 100 shares. This signed concept may also be applied to order entry, with negative being a sell.

I couldn't find the protocol specs for the Stockholm Exchange specifically, but in general order entry protocols would not conflate order size and order direction. Order size would be an unsigned integer (represented in ASCII or binary depending on the protocol). Direction would not be binary buy/sell, but rather an enumeration like "buy", "long sell", "short sell", and "short sell exempt".

Since the exchange doesn't accept negative numbers, I conclude that it was a trading firm's internal issue. Either way, there is no transparency and there are just so many ways things can go wrong.

As of last year, the US equity market requires a pre-trade risk check before an order is sent to an exchange (so called Rule 15c3-5), so even if an insane order is generated somewhere in the system, the exchange-facing gateway will stop it. Of course, if that gateway has a bug....

If one is interested in seeing what these order entry protocols tend to look like, NASDAQ's OUCH is a good example [1]. [It is probably one of the Stockholm Exchange's protocols since it runs on the INET platform.] FIX

-Evan

[1] http://www.nasdaqtrader.com/content/technicalsupport/specifications/TradingProducts/OUCH4.2.pdf