Berkshire Hathaway’s Stock Price vs. 32-Bit Integers
daringfireball.net
daringfireball.net
This is a feed used in high-frequency trading. It's fixed format and intended to be read by FPGAs. Sent over UDP.
I wonder what they've been doing for BRK.A for that feed.
[1] http://www.nasdaqtrader.com/content/technicalsupport/specifi...
https://www.google.com/search?client=firefox-b-1-d&q=berkshi...
https://www.bbc.com/future/article/20150505-the-numbers-that...
If NASDAQ has this problem, there is a good chance that a number of brokers and back-end systems do too.
Edit: The more I think about this, the more I expect that Berkshire will be forced to split. We'll know within a week or so, I guess.
Berkshire-Hathaway: chaos-monkey-elect of May 2021.
Exchanges have a minimum stock price requirement for a stock to be listed. Seems reasonable that they should have a maximum too instead of redesigning the system for a single outlier.
Perhaps a CPU built around a base numeric type more like UTF-8 would be useful? Short values would take only a smaller amount of RAM but longer values would still work?
I suspect in the era of 64 bit CPUs that isn't much of an advantage anymore.
After all, the biggest customers for mainframes were banks, insurance companies, the IRS, etc. that dealt with large sums of money and needed their accounts to be accurate to the nearest cent. Dealing with very large integer values is a problem that was solved a long, long time ago.
Once you have variable width values, it gets much more expensive to answer questions like "Here's a file with every stock price, we know that Berkshire is the 1,000th one in the list, what is their current price?" Instead of being able to jump straight to the relevant bytes, you end up needing to parse (potentially) the entire file. Even with better CPU support for variable integer sizes, you're still essentially turning an O(1) operation into one that is O(N)
The reason they did not is less about memory (it would save memory on average, many numbers in that system need less than 4 bytes) more about CPU time. That system is likely very old, older than wide adoption of 64-bit processors.
The reason we don’t often use variable-length integers now, memory and storage are cheap. For new software people simply use 64 or 128 bit integers.
Still, variable-length integers are widely used when storage or bandwidth matters. They are all over binary network protocols, multimedia containers, and media codecs.
Back in the day the major exchanges, NASDAQ and NYSE in the U.S. and the TSX in Canada used to operate as a mafia with a monopoly on the stock market. Entire exchanges came into being strictly on the basis that they had lower bandwidth requirements and operated faster, such as BATS and DirectEdge (which ended up merging), CHI-X, Omega, and a host of competition emerged to actually focus on technology. They ended up taking a large chunk of market share away from the major exchanges.
Now NASDAQ and NYSE have since caught up, and in some ways they did so by buying out these competitors. Modulo some embarrassing glitches over the past few years, the major exchanges need to continue supporting their legacy systems for major institutions who are very slow and hesitant to upgrade any aspect of their technology.
NASDAQ has a more advanced and modern data feed and that feed doesn't have this issue, BRK.A is being reported properly at its price as we speak, but that feed isn't widely adopted except by firms that generally build their own technology and have a team that can keep their tech up to date. The feed that has this issue is like 20 years old now and rarely gets updates, and many firms like to keep it that way.
Rumor is that the shareholders meeting is a giant party, a who's-who of the elite world. You can only have that culture if you have a very high barrier to entry. In any case, the high share price ensures a certain class of people in the voting pool: an old-school sense of community and elitism but... hey, you can't argue that it doesn't work.
Not much other reason needed.
It isn't to discriminate on class (which is a definite side-effect), but rather to discriminate on time-horizon. Berkshire plays the long game and has taken great pains to attract/retain long-term shareholders. (As has, to an extent, Amazon)
Almost nobody can afford to day-trade BRK.A. Furthermore, most holders of A probably don't want to sell on any given day.
If you want to trade Berkshire on short timescales, B is available/liquid, but your votes don't count for much.
Although modern platforms with their fractional shares might negate the advantage a bit.
They do have a different code of class b stock that is more affordable.
47 was over double the previous record, so everyone thought it was extremely low risk, and not worth worrying about. But it did happen.
Over ten years on and no other match has come close.
https://en.wikipedia.org/wiki/Isner%E2%80%93Mahut_match_at_t...
NASDAQ's newer feed doesn't have this issue but a lot of major institutions don't like updating their infrastructure so they stick to the older feed.
To be honest, it's not nearly as big of a deal as it's being made out to be. It's not a situation where NASDAQ was ignorant of this issue or neglectful, it's a situation where NASDAQ has to balance support for legacy systems by not doing a binary incompatible update to a protocol that has worked well for many users for 20 years... versus pushing older institutions to update to their newer technology which doesn't have these issues.
NYSE:Enter your name: WBUFF
NYSE:Do you want to play again Y/N?
I know it's a big no-no, but I find it odd that we can live with limited precision in scientific computations (even have to), but can't when it comes to money.
Two orders of magnitude isn't really very much headroom.
So if this next-closest share price got closer to the limit, it would almost certainly split long before it became within one order of magnitude of the limit.
BH is just a different duck that way.
HFT + floating point = economy crashed by duping inflation without real item duping
The key is whether your system needs to tally up your monies into a known quantity and ensure it is all accounted for. If you summed up the transactions across a number of customer accounts at a bank for instance, it's critical that they all net out.
The whole "NEVER use floats for money" thing is cargo culting. In this situation though I don't see why floats would be any better a solution than just using 64-bit integers.
I'm sure one can think of plenty of counter examples, but I'll give an example where floating point numbers are used heavily and you don't typically don't care about minor rounding issues.
Computational chemistry can be used to predict the geometry of molecules. The model used to make this prediction has to describe the interactions between the atoms, which is computationally expensive (solving Schrodinger's equation). So often times the molecule is only modeled in a vacuum and not as a liquid (where there would be many other molecules included). All of these add up that even if there was no IEEE-754 floating point error, the answer would still maybe only be right to +/- 10%.
So science is quite different from finance, where the main goal is to converse a certain quantity. Money shouldn't be created or lost though rounding errors.
Sure, it's humorous and a little bit silly, but the issue is a real one, and this is a funny way to familiarize yourself with the tricks that can be played.