7 ms·
Berkshire Hathaway’s Stock Price vs. 32-Bit Integers
- bombcar 6y agoStorage of data that is usually but not ALWAYS in a shorter range is a complicated problem if you don't just throw more RAM at it. 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.
- goalieca 6y agoProcessors have had BCD (binary coded decimal) instructions since the earliest 8-bit micros. They usually deal with 0-99 and then you have to add digit by digit but it can handle carry propagation.
- greenyoda 6y agoMuch earlier than that. The IBM/360 architecture had instructions for doing arithmetic with BCD numbers (packed and zoned decimal formats) in the mid-1960s. I think earlier IBM architectures had them too. COBOL natively supports that datatype, so did PL/I. 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.
- Rebelgecko 6y agoWhen I worked on a semi-similar problem (a realtime-ish feed with lots of numbers), we found that it was better to just eat the extra RAM costs. 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)
- bombcar 6y agoI wonder if a CPU could do something like have 9-bit bytes internally that would allow you to quickly jump over a list like that (use the 9th bit to indicate the first of a multi-byte sequence or something). You'd need dedicated hardware to make it as fast as 1000xRecordsize, though.
- firethief 6y agoThat's the typical approach to varints except optimized for hardware with 9-bit bytes. It's not the kind of thing that dedicated instructions can make faster, or we'd be using them all the time.
- Const-me 6y agoYou don’t really need dedicated instructions for them. Programmers can do that today, and many decades in the past too, with software. For example, Java has BigInteger in the standard library for decades now. 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.
- bluedino 6y agoNASDAQ programmer, somewhere around 1982: "What kind of company would let their stock get over $400,000?"
- jschwartzi 6y ago"That's more money than my boss makes in a year."
- Kranar 6y agoExchanges compete on speed. If exchange A delivers data in half the packet size and requires smaller word sizes to operate on and exchange B decides it's okay to double the packet size and requires twice the word size... exchange A gets the trade and exchange B is left holding the bag. 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.
- xeeeeeeeeeeenu 6y ago>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? https://en.wikipedia.org/wiki/Carry_flag https://en.wikipedia.org/wiki/Carry_flag
- zzzeek 6y agogoogle is listing the stock as losing 99% of its value today https://www.google.com/search?client=firefox-b-1-d&q=berkshire+hathaway+stock https://www.google.com/search?client=firefox-b-1-d&q=berkshi...
- cratermoon 6y agoOh boy, the possibilities of an automated trading disaster triggered by some algorithm coded without consideration for unsigned wraparound. https://www.bbc.com/future/article/20150505-the-numbers-that-lead-to-disaster https://www.bbc.com/future/article/20150505-the-numbers-that...
- Someone1234 6y agoHere is a screenshot in case they fix it: https://i.imgur.com/8z3s0qA.png https://i.imgur.com/8z3s0qA.png
- deleted 6y ago[deleted]
- Scoundreller 6y agoI love the “in case” because of how neglected it has been.
- Matheus28 6y agoThey fixed it by delisting BRK.A :^)
- ISL 6y agoIt is a rare day that holding BRK.B is preferable to BRK.A. Perhaps today is one of them. 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.
- jeffbee 6y agoGoogle Finance has the worst corporate actions processing of any public source of market data. Their splits and mergers are wrong in a lot of cases, not just this exceptional one.
- blahyawnblah 6y agoHe buffet-overflowed
- baron816 6y agoCouldn’t NASDAQ have included in their contract that a company would have to split if it’s share price rose over a certain level?
- fuzzer37 6y agoI'd imagine they didn't think that a company would ever get above even 5 figures, much less 6. Buffet's refusal to split is also not normal.
- dmurray 6y agoI think they absolutely could, and the SEC would be OK with it, but BRK.A is listed on the NYSE, not the Nasdaq, so it doesn't have a contract with them. Like other US stocks, you can still trade it on other exchanges than the listing one.
- jeffbee 6y agoSo, did they not realize this was a limitation of their system, they did realize it but they did not know BRK was going to hit the limits, or they knew both and just let it happen?
- stonemetal12 6y agoMy guess is they didn't consider the possibility when they designed the system, and had forgotten the limitation existed by the time it became obvious that it would happen.
- Kranar 6y agoNo they knew it but this particular feed having the issue is an older NASDAQ feed. 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.
- jeffbee 6y agoThe fact that it only affects the old protocol might not comfort its users. Users have this crazy habit of not migrating. I remember when Reuters bought Bridge and they tried to announce they were deprecating the bridge feed protocol, twenty years ago, but it looks like you can still get Bridge feeds and Bridge Station to this very day.
- deleted 6y ago[deleted]
- captainmuon 6y agoIf money wasn't so darn sacrosanct that you absolutely cannot destroy or create even a fraction of a cent... the solution would be to just use floats. 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.
- deleted 6y ago[deleted]
- benmller313 6y agoIsn't the real solution just to use a bigger int?
- acdha 6y agoYes, but consider how much volume there is in the stock market - doubling to a 64-bit integer would increase RAM and network volume, and there are plenty of downstream consumers who’d need to test this. None of that is intractable but there’s literally one company affected - the next highest share price is two orders of magnitude lower - so there must be a strong temptation to see what Buffett would want to do a split.
- Nasrudith 6y agoTechnically they can also use variable length integers or even "BigIntegers" but they process slower.
- acdha 6y agoYes - I said 64-bit because that’s a natural size now and for high volume like this it seems likely that they’d prefer a fixed size to savings which make decode and recovery logic harder and less cache line efficient.
- jfk13 6y ago> the next highest share price is two orders of magnitude lower Two orders of magnitude isn't really very much headroom.
- tedchs 6y agoYoutube's view counter for Gagnam Style had a similar issue a few years ago. That time, it was a funny problem to have; with stock price reporting, not so much. https://arstechnica.com/information-technology/2014/12/gangnam-style-overflows-int_max-forces-youtube-to-go-64-bit/ https://arstechnica.com/information-technology/2014/12/gangn...
- _trampeltier 6y agoYTs counter had was even signed. So the first dirty fix was very easy, because there was an unused bit. This is different, because all bits are used in the stock price, so no easy dirty fix.
- ruffrey 6y agoI wonder if anyone had a long-held limit order that was filled due to the price appearing to be low.
- nabla9 6y agoNYSE:<flash>"Congratulations. You won the game!"</flash> NYSE:Enter your name: WBUFF NYSE:Do you want to play again Y/N?
- fortran77 6y agoI just logged in to Fidelity. It won't let me buy or sell BRK.A! I can't even get a quote.
- beervirus 6y agoLooks like it broke through the limit this morning: https://finance.yahoo.com/quote/BRK-A/ https://finance.yahoo.com/quote/BRK-A/
- polynomial 6y agoFor some reason I'm reminded of Feynman saying how economical numbers are larger than astronomical numbers.
- blt 6y agoFor us non-financial types: What is the motivation for avoiding a stock split?
- site-packages1 6y agoOne reason is that they now have the highest stock price and that's a cool selling point for BK. Not their only one, clearly, but a neat point to make.
- dragontamer 6y agoBRK.A are "voting" shares. My understanding is that they want to keep the "voting pool" to be richer / upper class people. 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.
- Waterluvian 6y agoSo r/wallstreetbets needs to pool together to buy voting shares and send their best and brightest to crash the party?
- deleted 6y ago[deleted]
- electroly 6y agoThe shareholder meeting is open to BRK.B holders (~$300 for a share). My sister and my dad went one year. No rumors required. You can watch it online.
- ISL 6y agoBRK.B also votes, but with much-less voting power. 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.
- Animats 6y agoThat 32-bit price format is in the message protocol used by many NASDAQ customers.[1] The spec, though, says "Prices are integer fields,supplied with an associated precision. When converted to a decimal format, prices are in fixed point format, where the precision defines the number of decimal places. For example,a field flagged as Price(4) has an implied 4 decimal places. The maximum value of price(4) in Total View-•-ITCH is 200,000.0000 (decimal, 77359400 hex)." 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/specifications/dataproducts/NQTVITCHSpecification.pdf http://www.nasdaqtrader.com/content/technicalsupport/specifi...
- kurikuri 6y agoThey probably just use BRK.B for most HFT involving BRK. The one-way transfer from Class A to B shares (and the different voting rights) reduces the supply of Class A shares due to a myriad of reasons. This makes the daily volume for Class A shares lower than Class B (when normalized by the trade ceiling imposed by Berkshire).
- ralph84 6y ago> The U.S. stock with the second-highest share price, home builder NVR Inc., is trading just above $5,100 a share. 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.
- conanbatt 6y agoThe hallmark of great software engineering: tell product to adapt to technical lazyness
- ralph84 6y agoEngineering is the art of tradeoffs. When there's a two orders of magnitude difference between the needs of one user of the system and all other users of the system, it's not laziness to decide the tradeoffs needed for that one user aren't worth it.
- taylodl 6y agoMake Berskshire Hathaway stock priced in 1/100th unit instead of 1/10,000th unit and the stock price can go 100 times higher and you don't have to change the existing data feeds - which would be quite expensive. All you have to do is send everyone the message that this stock symbol is priced in 1/100 units instead of 1/10000. Seems to me this would be the least-intrusive solution.
- nathanwh 6y agoFound the person who added all the special cases to the legacy code I’m working on :)
- compiler-guy 6y agoOne is reminded of the Isner–Mahut match at the 2010 Wimbledon Championships, where the scoreboard was limited to 47 games, and it went far over, and an IBM engineer had to work all night to fix it. 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_the_2010_Wimbledon_Championships https://en.wikipedia.org/wiki/Isner%E2%80%93Mahut_match_at_t...
- dang 6y agoBerkshire Hathaway’s stock price is too high for Nasdaq computers - https://news.ycombinator.com/item?id=27044044 https://news.ycombinator.com/item?id=27044044 - May 2021 (274 comments)
- Markoff 6y agoI wonder how do they trade stock in Indonesia, Vietnam or in old times before euro in Italy? Maybe ask them about solution?
- 74d-fe6-2c6 6y agoNASDAQ should give me money to buy the stock. I promise it will take a dump within a week. This will buy them time to solve the issue.