As a consumer I am less than enamored with Swedish commercial banks, or at least their online presence.1 The websites are sluggish and filled with useless marketing.2 They have ridiculously short session times so if I keep staring at something for a while (e.g., numbers I don’t quite like) I will be thrown out even though I am sitting privately in front of my own computer (and I bet my OS is at least as secure as their OS). They comically admonish me for using an unsupported browser, even though its name has Long Term Support hidden in it (nowadays labeled ESR). Their layouts and menus keep getting redesigned and face-lifted for the sake of change, never getting any more logical or more functional.3

One of my pet peeves: I have to keep clicking around in awful date selectors and choose carefully hidden options from hamburger menus to be presented with an account statement of exactly the last complete month (all transactions from the first day of the previous month through to the last), and download it as a CSV or XML file. Now, to do the same for my second account in the same bank, I have to go through the same ordeal with that account as a starting point, because once the statement view is set up, I cannot just flip accounts. This is exactly what I go through every month, because that is how I archive my account statements to feed my personal accounting.

Banks, under ever-mounting pressure to seem innovative in the face of hipster fintech startups and such perceived competitors, seem to have subscribed to a turd-polishing mentality without giving any real thought to how their interfaces could actually be more ergonomic. Or maybe they are just clueless.

But I guess nothing sucks quite as bad as having a correctness issue on the generated financial statement.4

Meet ICA Banken, a household name here in Sweden.5 They present their unsuspecting user with an account statement that is plain wrong and I invite you to join me in laughing at them, because they so deserve it.

Look at this carefully, showing the top of a statement up to the end of August:


Bogus account statement (click to enlarge)

As you can see, the statement is a table of transactions (debits and credits – in this case, quite sadly, only debits) with a date, some text and categorisation, the transaction amount (negative in red) and the cumulative account balance at that point (green). Not exactly rocket science.

Since dates are listed newest first, you should mentally replay the lines from the bottom upwards. The cumulative balance on the right contains the transaction delta preceding it in the same row. For example, looking at the very first (top) row, one can see that from an a priori balance of 6158 kr (right edge of second row), a debit of 26 kr brought the balance down to 6132 kr. Since that was the last entry for August, one can rightfully conclude that the account ended the month with this value.

Can you spot what is wrong here?

Let’s make this into a game. Look closely and carefully at that statement of transactions. I will wait here until you start cursing and shaking your head in disbelief (I know I did). You have two minutes. If you still have no clue after that, open this box to get a hint:

Hint

Have you looked carefully at the balance (rightmost, green) column?

Have you noticed that even though there are debits only, the account balance increases on some rows (from the bottom up, as time flows)?


Having a good time yet? No? Okay, another two minutes.

In case you still don’t get it, let me explain:

Explanation

ICA Banken messed up the order of transactions within the same day. They computed the cumulative account balance for each transaction for some intra-day ordering of transactions. The problem is that on the account statement, for some weird reason they list the transactions in a different order, which makes the computed account balances (surprise, surprise) totally bogus.

This is a big deal, because even the last balance shown for August is incorrect. If you add up all the debits and credits (sadly, only debits in this case) and then look at the topmost account balance, then you will see two different numbers. Your account does not balance!

At first you suspect the transaction amounts, talking to yourself in utter disbelief: "It simply does not add up!"

Then you start checking and verifying. And then comes the facepalm.

Date Amount ICA Balance Correct Balance
31 aug -26.00 6132.00 5361.76
31 aug -26.00 6158.00 5387.76
31 aug -288.00 5361.76 5413.76
31 aug -61.00 5649.76 5701.76
31 aug -149.00 5710.76 5762.76
31 aug -272.24 5859.76 5911.76
30 aug -25.00 6184.00 6184.00

Provided that the initial balance of 6184 is accurate (it is; it was the only transaction on that day), this table shows the statement with an extra column, the Correct Balance, as computed by accumulating the transaction amounts into the account balance from the bottom upwards. Notice how, at each step, it is different from the figure reported by the bank.

