National accounting as code
Product-level supply and use balancing as code.
Write down how you balance each product. Run the same logic when inputs change, review what moved, and bring the results back into your national accounts production system.
What is AccScript?
Tested in an ERETES environment
AccScript has been tested and is in use in an ERETES environment.
For more information, contact us.
AccScript is an R-based domain-specific language and execution engine for balancing supply and use at the product level. It uses the vocabulary of national accounts so compilers can express equations and assumptions in terms of output, imports, margins, intermediate consumption, final uses, and price and volume indices.
Compilation systems give national accountants a structured table to inspect and balance. When the decisions behind those edits live in a series of manual steps, revised inputs can mean repeating the work under the same deadline. An AccScript file preserves the method so the team can rerun it at no additional cost.
How it works?
AccScript adds a reproducible balancing layer to your production workflow. Your compilation system remains the place where you manage and finalize the accounts.
R and Excel can also support repeatable workflows. AccScript provides reusable accounting operations so a product script can focus on the balancing decisions.
Export and prepare the inputs
Export the product-level supply and use balances from your production system. Gather any supporting detail the balances don’t show, such as transaction breakdowns, price and volume indices, and intermediate consumption of each product by industry. Prepare the structured extracts as inputs for AccScript.
Write and run the balance
Express your assumptions as equations and familiar accounting operations. The engine validates the script and applies it to the extracted data.
Review, reintegrate and reuse
Review the output and the record of changed cells. Bring approved values back into production and rerun the script when assumptions or inputs change.
A personal initiative
Who is building
AccScript?
AccScript is being built by Iliass Taleb, a Senior National Accounts Statistician at the High Commission for Planning, Morocco’s national statistical office, with 10 years of experience in national accounting.
“ERETES gave me a solid way to balance products. When revisions came in, I often had to repeat the same steps. Terraform’s idea of infrastructure as code made me wonder whether I could write those decisions down once and run them again, and in doing so introduce a new paradigm: national accounting as code.” — Iliass Taleb
The project is a personal initiative, currently funded by Taleb.
Conferences and events
AccScript has been accepted at peer events in official statistics and statistical research. A paper on its design and application is being prepared for submission to a statistics journal.
uRos 2026, Paris. An R-based language for writing and validating product balances, recording changes, and preparing outputs for reintegration. Read the uRos abstract (PDF).
YSM 2026, Cambridge. A declarative approach to expressing economic relationships and rerunning balances under revised assumptions. Read the YSM abstract (PDF).
Try AccScript on one product balance
If you’re interested in this approach, get in touch. We can explore together how AccScript could connect to your existing production system.