Post #10 Companion — The CFO & AI Series

The Agent That Notices Idle Cash
Before Anyone Adds It Up

A small script that compares each account's balance to its buffer and estimates what the excess could have earned instead — before the number quietly disappears into next month's close.

Boris Dračka · August 2026 · Companion demo

This is a personal, non-commercial side project I put together to learn — not a product or service, and not connected to any company I work with.

Post #10 asked a simple question: if a balance sits above the agreed operating buffer for weeks, who actually notices — and what does that silence cost? Below is a small prototype that answers the second half of that question with sample data.

6
Sample accounts checked
2 of 6
Flagged as sitting well above buffer
~€8,100/yr
Illustrative forgone interest across the flagged accounts

The script doesn't decide anything. It just puts the one number — what the excess could have earned — next to the balance that was already sitting there in plain sight.

The sample data

Six accounts, each with a balance, an agreed buffer, and the rate a routine cash sweep could reasonably earn. Two of them are carrying meaningfully more than their buffer calls for.

  account_balances.csv — sample data
IDAccountBalanceBufferExcessAlt. rateStatus
AC-01Operating Account€340,000€150,000€190,0003.00%Flagged
AC-02Payroll Account€85,000€80,000€5,0003.00%Clear
AC-03VAT Reserve€60,000€60,000€03.00%Clear
AC-04Project Account€120,000€40,000€80,0003.00%Flagged
AC-05Marketing Account€45,000€40,000€5,0003.00%Clear
AC-06Contingency Reserve€200,000€200,000€03.00%Clear

How it works

1
Load the balancesReads a CSV with one row per account: balance, buffer, and an illustrative alternative rate.
2
Compare to bufferFor each account, subtracts the buffer from the balance to get the excess sitting idle.
3
Apply a thresholdAnything above a configurable excess amount (default €50,000) gets flagged for review.
4
Estimate forgone interestMultiplies the flagged excess by the alternative rate to estimate what a sweep could have earned.
5
Print a summaryLists the flagged accounts and the estimated annual and monthly opportunity cost.

Try it yourself

1 — Clone the repository

# same personal, non-commercial repo as the earlier demos in this series git clone https://github.com/LuliBobo/cfo-agents.git cd cfo-agents

2 — Add your own balances (optional)

account_id,account_name,balance,buffer,alt_rate_pct AC-01,Operating Account,340000,150000,3.0 AC-04,Project Account,120000,40000,3.0 # ...add as many rows as you have accounts

3 — Run it

python idle_cash_agent.py data/account_balances.csv --threshold 50000 --rate 3.0

4 — Read the output

================================================================ Idle Cash Agent — Balance vs Buffer Check ================================================================ [Step 1] Loaded 6 account balance(s) from CSV [Step 2] Comparing each balance to its configured buffer [Step 3] Flagging anything with more than €50,000 sitting idle above buffer AC-01 Operating Account 340,000 150,000 190,000 3.00% ⚠ FLAG AC-04 Project Account 120,000 40,000 80,000 3.00% ⚠ FLAG [Step 4] 2 of 6 account(s) flagged [Step 5] Estimated forgone interest: ~€8,100/year (~€675/month)

What it's built from

Data source

A plain CSV of account balances — no live banking connection, no API keys, nothing beyond sample data.

Calculation

Standard Python, no external dependencies — subtraction and a rate applied to the excess.

Configurable threshold

The flagging amount and the alternative rate are both command-line arguments, not hardcoded.

Read-only by design

The script only reads and reports. It doesn't move money, connect to a bank, or take any action on its own.

What's in the repository

The same personal, non-commercial repository as the earlier demos in this series:

View on GitHub Back to Post #10

Follow the series

Post #11 stays with cash — this time on the other side of the ledger: which invoices actually get paid first, and why the answer usually has nothing to do with the due date printed on them.

Subscribe free
No spam. One post per week. Unsubscribe any time.