Note also that the correct final account balance of 5361.76 appears among the ones on the statement. It's just... not in the right place! All the intermediary figures are unfortunately garbage, which is not too surprising given the path-dependent way of deriving them.

We are now well equipped in our understanding to reconstruct the original order of the transactions, the order which was used to accumulate the balance values. The task is made trivial by the fact that (again, sad as it is) there are only debits here, so the accumulated balance must decrease monotonically as we move upwards:

Date Amount ICA Balance
31 aug -288.00 5361.76
31 aug -61.00 5649.76
31 aug -149.00 5710.76
31 aug -272.24 5859.76
31 aug -26.00 6132.00
31 aug -26.00 6158.00
30 aug -25.00 6184.00

There, I fixed it! The two transactions I moved are marked with light purple. They were the last (topmost) two as shown by ICA Banken; now they come first for the 31th. The balances are now all correct. And yes, the correct answer to the question "What was the balance of this account at the end of August?" is indeed 5361.76, and not 6132 as ICA Banken would make you believe.

If you go back and look at the original screenshot again, you might notice that the transactions I moved are the ones with a red plus sign in front of them. They are kind of special compared to regular card payments; these were payments via Swish, a real-time mobile payment system popular in Sweden (here used to pay for a pair of bus trips). Those somehow get stuck at the end of the day. (Hint hint, easy fix! Let's get this prioritized real quick, m'kay?)


And the sad truth is that I have been seeing this for several months to half a year by now, and it seems I am the only one who actually looks at the figures on these account statements.

Oh, and if you read carefully and now think “yeah, but you admitted to using an unsupported browser”: I have tested this on several platforms, including an up-to-date Android, with identical results. It’s not my “outdated” web standards at fault here.

What can I say in conclusion? Software is eating the world, software that is embarrassingly full of bugs. But if you are in the trade of generating financial statements, maybe… don’t put (and leave) such ridiculous bugs in your code?

Don’t be ICA Banken.6


Update January 2023

Another several months have gone by since I (finally) wrote this last October. Did anything change for the better?

Today I saw this:


Still bogus, and look ma, no Swish! (click to enlarge)

Earlier I speculated that the bug was caused by Swish payments grouped as the topmost entries on any given date. But these are all ordinary debit card and wire transactions, not a single Swish in sight. No more entries for the day.

I’m still curious about my earlier speculation, since this is the first time I see the bug not involving those special entries with a red plus sign. Maybe ICA tried to fix the bug, and this is what they managed to produce?

Time to get the big guns out!


DISCLAIMER: I do not personally have an account with ICA Banken, but have close ties to someone who does (and have their permission to publish this). I do not have any position (long or short) in the stocks of ICA Banken or its affiliates or associates or any of the financial institutions mentioned in this article. I do not stand to gain or lose anything if their stock price moves either way. I am not your financial advisor, your legal counsel, or your psychologist.


1 Which is increasingly the only reasonable (or possible) way to do business with them, with fewer and fewer branch offices, if any.

2 Mainly, the banks’ own plugs to make me take on their loans while they cease to pay anything in terms of interest for my own money I keep with them (which is what enables them to do their business with others).

3 To be fair, I wish to clarify that I am not picking on Swedish banks per se. They just happen to be what I’m exposed to. I’m sure other banks are similarly terrible. After all, the causes of these issues are rooted in the internationally prevalent “best practices” of the financial and IT industries.

4 I was extremely polite and considerate while choosing my words here, as you might have noticed.

5 Its main use is supplying Swedish housewives with debit cards to spend their food budget. Part of the popularity, I guess, stems from the fact that the cards conveniently double as discount-collecting membership cards in ICA stores, one of the country’s premier grocery chains.

6 Apparently, not even the sacred blessings of Scrum Masters managed to keep their otherwise awesome cloud-based microservice architecture reasonably bug-free… (Pro tip: If you are curious about the innards and the tech of a company, all you need to do is check out their job listings. At the time of writing this, they were looking for… more Scrum Masters!)