Banker’s Rounding. What is it good for?

  • If you are going to use my name, please make sure you spell correctly.

     

  • Also, if you do the research you will also find the banker's round, also called round to even is used in signal processing as well.

    There are numerous articles on the internet that discuss the concept and why it is used.

     

  • Also, let's give some context to the whole thing by hopping in the wack machine and revisit the two threads here on SSC.

    https://www.sqlservercentral.com/forums/topic/bankers-rounding

    https://www.sqlservercentral.com/forums/topic/round-to-even-aka-bankers-rounding-the-final-function

  • Really... I suggest you go back and lookup what approximate numbers are. Simply do not use these when dealing with fiscal data. problem solved.

  • Lynn Pettis wrote:

    If you are going to use my name, please make sure you spell correctly.

    sorry about that. Supposed to be copy-paste, something went wrong.

    Corrected the article. Should be updated soon.

    _____________
    Code for TallyGenerator

  • rlobbe wrote:

    Really... I suggest you go back and lookup what approximate numbers are. Simply do not use these when dealing with fiscal data. problem solved.

    dont know what to say here.

    Ok. What are those "approximate numbers"?

     

    • This reply was modified 3 years, 10 months ago by  Sergiy.

    _____________
    Code for TallyGenerator

  • I didn't know about 'bankers round' / 'round to even' at all, so I'm glad that the article has introduced it to me. Thank you.

  • Lynn Pettis wrote:

    Also, if you do the research you will also find the banker's round, also called round to even is used in signal processing as well.

    There are numerous articles on the internet that discuss the concept and why it is used.

    Lynn, I don't need to do research on internet for this matter.

    I've  been studying signal processing in university for 6 years, Kotelnikov's theorem (you might know it under the names of Nyquist and Shannon) was an essential part of the curriculum, I've been developing signal converters for sound devices and transmitting devices for fibre-optical lines. I went through tonnes of fundamental books on the subject, passed tens of exams, and probably would complete my phd on the subject, if the country together with its institutions would not go busted in 90's.

    And not a single time in any credible scientific source I would find a suggestion of using banker's rounding for any part of signal processing. It was always floating point computations all the way through, and normal rounding everywhere where it was needed.

    That's probably why SKUD bet Patriot. (Just kidding. SKUD used analogue computing and did not give a s..t about any rounding 🙂 )

    _____________
    Code for TallyGenerator

  • You are ignoring the reason "banker's rounding" exists in the first place. In most cases the handing of financial calculations (including rounding) is regulated by law or contract. It's not a matter of satisfying "Big Daddy", it's a matter of following the rules laid out. In the early days of computing some less scrupulous financial institutions always used the rounding in their favor. A similar situation existed when payroll was computerized.

  • Had to laugh about Big Daddy, but in my case it's Big Mama.  Spent most of my weekend "fixing" some calculations that were mathematically correct but not for Big Mama.  Luckily, I came up with a solution that is both mathematically correct and makes the numbers match 🙂

  • This was removed by the editor as SPAM

  • <quote>From the Last Sentence of the Conclusion in the Article...

    To maintain the best precision of the final result all intermediate calculations must be performed on numbers in floating point formats, and the rounding must be performed (if necessary) only on the final data set.

    </quote>

    Lordy, isn't that the truth.  Try getting your mortgage calculations approved by Granny and her 4 function calculator (or spreadsheet) unless you do it that way. 😀  Just like milliseconds, pennies matter.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • This is a very good article.  I shared it with another discussion group regarding the very popular Quicken personal financial package which has for years suffered from two bad design decisions, one of which concerns the effects of rounding.

    One is the fiasco caused by their Y2K 'work-around' for for 2-digit years in the QIF inport/export file format, and the other is their decision that investment accounts can and do share price history in which their own software encourages price rounding on the same security in different accounts.

    It is interesting that many of the responses are reminiscent of the old Hillary comment:  "What difference does it make?"

     

     

    Rick
    Disaster Recovery = Backup ( Backup ( Your Backup ) )

  • skeleton567 wrote:

    One is the fiasco caused by their Y2K 'work-around' for for 2-digit years in the QIF inport/export file format...

    Good lord... I had to work through all of that with Quicken 20 years ago and they still haven't fixed it correctly?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden wrote:

    <quote>From the Last Sentence of the Conclusion in the Article...

    To maintain the best precision of the final result all intermediate calculations must be performed on numbers in floating point formats, and the rounding must be performed (if necessary) only on the final data set.

    </quote>

    Lordy, isn't that the truth.  Try getting your mortgage calculations approved by Granny and her 4 function calculator (or spreadsheet) unless you do it that way. 😀  Just like milliseconds, pennies matter.

    That is actually true.

    We've just been there, several days ago.

    i posted my version of mortgage calculator which uses only floating point calculations inside of the function: https://www.sqlservercentral.com/forums/topic/mortgage-amortization-table/page/7/#post-3760769

    the amounts to pay and balances for each period - true, they have to be rounded, because it's actual monetary amounts which must change hands on specific dates. Therefore they cannot be taken as "intermediate calculations", they are the numbers reported to the users, they are in the "resulting data set".

    And don't forget about the favourite word of all accountants - adjustments.

    no matter how hard we try with all sorts of rounding, we cannot equally distribute a hundred between 3 periods/accounts/etc. it will always be 33, 33 and the last one adjusted to 34 to make the total right.

    Same happens to mortgage calculators: the last period contains the adjustment to compensate for deviations accumulated in all previous periods. Our task is only not to let those balances to deviate too far from the correct numbers calculated with floating point math, so the last adjustment would not look too bad.

    actually, if calculated correctly, monthly payments must vary from month to month, to keep the balances near the straight line between the starting point of full amount and zero balance at the end. But it would be slightly inconvenient and impractical. So, I found, banks round the payments up, usually to whole dollar amounts, and customers don't complain because it slightly reduces the accumulated interest over the duration of mortgage. And nobody worries about those pennies.

    _____________
    Code for TallyGenerator

Viewing 15 posts - 1 through 15 (of 20 total)

You must be logged in to reply to this topic. Login to reply