Your browser does not support JavaScript!

COA scripts

This page includes an illustrative script showing how to apply the COA design logic outlined on the implementation page.

This logic makes the COA infinitely adjustable, so it may be used by any entity of any size or complexity.

The page also includes scripts illustrating how to generate an IFRS | GAAP compatible balance sheet and profit and loss statment from a trial balance reflecting the COA's structure.

Important: the scripts on this page merely illustrate COA logic. They are not suitable for dual reporting as is .

While this standardized COA may be used for dual e.g. IFRS | US GAAP reporting purposes, adjustments will be necessary!

While comparable, IFRS and US GAAP are not identical. It is thus not reasonable to run the generate IFRS statements | GAAP statements script on the same trial balance and expect results fully compliant with IFRS and US GAAP for both iterations.

Adjustments will be necessary!

The illustrative example section discusses and illustrates the most pertinent differences between IFRS and US GAAP.

The same caveat applies when the standardized COA is used in any jurisdiction that specifies a particular accounting/reporting standard.

Script usage instructions.

First, make certain you have Python installed (also run pip install pandas openpyxl in your terminal).

Download and unzip scripts making certain your input data and the scripts are in the same folder. If they are not, they will not work.

The first script generates a chart of accounts with all the necessary subtotals. The next two scripts generates a IFRS or GAAP balance sheet and profit and loss statement either in detail (for internal control and audit purposes) or summarized (for external reporting purposes) formats.

Prepare the input

Be certain to name your input file COA_input_data.xlsx; otherwise, the script will not recognize the file. Also, be certain to maintain the structure of the file, particularly the first four columns, which must be named: 'Account title', 'Account #', 'Depth', and 'Balance'. Make sure you keep column F empty. It will be overwritten with instructions to the EPR on how to treat each line. You may add any additional columns from G onwards. In the sample file, asset information about trucks is added so the COA does not need to be linked to sub-ledgers. Finally, make certain you do not delete, rename, or renumber the suspense account # 3.2.4. Otherwise, retained earnings will not balance correctly.

Generate COA

Run the Generate-COA.py file. It will generate an output file called COA_output_data.xlsx. Do not change this name. Do not change the file's content. If you need to make changes, make them to your input file and run the script again.

Generate financial statements

The first two scripts generate financial statements in a standard GAAP format. The second two follow IFRS reporting conventions. The Line Item scripts include individual account balances, making them suitable for internal control or audit purposes. The Subtotal scripts present high-level categories only, making them suitable for external reporting purposes

  • generate_statements-with-line-items.py
  • generate_statements-sub-totals-only.py
  • generate_statements-with-line-items-IFRS.py
  • generate_statements-sub-totals-only-IFRS.py

You are done

You may now rename the output files as you like.

Note: the values in the script output are hard numbers. If you need to make adjustments, go back, update the COA_input_data.xlsx file, and run the scripts again.

This page also includes scripts to automatically generate account numbers.

While the COAs on this page do not need account numbers to operate as illustrated, accounts with numbers can be useful. The scripts available below automate the process so the numbers do not need to be adjusted manually.

To use the script, once Python is installed (above), simply set up your COA in the same format as the included sample files (including identical file names) download the scripts, set up the source files exactly as illustrated using the same file names. Then run the scripts. The expanded script inserts placeholder numbering 00 so it can be adjusted by the user.

Important: since the COA’s hierarchy is key to its functionality, it is imperative to make certain the depth column reflects its structure exactly. Otherwise the COA will not function as intended.

Professional content
For full access, please log in or get Pro view.

Log in or get Pro view

Pro view gives full access to all downloads and illustrations.