Back to trackLesson 8 of 25

Startup Runway 3: Fat Tails and Stress Months

Uses Only Free-Tier SpiceGrinder

Problem statement

Lesson 2.2 found that three founders in ten run out of cash within the year. That came from a monthly net cash flow with a mean of -$8k and a standard deviation of $12k, drawn each month from a Normal distribution. The mean and the standard deviation are what a founder can estimate from a few years of books. The Normal shape is a choice we added on top.

A real business has months that are much worse than the rest: a customer leaves, a refund wave hits, a tax bill arrives. So the question is whether the chance of ruin depends on anything beyond the mean and the standard deviation. To find out, we keep both numbers exactly the same and change only the shape of the monthly draw. Three shapes:

  • a Normal, the existing samples/simulation/cash-runway.xml (we won’t rebuild it);
  • a mix of calm and stressed months: most months are mild, one in ten is a bad one;
  • a Student-t with 4 degrees of freedom, a bell with heavy tails.

If the mean and the standard deviation decided the answer, all three would give about 30%.

The model

The Normal model is the one from lesson 2.2. The other two replace its first node and keep the rest: Year gathers twelve months into a row, Balance makes the twelve running balances from $120k, and LowPoint and Ruin add the lowest balance and the ruin flag (LowPoint has dimension="14" to make room for the two columns). Columns 0 to 11 are the balances, column 12 the lowest of them, column 13 the ruin flag.

The mix. Nine months in ten are calm, Normal(mean -5, sd 5). One month in ten is a stress month, Normal(mean -35, sd 20.12). Those numbers are not arbitrary; they are chosen so that the monthly flow has mean -8 and standard deviation 12, like the Normal. The mean is easy: 0.9 x (-5) + 0.1 x (-35) = -8. For the variance, the spread of a mix has two parts, the spread inside each kind of month and the spread between the kinds:

  • inside: 0.9 x 5² + 0.1 x 20.12² = 22.5 + 40.5 = 63
  • between: 0.9 x (-5 + 8)² + 0.1 x (-35 + 8)² = 8.1 + 72.9 = 81
  • together: 63 + 81 = 144 = 12²

We picked the calm month’s mean (-5) and spread (5) and solved for the stress month: its mean has to be -35 for the average to hit -8, and its sd has to be the square root of 405, which is 20.12461179749811, to bring the inside part to 63.

<dataset columns="balanceM1, balanceM2, balanceM3, balanceM4, balanceM5, balanceM6, balanceM7, balanceM8, balanceM9, balanceM10, balanceM11, balanceM12, lowPoint, ruin" seed="2032">
  <root node="Ruin"/>
  <nodes>
    <Normal name="CalmMonth" mean="-5" sigma="5"/>
    <Normal name="StressedMonth" mean="-35" sigma="20.12461179749811"/>
    <Mix name="NetFlow">
      <input name="CalmMonth" weight="0.9"/>
      <input name="StressedMonth" weight="0.1"/>
    </Mix>
    <Redimension name="Year" dimension="12">
      <input name="NetFlow"/>
    </Redimension>
    ...                      Balance, LowPoint, Ruin: as in lesson 2.2
  </nodes>
</dataset>

Mix picks one of its inputs for each month, with the given weights. Each component is its own Normal node, so a two-component mix is seven nodes in total, well inside Free’s limit of 20. The model is samples/simulation/cash-runway-stress-mix.xml.

The Student-t. StudentT takes only the degrees of freedom: it is centered on 0 and has a scale of 1. With 4 degrees of freedom its variance is df / (df - 2) = 2, so its standard deviation is the square root of 2. A Calculate node rescales it to the mean and spread we want: NetFlow = -8 + (12 / sqrt 2) x T = -8 + 8.48528137423857 x T. This model, samples/simulation/cash-runway-stress-t.xml, has six nodes.

    <StudentT name="RawT" df="4"/>
    <Calculate name="NetFlow" expression="y[0] = -8 + 8.48528137423857 * x[0]">
      <input name="RawT"/>
    </Calculate>

Run either with a million rows:

grind --count 1000000 cash-runway-stress-mix.xml

The first ten rows of the mix with the model’s own seed, 2032 (you get exactly these values if you leave the seed alone). Three columns are shown: the balance after month 12, the low point and the ruin flag:

RowMonth 12Low pointRuin
052.852.80
1-26.5-26.51
243.838.80
335.534.90
413.913.90
566.666.60
6-27.9-27.91
769.669.60
825.725.70
97.17.10

Row 1 is a typical stress-month story. It sat at $66.4k after month 10, lost $30.8k in month 11 and $62.1k in month 12, and ended at -$26.5k. With the plain Normal, a single month of -$62k would be 4.5 standard deviations below the mean.

Do the three shapes really have the same mean and spread?

Before comparing ruin, check the claim the whole lesson rests on. Grind --node NetFlow prints the monthly flow itself, one value per row, instead of the model’s output. Here are 6,000,000 monthly flows from each model, each with its own seed:

