Accounting movements

Accounting Movements is just graph theory

Accounting is the tracking of resources in order to answer question.. This article was inspired by a post explaining accounting for computer scientists by Kleppmann 2011. The key insight is to view accounting transactions as a graph which is a set of nodes (accounts) joined by edges (transactions).

A transaction is simply the movement of resources from one place to another (one account to another) at a particular time. For example if an investor puts money into a business you can represent the transaction as a movement of money:

flowchart LR I([Investor]) -- £5 --> B([Business])

The investor is hoping that the business will do well and then the following will occur:

flowchart LR I -- £5 --> B B -. Trading .-> B B([Business]) -- £100 --> I([Investor])

Input and outputs

We can model what the investor hopes will happening by adding trading and the revenue out:

flowchart LR classDef classEquity fill:#EEB,stroke-width:4px; classDef classAssets fill:#CDA; I([Investor]) I1([Investor]) class I,I1 classEquity; subgraph Business direction LR E([Equity Input]) D([Dividend output]) class E,D classEquity; B([Assets]) class B classAssets; R([Revenue]) Ex([Expense]) end I -- £5 --> Business E -- £5 --> B R -. Sales .-> B B -- £1000 --> D B -. Expense .-> Ex Business -- £1000 --> I1

Accounting records

Accounting records are within the business and have to match the external movements:

flowchart LR classDef classAssets fill:#CDA; classDef classBusiness fill:#FFFFDE; classDef classEquity fill:#EEB,stroke-width:4px; classDef classExpense fill:#FCC,stroke-width:4px; classDef classIncome fill:#BCE,stroke-width:4px; classDef classInvestor fill:#ECECFF,stroke-width:4px; classDef classLiabilities fill:#DDD; I([Investor]) class I classEquity; subgraph Business direction LR E([Equity Input]) class E classEquity; B([Assets Cash]) class B classAssets; end I -- £5 --> Business E -- £5 --> B

See Boundaries of entities for more details

Accounting conventions can go either way and can get confusing. We will stick to long standing (500+ years) accounting conventions.

This is an index to colour coding each of the accounts/nodes and giving them a are more expressive title:

Colour Meaning
$$\definecolor{equity}{RGB}{238,238,187}\colorbox{equity}{Equity}$$ Money invested by the owners or their profits
$$\definecolor{asset}{RGB}{204,221,170}\colorbox{asset}{Asset}$$ Things that the entity has or is owing to it
$$\definecolor{liability}{RGB}{221,221,221}\colorbox{liability}{Liabilities}$$ Things that the entity has or is owing to it
$$\definecolor{income}{RGB}{187,204,238}\colorbox{income}{Income}$$ Income earned by the business
$$\definecolor{expense}{RGB}{255,204,204}\colorbox{expense}{Expense}$$ Expenses incurred by the business

The link to graph theory is that each node is an account and each edge a transaction.

Detailed simplest business transaction

This is a very simple business model. You invest in your business. You then buy oranges from an orange farmer, take them to market and sell them at a profit. You then keep the profit. I quite like orange trading as my wifes family in eighteenth century Farrell 2020.

This is shown with accounts denominated in oranges Orange trading example and then reworked using money to give the result below:

Parent Prev Next

2025

© 2018 - 2025 · Bytestone Blog · Theme Simpleness Powered by Hugo ·