Rounding Standards - Financial Calculations

后端 未结 5 1324
时光说笑
时光说笑 2021-01-30 10:44

I am curious about the existence of any \"rounding\" standards\" when it comes to the calculation of financial data. My initial thoughts are to perform rounding only when the da

5条回答
  •  野的像风
    2021-01-30 11:42

    I just asked a greybeard mainframe programmer at the financial software company I work for, and he said there is no well-known standard and it's up to programmer practice.

    While statisticians have been aware of the rounding issue since at least 1906, it's difficult to find a financial standard endorsing it.

    According to this site, the "European Commission report The Introduction of the Euro and the Rounding of Currency Amounts suggests that there had previously been no standard approach to rounding in banking."

    In general, use a symmetric rounding mode no matter what base you are working in (base-2 or base-10).

    This will avoid systematic bias during calculations.

    Such a mode is Round-Half-To-Even, otherwise known as "bankers rounding".

    Use language tools that allow you to specify the numeric context explicity, including the rounding and truncation modes. For example, Python's decimal module. The implicit assumptions made by the C library might not be appropriate for your computations.

    http://en.wikipedia.org/wiki/Rounding#Rounding_to_integer

提交回复
热议问题