ShapeMeanStandard errorStandard deviationSd of ten chunks of 600,000LowestHighest
Normal-8.0050.00512.00111.98 to 12.02-67.153.1
Mix 90/10-7.9940.00511.98911.95 to 12.03-124.259.4
Student-t, df 4-8.0020.00512.01011.94 to 12.08-796.3490.6

All three have the same mean and standard deviation, within sampling noise. (The t is the least steady: its fourth moment is infinite, so the standard deviation of a sample has no ordinary standard error. The ten chunks show it wobbling by a few tenths of a percent.) Look at the last two columns though. The Normal’s worst month in six million is -$67k; the mix’s is -$124k; the t’s is -$796k, and it also has a +$491k month.

Two panels showing the histogram of the monthly cash flow for the three shapes; on the linear axis the mix and the t are taller and narrower in the middle and the tails cannot be seen; on the log axis the Normal falls away steeply beyond minus 50 while the mix has a long tail to the left only and the t has long tails on both sides

On the linear axis (top) the tails don’t show at all: they are far too thin to see. The log axis (bottom) shows them. The three agree near the middle and part ways further out. The share of months beyond a few standard deviations, against the exact value for each distribution:

ShapeBelow -44 (3 sd under the mean)Below -92 (7 sd under)Above +28 (3 sd over)
Normal0.138% (exact 0.135%)0 months (exact 0.0000000001%)0.131% (exact 0.135%)
Mix 90/103.27% (exact 3.27%)0.0230% (exact 0.0231%), 1,379 months0.0089% (exact 0.0087%)
Student-t, df 40.660% (exact 0.662%)0.0292% (exact 0.0292%), 1,749 months0.655% (exact 0.662%)

A month 3 standard deviations below the mean is 24 times as common in the mix as in the Normal. The mix’s tail is almost all on the left (stress months only ever hurt), where the t is symmetric and has big good months too.

The chance of ruin

The question is the same as in lesson 2.2: how often does the balance go below zero within the year? Each model, 1,000,000 rows (years), with the model’s own seed (42, 2032 and 2033), starting from $120k:

Start $120kRuin within the yearStandard errorNumerical theory
Normal29.98%0.0529.98%
Mix 90/1025.54%0.0425.59%
Student-t, df 428.46%0.0528.47%

That is not what the usual story says. Same mean, same standard deviation, heavier tails, and ruin goes down: by 4.4 percentage points for the mix (a standard error of 0.06 on that difference) and 1.5 for the t (0.06). Fat tails are supposed to be dangerous.

Now give the founder $200k. To run that, copy the model and change every 120 + in the Balance expression to 200 + (a find-and-replace in a text editor; the file cash-runway-stress-mix.xml has twelve of them) and rerun with the same seed:

Start $200kRuin within the yearStandard errorNumerical theoryTimes the Normal
Normal0.649%0.0080.646%1
Mix 90/101.93%0.0141.93%2.97 (theory 2.99)
Student-t, df 40.883%0.0090.869%1.36 (theory 1.35)

Now it is the other way round: the mix is about three times as risky as the Normal and the t is about a third worse. The shapes did not change between the two tables. Only the starting cash did.

Chance of ruin within the year against starting cash on a log scale, for the Normal, the mix and the t: the lines cross at about 145 and 177 thousand dollars, and above that the mix and the t keep a far higher chance of ruin than the Normal

Here are all six starting values in the companion page, each a million-row run with theory beside it, simulated first and exact theory in brackets:

StartNormalMix 90/10Student-t, df 4
$100k49.01% (48.99%)40.98% (40.97%)48.36% (48.32%)
$120k29.98% (29.98%)25.54% (25.59%)28.46% (28.47%)
$150k10.27% (10.29%)10.87% (10.91%)9.39% (9.39%)
$200k0.649% (0.646%)1.93% (1.93%)0.883% (0.869%)
$250k0.0109% (0.0109%)0.251% (0.245%)0.0969% (0.0909%)
$300k0 rows of 1,000,000 (0.00005%)0.0226% (0.0236%)0.0193% (0.0185%)

Why the order flips

The model doesn’t use the mean and the standard deviation of the monthly flow to get its answer. It draws twelve whole months and sums them up, so the answer comes from the full distribution of the year, and two numbers cannot pin that down.

What the year looks like for each shape is easy to see for the mix. The number of stress months in a year is a count out of 12 with a one-in-ten chance each. The table is exact arithmetic: given k stress months the year’s change is Normal, with mean -5 x (12 - k) - 35 x k and variance 25 x (12 - k) + 405 x k, and the last column is the chance that such a year ends more than $200k down, so that a $200k start ends below zero:

Stress months in the yearShare of yearsAverage change over the year ($k)Ends more than $200k down
028.2%-60about 0
137.7%-900.001%
223.0%-1200.70%
38.5%-1509.4%
42.1%-18032%
50.38%-21058%
6 or more0.05%-240 or lowerat least 78%

