Case study, synthetic brands
A BFCM cash copilot that explains its own misses
forecast-health-monitor
A 13-week cash forecast for an online brand going into Black Friday and Cyber Monday. It splits each miss into its drivers, then turns the explanation into dated actions: a credit draw with its repay date, which bills to pay early, and what to do with cash after the trough.
The problem
A forecast that misses is normal. What an operator needs on Monday is why it missed and what to do about it. A payout shortfall can be a refund spike on one SKU, a held payout that comes back next week, or a retailer paying late, and each calls for a different action.
The approach
- A driver-based forecast: Shopify sales and refunds by SKU, fees, chargebacks, payout timing, Amazon settlements, wholesale terms by retailer, ad spend by platform, and bills with terms and dates.
- Variance split by swapping one driver at a time from forecast to actual, so the pieces add up to the line exactly.
- A finding has to beat both the driver's own normal noise (z = 3) and the brand's materiality.
- Rules then reforecast, size the credit draw with a cushion, pick bill timing under vendor rules, and compare paying down the line against sweeping to savings.
The Monday brief, Nov 16
Example from my forecast-health-monitor project. Synthetic brand, synthetic data.
- Refunds ran 1.7x forecast, and SKU FW-2201 is 99% of the excess. Carrying that rate two more weeks, and paying one bill early, moves the low point to $99,718.
- Draw $225,000 on Monday and repay it the week of Nov 23. Interest is about $476.
- Pay ShipNest 3PL's $69,211 invoice now to take the 2% discount: it saves $1,384 against at most about $430 of interest.
- After the trough, pay down $183,313 of the credit line before sweeping to savings, worth about $15,435 a year more.
Two draws, two moments. Before any actuals, the week-0 forecast bottoms at $194,498, $105,502 under the buffer, so the smallest draw in $25,000 steps that holds it is $125,000; that is the figure the third project grades.
By Nov 16, refunds have pushed the reforecast low point to $99,718 and the draw adds a cushion for receipts not yet in, so the brief calls for $225,000. Open the full brief.
Forecast to actual, through Nov 15
When the forecast matters: tight credit
With normal credit every policy takes every early-pay discount, and they tie. That is the honest result: 2/10 net 30 is worth about 37% a year, so borrowing at 11% to take it always pays.
Results
| Event set | Events | Found (from the committed run) | Right cause (from the committed run) | Precision (from the committed run) | False alarms (from the committed run) |
|---|---|---|---|---|---|
| Development, built against | 12 | 12 | 12 | 94% | 1 |
| Holdout, written after the freeze | 8 | 8 | 8 | 79% | 3 |
| Noise only, 650 brand-weeks | 0 | 8 |
(from the committed run) copied from the committed run, as published in the project README.
8 false alarms in 650 event-free brand-weeks, about 1 in 80.
The workbook
Fernwood's forecast is also an Excel model with Inputs, Forecast, Calendar, Bills and a Check tab. Every line and week ties to the Python engine to the cent, the Check tab shows it, and changing an input moves the forecast.
Why the buffer is $300,000
It is a little under two weeks of Fernwood's average forecast outflows: $2.13M over 13 weeks, about $164K a week. The other nine brands get the same policy computed from their own ledgers, two weeks of outflow.
The detection bar (3 standard deviations), the materiality floor (the larger of $2,500 or 1.5% of weekly receipts) and the draw cushion (1.65 standard deviations, one-sided 95%) are explained in the repository README.
What changed after the holdout
The first holdout run is kept unchanged in the repository. It showed that draws had no cushion (two brands dipped under the buffer by up to $2,717), that the reforecast had no rule for fee changes, and that Amazon fee findings were worded as processing fees. I fixed all three, so the holdout is not a blind test of the fixed version.
Where this fits at Highbeam
| This work | Highbeam or Luma workflow it shows | The role's work it rehearses |
|---|---|---|
| A driver-based 13-week forecast per brand | Luma's baseline cash forecasting and its view of a brand's true cash position | Forecast health monitoring |
| Miss attribution, detection and the Monday brief | The Alerts and reporting agent, which monitors key metrics and writes weekly reports | Explaining a messy cash situation clearly to a founder |
| Draw sizing with a cushion and a repay date | Highbeam's revolving line of credit | Cash management recommendations |
| Bill timing under vendor rules and discounts | Highbeam Bill Pay | AP and bill pay setup |
| Paydown vs sweep after the trough | The Treasury agent, which maximizes yield and minimizes interest | Cash management recommendations |
| The Excel twin that ties to the code | Excel and Sheets modeling |
Finance concepts
The forecast is on a cash basis: it turns the accrual plan P&L into the weeks money actually moves. Accounts receivable shows up as wholesale receipts by retailer and terms; accounts payable as bills with terms, due dates and early-pay discounts. The finance concepts behind these projects.
How I built this
I built this with Claude Code, Anthropic's coding agent. I chose the problem and set the rules the work had to follow: synthetic brands only, one engine for the forecast and the simulated actuals, hidden event labels the monitor never reads, freeze the detector before writing the holdout, and no number on this page that a committed run did not produce.
Claude Code wrote most of the code, tests and first drafts of the docs under that direction and ran the evals. I read the results, decided what to fix and what to leave visible, and ran reviews from an implementation team's point of view that drove the last rounds of changes. The commit history and the CHANGELOG in the repository show the order things happened in.
Limits
- The simulated world and the forecast share one engine, so every miss has a driver that explains it. Real brands have causes outside any model.
- I wrote both the events and the detector. The noise-only worlds are the least biased measure.
- The monitor needs actuals at driver grain: refunds by SKU, settlement reserve lines, invoices by retailer.
- The 11% credit line rate and 2.58% savings yield are illustrative.
- Fernwood's levels come from its plan, not its onboarded ledger. The ledger runs at roughly 1.9 times the plan (an earlier note said 30%, which was wrong); the two were built separately and I did not force them to agree. Fernwood takes only its noise, payroll Fridays and card autopay date from the ledger. The other nine brands take their levels straight from their ledgers.