Calculating Total assets and Total Liabilities from accounts.html data

hi want to calculate total assets and total liabilities from the accounts file which are xx.html using inline xbrl. what do u guys suggest for this calculation. thank u.

arelle is a good tool to have some analysis on xbrl files.

UPDATE Everyone: i am able to create a parser for this to calculate total assets, total liabilites and current assets equity. currently i am able to archive 65% accuracy using this parser.

Using Arelle to scan ixbrl and convert to JSON you should be getting much higher than 65% accuracy. It works on nearly any recently produced (last 1 or 2 years) accounts. There are really only a handful that it can’t parse. What is causing the 35% inaccuracy?

1 Like

Hi, ebrian101 thank you for your response. Yes, Arelle is a more stable version. The only issue I’m currently facing is how to calculate total assets using Arelle. I would like to do this through code. Can Arelle tell me which fields I need to add together to obtain results for total assets or total liabilities?

in my previous parser i was able to parse html into this formate
image

In my previous post, I mentioned that I was able to perform calculations using the FRC 102 taxonomy and achieved 65% accuracy on my reports dataset. I am just curious if there is a way to precisely determine which fields truly represent total assets or total liabilities, and which are duplicate values.

Thank u

Right, I see what you mean.
This gets quite deep into ixbrl, and I would suggest a helpful book titled “The XBRL Book” by Ghislain Forney.
I suspect what you need is the calculation link base for frc 102. I’ve not managed to do it myself, but in theory you should be able to use the calculation schema to “validate” the xbrl instance by checking that all the line items add up to the totals. I believe arelle is capable of these calculations, but you might need to provide your own calculation taxonomy for frc102.
All things considered, you’ve done well to get 65% of them to add up! However, there are hundreds or thousands of xbrl tags out there, so manually deciding which should be used in the sum is quite tricky (and will get outdated), whereas using their calcuation schema/taxonomy/linkbase you should be able to do this in an automated fashion.
Please let me know if you get it right, I’d be interested to know.

just to give you an idea : https://github.com/Dan0xy/xbrl-file-parser