Weighted by the shares, the chance that a mix year ends more than $200k down is 1.91%, which is almost the whole of the mix’s 1.93% ruin at that start (ruin can also happen in a year that recovers, as in lesson 2.2). A Normal year, in contrast, changes by -$96k on average with a standard deviation of $41.6k (twelve independent months, each with mean -8 and sd 12, which is true for all three shapes), and gets to -$200k only 2.5 standard deviations out, in 0.62% of years. A year in the mix gets there far more often because 11% of years have three or more stress months, and a year with three has an average change of -$150k.

At a $120k start the line is different. It is -$120k, only 0.6 standard deviations below the average year, so the question is about the body of the distribution, not the tail. Two years in three in the mix (28.2% + 37.7%) have at most one stress month, and those years seldom fall that far: the same arithmetic gives 0% and 12.5% for them to end below zero from $120k. Years with two stress months end below zero half the time, and years with three or more do so most of the time. Added up over the shares, 25.30% of mix years end below zero (exact), against 28.19% for the Normal’s bell, where every year is drawn from the same spread around -$96k. With the same overall variance, the mix puts less of its years right around the line: it has many mild years and a few terrible ones.

That is the general lesson, not a quirk of this example. A fat-tailed shape with the same mean and standard deviation lowers the chance of the common events and raises the chance of the rare ones. Whether ruin goes up or down depends on where the line sits. By theory, the mix has less ruin than the Normal for starting cash between about $51k and $145k, and more outside that range. The t has less between about $90k and $177k. A 30% event is a middle event and the heavy tails help; a 1% event is a tail event, and they hurt, a lot: at $250k the mix is about 22 times as risky as the Normal, from theory. The crossovers are computed by bisection on the numerical theory, not measured.

Check: do the numbers match the math?

We can make four checks here.

The monthly flow. Over 6,000,000 draws each, the means are within 0.006 of -8 (a standard error is 0.005) and the standard deviations within 0.011 of 12. Of the tail shares in the table above, all are within 2.6 standard errors of the exact value; the largest gap, -2.5, is the Normal’s share above +28, and with eight comparisons one that size is not alarming. The Normal’s expected number of months below -92 is 0.000008, matched by 0 drawn.

The ruin probabilities against numerical theory. The theory is the one from lesson 2.2: put the balance on a grid of $0.5k, move the probability one month at a time by the distribution of the month’s flow, and drop it as ruined when a month ends below zero. Only the step distribution changes between the shapes. The mix’s is a weighted sum of two Normal distributions: 0.9 x Φ((x + 5) / 5) + 0.1 x Φ((x + 35) / 20.12). The t’s is the exact t(4) distribution function, a closed form checked against numerical integration of its density (agreement to 1e-16). A grid of $0.25k agrees with $0.5k to four decimals for all three shapes at $120k and $200k, and less than 0.01% of the probability falls off the grid. Seventeen of the eighteen simulated cells are within 1.94 standard errors of theory (the other, the Normal at $300k, has no ruined row where theory expects 0.5 of a row). The six cells at $120k and $200k are within 1.6.

The comparison. The differences between shapes, 4.4 and 1.5 percentage points at $120k and 1.28 and 0.23 at $200k, are 70 and 24 standard errors at $120k and 80 and 19 at $200k, so these are not noise. The ratio at $200k, 2.97 and 1.36, matches the ratio of the two exact numbers, 2.99 and 1.35.

The models are valid and fit Free. ModelValidatorApp reports VALID for both samples: seven nodes for the mix and six for the t, against Free’s limit of 20.

What the model leaves out

Each month is still an independent draw. The mix decides stress month by stress month, as if a tenth of the calendar were drawn at random with no memory: a stressed month is as likely after a stressed month as after a calm one. A real downturn lasts. The model also looks at the balance only once a month, as in lesson 2.2, and the 90/10 split, the two components and the t’s four degrees of freedom are invented for the example; none of them was fitted to a business. And the t is symmetric, so it gives good surprises as freely as bad ones, while stress months in the mix only ever hurt.

What this gives you: a way to hold the mean and the standard deviation fixed and vary only the shape; a mix of calm and stress months built from Normal nodes and Mix (with the variance algebra to match a target spread), and a rescaled StudentT built with Calculate; the check that the monthly flow really has the same mean and spread in all three; and a result worth remembering. The mean and the standard deviation do not determine a probability. At a $120k start the heavy tails lower ruin from 30% to 25.5% (mix) or 28.5% (t), and at $200k they raise it from 0.65% to 1.9% (mix) or 0.88% (t).

Everything so far treats the stress months as scattered at random through the calendar. But bad months come in stretches: one lost customer brings the next, a downturn lasts a quarter. If the same ten percent of stress months arrived together, in one run of a few months instead of spread through the year, the monthly average and spread would not change and the chance of ruin would still move. The next lesson builds a regime that lasts, with calm and stressed periods of random length, and asks what that does to the founder’s year.