Slide 1

Slide 1 text

DDD for finance & cashflow modeling Applying DDD techniques to better understand cashflow forecasting © GuanxiLabs 2019 $ € £ € € £ £ € $ $

Slide 2

Slide 2 text

Hello Guanxi Labs 2 François Royer CEO & Principal Consultant francois.royer@guanxilabs.com +33 (0) 6 72 33 75 02

Slide 3

Slide 3 text

How this hands-on is organised • The story – why cashflow forecasting and for who? • Accouting 101 for hackers and computer scientists 1 2 3 • Brainstorming exercise: identify the building blocks of a cashflow forecast app • Review of the outcome – a mapping between DDD concepts and accounting objects • Prototyping using a spreadsheet • Review of the outcome and what needs to be added for a fully functional app

Slide 4

Slide 4 text

The story – choose your persona SOFTWARE ENGINEER TURNED ENTREPRENEUR BUSINESS ANALYST or « What is the company’s available cash flow for the upcoming year? »

Slide 5

Slide 5 text

Quick business 101 with the enterprise value chain Porter’s value chain

Slide 6

Slide 6 text

The accounting cycle time Beginning of fiscal year End of fiscal year Opening Closing Recording & bookkeeping

Slide 7

Slide 7 text

Your business as a graph ENTERPRISE ASSETS LIABILITIES CASH EXPENDITURES INCOME ASSETS ACTIVITIES

Slide 8

Slide 8 text

Core principles, such as double-entry accounting and financial aggregates seem very DDD friendly ENTERPRISE ASSETS CASH 10 000€ flow in « My company buys 10 000 € of goods in cash (paid immediately) » 10 000€ flow out

Slide 9

Slide 9 text

Core principles, such as double-entry accounting and financial aggregates seem very DDD friendly ENTERPRISE CASH INCOME 10 000€ flow in « My company sells 5 000 € of services (paid immediately) » 10 000€ flow out

Slide 10

Slide 10 text

Bookeeping involves identifying what economic aggregates are concerned by documents (e.g. invoices) ECONOMIC AGGREGATES ASSETS LIABILITIES CASH EXPENDITURES INCOME

Slide 11

Slide 11 text

Bookeeping involves identifying what economic aggregates are concerned by documents (e.g. invoices) TRANSACTION ACTIVITIES ASSETS ACCOUNT IN (debit) OUT (credit) IN (debit) OUT (credit) TOTAL What economic aggregates are involved What accounts are subject to the transactions

Slide 12

Slide 12 text

Bookeeping involves identifying what economic aggregates are concerned by documents (e.g. invoices) TRANSACTION ACTIVITIES ASSETS ACCOUNT IN (debit) OUT (credit) IN (debit) OUT (credit) TOTAL What economic aggregates are involved What accounts are subject to the transactions Expenditure In Liability Out 5000 5000 601 – raw goods 401 - Suppliers Liability In Cash Out 5000 5000 401 – Suppliers 512 - Bank 20/02/N 30/04/N

Slide 13

Slide 13 text

Trees are already part of the accounting domain language Suppliers Third party accounts Customers Social State Group & shareholders VAT CSG, family… Accounts payable Accounts receivable

Slide 14

Slide 14 text

Cashflow forecasting is part of the CFO’s activities… not the accountant’s To negotiate financial products with the banker To repay debt To plan for investments and new hires To pay yourself or your shareholder dividends To value a business (DCF)

Slide 15

Slide 15 text

To computer scientists, business is just another graph Bank account 23995 € https://martin.kleppmann.com/2011/03/07/accounting-for-computer-scientists.html Furniture 375 € 500 € Founders -25000 € Credit card -8 € Food 13 € 5 € 13 € 5000 € Sales -10000 € Customer 2 2500 € Customer 2 0 € 5000 € 5000 € 5000 € 2500 € Payroll 8000 € 8000 € Depreciation 125 € 125 €

Slide 16

Slide 16 text

Assets/liabilities, income/expenditure and capital are just another view Bank account 23995 € https://martin.kleppmann.com/2011/03/07/accounting-for-computer-scientists.html Furniture 375 € 500 € Founders -25000 € Credit card -8 € Food 13 € 5 € 13 € 5000 € Sales -10000 € Customer 2 2500 € Customer 2 0 € 5000 € 5000 € 5000 € 2500 € Payroll 8000 € 8000 € Depreciation 125 € 125 €

Slide 17

Slide 17 text

The Direct vs the Indirect Approach to cashflow forecast Some handler Entity 1 Agg root Entity 2 Projection at T+1, T+N… of aggregates Impact on cash balance Invoice 2020-1 Invoice 2020-12 … At some time

Slide 18

Slide 18 text

Warm-up exercise – applying DDD to VAT payments VAT State Invoice 2020-1 Invoice 2020-2 Invoice 2020-12 … Invoice 2020-1 Invoice 2020-2 Invoice 2020-12 … VAT handler Passage of time ? What happens here?

Slide 19

Slide 19 text

Modeling time! • The story – why cashflow forecasting and for who? • Accouting 101 for hackers and computer scientists 1 2 3 • Brainstorming exercise: identify the building blocks of a cashflow forecast app • Review of the outcome – a mapping between DDD concepts and accounting objects • Prototyping using a spreadsheet • Review of the outcome and what needs to be added for a fully functional app