4 ms·
I wonder if that negative int broke a bunch of code in software around the world
by typon 7y ago
I wonder if that negative int broke a bunch of code in software around the world
- keanebean86 7y agoWhy is oil trading for $4 billi.. oh no
- grezql 7y agoSon I sure hope thats not an Int. Its double, float or something else
- rjtobin 7y agoMight be stored as an int in cents (or whatever the tick size is).
- typon 7y agoThat's what I would do. Would never trust floating point numbers with something as important as currency.
- lotyrin 7y agoI sure hope "something else". I'd really like to think it's fixed precision.
- jetrink 7y agoTo be doubly pedantic, it probably is an int in many places, to avoid rounding errors.
- koheripbal 7y agoCorrect. In finance it is the norm to store all currency amounts as int.
- mcv 7y agoLet's hope it's a signed int, then.
- cpwright 7y agoOften trading systems represent prices as integral values; using fixed point. It eliminates some problems with rounding.
- koheripbal 7y agoCME website itself crashed for over an hour.
- TwoFactor 7y agoDo you have a source on this? I don't see anything in the news.
- greenshackle2 7y agoAnecdotally, CME wouldn't load quotes or charts for Oil Futures for me for a while around 1pm.
- symplee 7y agoCertainly messed up the Yahoo finance graph: https://finance.yahoo.com/quote/CL=F?p=CL=F https://finance.yahoo.com/quote/CL=F?p=CL=F Look at the red block below the graph, where it should have gone negative.
- patall 7y agoInteresting math question: When we now start at a negative price tomorrow, what does a percentage change mean? Today, we have got losses >100%, unusual but obviously possible. But if price changes tomorrow from say $-10 to $10, is that again -200%? Does a change from $-10 to -$20 mean +100%? (I obviously know percentage changes are not made for this)
- gberger 7y agoI guess we'll find out tomorrow
- symplee 7y agoFollow up question: If it had ended at zero dollars, then the next day jumps to $5, what's the percentage change?
- marcosdumay 7y agoFollow up answer, it's never zero dollars.
- marcosdumay 7y agoHum... We can know this today with the power of Math! But seriously, changing to -$10 to -$20 is a +100% change. It's multiplication, this is how it works. From -$10 to $10 would be a -200% change. Obviously, only the mainstream news reports finance numbers as a percentage of change. Anybody else is only concerned about ROI.
- patall 7y agoWell, NYSE stops at certain drop intervals, so percentage does also occur professionally: https://en.wikipedia.org/wiki/Trading_curb https://en.wikipedia.org/wiki/Trading_curb
- jVinc 7y agoIf I take 10$ to take some asset, and then later sell it for 20$ my return is 30$ and my investment was -10$, so my ROI comes out as -300% which betrays what's going on. So even with ROI, negative numbers throws a wrench in the machinerys typical assumptions.
- hermitdev 7y agoI work in finance. I literally ask this question of my boss today as I deal with market data. Didn't want a negative price to fuck with our systems (I've only been at the firm for 1 year, so not entirely comfortable with all our systems). Thankfully, we don't do much with futures, so we weren't too badly affected by this. Also, we don't use int's. We use proper decimal types for currency values.
- typon 7y agoArbitrary sized decimals? How do you deal with floating point math problems?
- deleted 7y ago[deleted]
- kccqzy 7y agoCertainly broke the native stocks app on iOS. The graph only goes to zero, and the blue dot indicating the current price was rendered below the graph, in the news story section.