Live data from Hacker News

High-Speed Trading Firm Deleted Some Code by Accident

bloombergview.com

31–40 of 63 posts

Re: High-Speed Trading Firm Deleted Some Code by Accident

#31
Given hindsight, it's always easier to ask for more tests or code comments. I guess the rule of thumb is that if the code is there, it most probably is there for a reason.

When something like this happens, it's always a series of oversights.

1. Someone forgot to add comments or test cases while writing the code (or perhaps he wrote it but people are not running the test cases before commits).

2. Someone else thought that the code is dead and deleted it (and skipped the test cases if there were some covering that particular scenario).

3. Either the person deleting the code didn't wait for the code review or code reviewers missed that as well. (If code reviews are non-existent, it's a disaster waiting to happen).

So in the hindsight, write comments, write test cases, run test cases and do code reviews carefully.

Re: High-Speed Trading Firm Deleted Some Code by Accident

#33

In finance you'll find low accountability for developers. Basically finance is where great developers go to get paid a lot to become horrible developers. Very few companies in finance are pushing the bar on quality code since they culturally cannot accept the cost of that. It doesn't make sense until it is too late and by then their code base is too entrenched. I've seen this at countless finance companies, and from…

I can confirm this. I just wish I had known about it before I accepted my current contract...

Re: High-Speed Trading Firm Deleted Some Code by Accident

#34

Can someone explain why the SEC rules insist you must buy from the exchange with the lowest price first? It appears to me to be a rule just to keep the small exchanges alive.

To stop brokers screwing their clients by routing orders to their mates.

Re: High-Speed Trading Firm Deleted Some Code by Accident

#35

Can someone explain why the SEC rules insist you must buy from the exchange with the lowest price first? It appears to me to be a rule just to keep the small exchanges alive.

Otherwise a broker would just route mom n' pop's orders to the exchange that pays the biggest bribe to the broker (and screw mom n' pop).

Re: High-Speed Trading Firm Deleted Some Code by Accident

#36
post #17

Every time I read stories about high speed trading, I have to wonder what is actually the point of high speed trading to the society. The point of a free and fast stock market is to provide monetary liquidity and stabilize the economy by shortening the feedback loop. But something tells me that our society and economy derives zero benefit from nanosecond resolution trading vs. trading with say 1 minute resolution. Me…

> But something tells me that our society and economy derives zero benefit from nanosecond resolution trading vs. trading with say 1 minute resolution.

Not only does nanosecond resolution provide zero benefit, models indicate that it actually harms liquidity. To be specific, serial order processing in continuous-time is more efficient in "time-space", but less efficient in "volume-space". The better mechanism is batch order processing in discrete-time (i.e. process all arriving orders simultaneously in batch every 100 milliseconds, rather than one-by-one every nanosecond): http://faculty.chicagobooth.edu/eric.budish/research/HFT-Fre...

Re: High-Speed Trading Firm Deleted Some Code by Accident

#37
post #5

Earlier quoted context omitted.

Probably exists now, and not before. Writing this software would be very scary for me -- I'm confident in my work for the most part but I'm only human. To then let a "for-loop" go wild making thousands of trades per second on the entire market with real money against other high frequency traders no less.. man... you gotta be really really really really sure of your code!

It is not about confidence. It is about ownership and being a good engineer. A good engineer would have cared about the code base and ensured that a test would fail, a use case would be linked to that failure, and someone would see that they have now violated a regulation. Then if the regulation changed, someone would grep through the use cases, and see what behavior is occuring/ how to modify the code base to cope w…

I'd be surprised if they didn't make postmortem changes to prevent such incidents in the future. Your posts in this thread imply that no mistake should ever happen, but let's be real - mistakes will always happen, the key is to do proper postmortem analysis and learn from them (and obviously prevent recurrences).

Re: High-Speed Trading Firm Deleted Some Code by Accident

#38
post #17

Every time I read stories about high speed trading, I have to wonder what is actually the point of high speed trading to the society. The point of a free and fast stock market is to provide monetary liquidity and stabilize the economy by shortening the feedback loop. But something tells me that our society and economy derives zero benefit from nanosecond resolution trading vs. trading with say 1 minute resolution. Me…

Faster trading allows market makers to operate with smaller capital investments. This lowers the barrier to entry in the market making business, creating more competition. More competition reduces the costs of trading. (And not just in theory. Market making used to be exclusively the domain of a few big players. It's not anymore.) Reduced cost of trading matters to almost everyone who's involved in the markets. Passive index funds, for example, have to trade to reinvest profits and to rebalance their composition. That's why Vanguard -- the most evangelical of the passive fund managers -- firmly defends HFT.

You may ask, well, why do we need market makers at all? Well, you don't have to use them. You have other options for trading. Call up your broker and ask. What you'll discover is that these other options have far larger transaction costs.

A lot of the complaints about HFT I've seen on Hacker News seem to think that no one should get paid for market making. I don't think that's possible. (And if it is, I'd love to know how.) Transaction costs are an inescapable part of trading; ultimately, you're faced with the choice between tilting your hand to other traders or paying some intermediary to take on risk for you. Generally, it costs less to choose the second option.

Re: High-Speed Trading Firm Deleted Some Code by Accident

#39
post #5

Earlier quoted context omitted.

Probably exists now, and not before. Writing this software would be very scary for me -- I'm confident in my work for the most part but I'm only human. To then let a "for-loop" go wild making thousands of trades per second on the entire market with real money against other high frequency traders no less.. man... you gotta be really really really really sure of your code!

It is not about confidence. It is about ownership and being a good engineer. A good engineer would have cared about the code base and ensured that a test would fail, a use case would be linked to that failure, and someone would see that they have now violated a regulation. Then if the regulation changed, someone would grep through the use cases, and see what behavior is occuring/ how to modify the code base to cope w…

Real engineers are like true Scotsmen, because you can never have enough process.

In this case, of course tests really do prove the absence of bugs rather than just (not) proving their presence.

I really don't like the whole "unit tests lets you not worry about breaking things" view. That's not confidence, it's overconfidence. And it doesn't even mostly work for things where "correct" is more fuzzy than "eventually produces this exact output".

Re: High-Speed Trading Firm Deleted Some Code by Accident

#40
post #19

Earlier quoted context omitted.

Why does the SEC care that you bought shares at a price higher than the cheapest? How does that hurt anyone other than yourself?

If I ask my broker to buy some stock, I want it at the lowest price. My broker, left to his own devices, may prefer to buy at a higher price because it is more profitable for him . This rule seems designed to protect the consumer when the consumer and the stock brokers goals are not aligned.

The article says they only do proprietary trading, which I thought means they only use their own money. I guess that's rare enough that the rules apply regardless in order to simplify things?
Post reply on HN