Sub topic 14
Testing Sensitivity to Changes in Days
This chapter assumes you can already build the three schedules from days drivers. You should know that receivables use revenue, inventory and payables use cost of goods sold (COGS), and that the cash effect is the negative of the change in net working capital (NWC). It also assumes you can read short Python functions. The chapter shows how to measure how much cash moves when a days assumption is wrong, and how to present that to a reader of your model.
Why test the days assumptions
Days drivers are forecasts, and small changes in them move cash by amounts that matter. A forecast of 45 receivable days can easily turn out to be 50 if a large customer pays late. Sensitivity analysis answers three questions:
- Which of the three drivers moves cash the most per day of error?
- How wide a range of days should the model be able to absorb before a funding gap appears?
- Does the forecast depend on an assumption you cannot defend, such as payables stretching every year?
You do not need new machinery for this. The schedules are already formulas of the days inputs, so you change an input and recompute.
The cash value of one day
Each balance is linear in its days driver, so the cash value of one day has a closed form:
- One receivable day is worth revenue / 365.
- One inventory day is worth COGS / 365.
- One payable day is worth COGS / 365.
Using the running example of revenue 1,000 and COGS 600 in year 1:
| Driver | Value of one day | Effect of +1 day on cash |
|---|---|---|
| DSO | 1000 / 365 = 2.74 | Uses 2.74 |
| DIO | 600 / 365 = 1.64 | Uses 1.64 |
| DPO | 600 / 365 = 1.64 | Releases 1.64 |
The signs follow the balance sheet. Receivables and inventory are assets, so more days tie up cash. Payables are a liability, so more days mean suppliers finance you for longer. The DSO row is the largest here because revenue exceeds COGS. A day of DSO is worth roughly 1.67 times a day of DIO or DPO, which is the ratio revenue / COGS. A company with a thin gross margin has a ratio close to 1.
The 365 in the denominator is the same day-count basis you used to compute the historical days. If you derived the days on 360 and forecast on 365, every value above changes by about 1.4%, and the error looks like a business change that did not happen.
One-way sensitivity in code
A one-way test changes one driver and holds the rest fixed. The script below computes year-1 cash effect for DSO shocks from -5 to +5 days, starting from the prior-year balances of the running example (revenue 900, COGS 540, days 45, 60, 40).
DAYS = 365
def nwc(revenue, cogs, dso, dio, dpo, days=DAYS):
receivables = revenue * dso / days
inventory = cogs * dio / days
payables = cogs * dpo / days
return receivables + inventory - payables
def cash_effect(prior_nwc, revenue, cogs, dso, dio, dpo):
return -(nwc(revenue, cogs, dso, dio, dpo) - prior_nwc)
prior = nwc(900.0, 540.0, 45, 60, 40)
base = cash_effect(prior, 1000.0, 600.0, 45, 60, 40)
print(f"Base cash effect: {base:.1f}")
print("Value of one day:")
print(f" DSO {1000 / DAYS:.2f}, DIO {600 / DAYS:.2f}, DPO {600 / DAYS:.2f}")
for shock in (-5, -2, 0, 2, 5):
effect = cash_effect(prior, 1000.0, 600.0, 45 + shock, 60, 40)
print(f"DSO {45 + shock:>2}: cash effect {effect:7.1f}, vs base {effect - base:6.1f}")The base cash effect is -15.6. At 50 days of DSO the cash effect is -29.3, so five extra days nearly double the year-1 outflow. At 40 days it is -1.9, so the same five days saved almost remove it. The change against base is 2.74 times the shock in every row, which confirms the closed form.
Two-way sensitivity
Drivers rarely move alone. A customer who pays late and a supplier who is paid early push in the same direction. A two-way grid shows the combined effect. Extend the script above with this loop:
for dso in (40, 45, 50):
row = [cash_effect(prior, 1000.0, 600.0, dso, 60, dpo) for dpo in (35, 40, 45)]
print(dso, " ".join(f"{value:7.1f}" for value in row))The year-1 cash effect from the grid:
| DSO \ DPO | 35 | 40 | 45 |
|---|---|---|---|
| 40 | -10.1 | -1.9 | 6.3 |
| 45 | -23.8 | -15.6 | -7.4 |
| 50 | -37.5 | -29.3 | -21.1 |
Read the grid along its diagonals. Moving from DSO 45 and DPO 40 to DSO 50 and DPO 45 changes cash by about -5.5. That equals +13.7 from the extra payable days minus 13.7 from... no: it equals -13.7 from the extra receivable days plus 8.2 from the extra payable days. A supplier stretch offsets part of a customer delay, but only 60% of it here, because a payable day is worth less than a receivable day.
Level change versus drift
A one-time shift in days and a trend in days both change cash, but the timing differs. A level shift produces a one-time hit in the year it happens. Later years carry the higher balance but see only normal growth. Drift produces a hit every year.
The script below compares three three-year paths: the base case at 45 days, a level shift to 48 days that holds from year 1, and a drift of +1 day each year (46, 47, 48).
def nwc(revenue, cogs, dso, dio, dpo, days=365):
return revenue * dso / days + cogs * dio / days - cogs * dpo / days
revenue = [1000.0, 1100.0, 1210.0]
cogs = [600.0, 660.0, 726.0]
paths = {
"base": [45, 45, 45],
"level +3": [48, 48, 48],
"drift +1/yr": [46, 47, 48],
}
start_nwc = nwc(900.0, 540.0, 45, 60, 40)
for name, dso_path in paths.items():
prior = start_nwc
effects = []
for rev, c, dso in zip(revenue, cogs, dso_path):
current = nwc(rev, c, dso, 60, 40)
effects.append(-(current - prior))
prior = current
shown = ", ".join(f"{e:7.1f}" for e in effects)
print(f"{name:12} {shown} total {sum(effects):7.1f}")| Path | Year 1 | Year 2 | Year 3 | Three-year total |
|---|---|---|---|---|
| Base | -15.6 | -15.6 | -17.2 | -48.4 |
| Level +3 | -23.8 | -16.4 | -18.1 | -58.4 |
| Drift +1 per year | -18.4 | -18.9 | -21.1 | -58.4 |
The totals match for the level and drift paths because both end at 48 days. The cumulative cash effect depends only on the starting and ending NWC. The path decides when the cash leaves. If a covenant or minimum cash balance applies in year 1, the level shift is the dangerous case. If you are judging whether the business model works, the drift case is the more worrying one, because it suggests the days have not stopped moving.
Choosing the ranges
Pick shock sizes from evidence, not round numbers:
- Compute the historical days for each period and take the spread, such as the range of the last eight quarters.
- Use the standard deviation of the history as a one-step shock, and the historical min and max as a stress case.
- Add a case tied to a named event, such as the loss of the largest customer's early-payment terms.
- Keep the shocks the same across drivers when you want to rank them by value per day, and use driver-specific shocks when you want realistic scenarios.
Report each result in cash and as a share of forecast operating cash flow. A 10-unit swing means more for a company with 30 units of operating cash flow than for one with 300.
Limits of the test
Three further limits apply:
- The method is linear within a period, but real days are not. Seasonal businesses show year-end days that differ sharply from the average, so a shock on year-end balances may not describe the intra-year peak when funding is tightest.
- Ranges for DPO have a ceiling set by supplier tolerance. A grid cell with 60 payable days may be arithmetically valid and commercially impossible.
- Cash effects flow into interest through the revolver or cash balance. If your model calculates interest on average balances, the sensitivity of net income to days is nonzero, and the check should be run through the full model, not only the schedule.
Exercise
A company forecasts revenue of 2,000 and COGS of 1,200 on a 365-day basis. Management proposes cutting inventory days by 5 days and extending payable days by 3 days. How much cash does the plan release, and which of the two changes contributes more?
Show answer
One inventory day is worth 1200 / 365 = 3.29, so the 5-day cut releases 5 x 3.29 = 16.44. One payable day is also worth 3.29, so the 3-day extension releases 9.86. The plan releases 26.30 in total, and the inventory cut contributes more because it covers more days. Both are valued at COGS per day.
Exercise
In the three-year comparison, the level shift and the drift path both have a three-year cash effect of -58.4. Why are the totals equal, and when would you still prefer to report the drift path as the worse case?
Show answer
The cumulative cash effect equals the negative of the total change in NWC, which depends only on the starting and ending balances. Both paths end at 48 DSO on the same year-3 revenue, so their ending NWC is equal. The drift path is the worse case when it signals a continuing trend, since days that keep rising beyond year 3 would keep consuming cash. Its year-2 and year-3 outflows (-18.9 and -21.1) are also larger than the level shift's (-16.4 and -18.1).