-
Notifications
You must be signed in to change notification settings - Fork 5
Additional test cases to check balance with bank statements #39
Comments
Is this a good use case for Beancount balance assertions? |
IMO it could be handy for account that's not separated to escrow/operation. For example, by end of 2012-06, new-alliance has escrow $46.66, and operations $83.75, they do sum up to $130.41 as shown in bank statement, but I've not found a way to aggregate those two parts using Beancount balance assertions. |
Hmmm, good point ... 🤔 I guess we would have to invert the taxonomy in order to take advantage of that feature. In other words, we'd have to do:
Instead of:
Then we could do:
Right? Should we do that? I think it'd mean rewriting the escrow balance test scripts. |
Do you think we need this for every day? Would monthly assertions be sufficient? |
That's a good find. I don't see a better approach yet. Rewriting the escrow balance test scripts sounds feasible. I'll try this with the 2012-06 part.
It might, but putting all assertions doesn't add much workload. BTW if we use the built-in balance-assertion, it'll only check those days that appear in bank statements automatically (I think), which is ideal. One possible overhead is some tricky scenarios where balancing in the middle of month is not so straightforward. Still IMO it's better to resolve those cases earlier than later, and, if indeed infeasible, we fallback to monthly/bi-weekly assertion (though I guess those cases will bite us later anyways). |
Stems from discussion around #6 (comment), and actually we are already doing that manually when we validate the beancount files.
Basically, the goal is to keep balance consistent with every balance in every bank account.
For example, pick 1/31/2017, the sum of all the assets of PNC according to beancount should be equal to the balance on that day in the bank statement. The same should apply to every day, and other bank accounts as well.
To achieve that, we'll add sanitized bank statements in the repository, so that they can be compared with through the tests.
Does it sound reasonable? I've not looked into beancount whether it has special support for this kind of task, but I imagine writing query from scratch is still feasible. The test could be a little slow, if we want to run a query for each day with transaction, but that's low priority to optimize IMO.
The text was updated successfully, but these errors were encountered: