High-Frequency Trading. When your margins depend on squeezing every last millisecond of performance to beat the speed of the market itself, you don't have time for an extra conditional branch instruction.
An exaggeration, but not a very large one. The stock market is a high-speed game, and a lot of players are willing to cut safety features for raw performance.
But the big players do the safety checks at compile time, so at runtime, it's simply not possible to make one of these mistakes. Theorem proving might not be necessary for your "hello world" rails app, but it is something that the finance industry likely applies.
(Disclaimer: I do not work with any algorithmic trading systems. Humans do a pretty good job of trading, too.)
There is certainly a culture of micro-optimized C++ in the finance world, but it's not all like that. (It's easier to do easy things than it is to do hard things, and so there is going to be more easy-to-write software in existence than hard-to-write software. Hence why you see so much bad C++ -- it's really easy to write bad C++.)
My guess is that the algorithms do well within say one standard deviation range but beyond that the computers
step away. Once the computer volume drops, markets get thin
and "Market Orders" produce the results you see. You see bad
fills quite a bit in penny stocks but never in these large volume stocks.
An exaggeration, but not a very large one. The stock market is a high-speed game, and a lot of players are willing to cut safety features for raw performance.