3 ms·
Despite what everyone says, I've spoken to several different people at several different highly-regarded banks who say that they do, in fact, use floating point
by chrisseaton 8y ago
Despite what everyone says, I've spoken to several different people at several different highly-regarded banks who say that they do, in fact, use floating point for money amounts in some of their systems.
What experience do people who work in banks have?
- christophilus 8y agoI worked in the credit union software space for a while, and using floating points for this does lead to trouble. There were several bugs in my time that were caused by using floats and were fixed by using integer math.
- segmondy 8y agoI work in Finance, I don't use float, and I suggest you never do either.
- chrisseaton 8y agoAs a concrete example, someone was running a massive online FFI for predicting the value of derivatives, and they were doing it in the real domain and using doubles on GPUs for monetary values. Where they doing it 'wrong' then? I don't know much about finance myself.
- frabert 8y agoIf you are predicting, chances are you don't care about all the decimals being correct and you'd rather get the result quickly.
- jimktrains2 8y agoPredicting a value is not the same as accounting.
- deleted 8y ago[deleted]
- OskarS 8y agoI think the problem here is that "financial computing" is too broad a term to apply a rule like that blindly. If you're making products like point-of-sale systems, ecommerce applications or account management, then it's basically malpractice to use floating point. The performance edge you get from them is so slight in the overall performance of the system and the damage bugs cause can be catastrophic. And it's very easy to get them wrong. It's pretty trivial in most languages to swap in decimal and/or rational types, so NOT doing so is just irresponsible. However, if you're doing things like high-frequency trading systems or machine learning stuff with massive amounts of data, then performance really does matter, and using floating point is entirely reasonable. If you're making systems like that, you're hopefully aware of the limitations of floating point and know how to use them safely.
- dragonwriter 8y agoPredicting is inherently approximate; accounting needs to be exact. They may use similar units, but they are different kinds of problems.
- twic 8y agoI work in finance, and i use floats (well, doubles) all the time! I never use floats for any quantities which i need to exactly add up to a known total, of course.
- mratsim 8y agoI used COBOL in a well known global American bank.
- atemerev 8y agoWe do use FP numbers for performance reasons occasionally, but we are well aware of their limitations, and when to normalize. Running option trading models with BigDecimal is unproductive. However, when the calculations are done, we store the results back as decimal representation.