When the Buildout BreaksPaperDashboardOpen sourceDocsSourceGitHubDownload .zip

Read the docsThe paperBrowse the sourceDownload .zip

When the Buildout Breaks

How likely is an AI investment bust, and how bad would it be? Models, simulations, a live-data dashboard and the working paper behind them.

Not investment advice. Everything here is model output for analysis, resting on stated judgment calls. It is not a forecast or a recommendation. The paper, the code and the documentation were written by Claude (Anthropic) at the direction of Yassin Khalil.

What it answers

Two events are tracked separately:

Four independent estimates (a revenue simulation, history, market prices, warning indicators) are pooled into one set of odds. Two damage models (a 12-sector contagion network and a weekly agent-based model of firms, lenders and policy) then show who loses what if a bust happens.

Published results (inputs as of 5 October 2026)

Cumulative odds, median (10th–90th percentile) End-2027 End-2028 End-2029
Market crash 37% (29–44%) 52% (42–61%) 58% (48–66%)
Economic bust 17% (12–23%) 30% (21–39%) 40% (29–50%)

Weighted by those odds: expected credit losses of $23–57B depending on the model; a neocloud fails in 22–32% of futures; no bank fails in any simulated future. These come from the pooled odds (ai_bust_probability.py), the sector network (Model D) and the agent-based model (Model F). Read the limitations before quoting any number, in particular that the odds hinge on whether credit markets (which imply about 11%) are right.

Quick start

Python 3.12, about 2 CPU cores.

git clone https://github.com/YassinKkhalil4/when-the-buildout-breaks.git && cd when-the-buildout-breaks
bash setup.sh                      # venv, dependencies, the 10 unit tests, an offline end-to-end run
export AI_BUST_UA="Your Name your@email"   # SEC requires a descriptive User-Agent
python ai_bust_live.py refresh --live      # pull live data and recompute (about 90 s)
bash start.sh                      # dashboard on 127.0.0.1:8000
python build_site.py               # build the paper page, served at /paper

The dashboard has no login. It binds to 127.0.0.1 only; view it over an SSH tunnel (ssh -L 8000:127.0.0.1:8000 user@server). To publish it, put a reverse proxy in front that allows only GET and HEAD and blocks /api/refresh (see deploy/Caddyfile.example).

Reproducing the results

Command What it does Time on 2 vCPUs
python ai_bust_probability.py --fast the odds only (writes probability_results_fast.json) about 1.5 min
python ai_bust_probability.py the full run: odds, sensitivities, expected damage (rewrites probability_results.json) about 9 min
python run_abm_final.py 24 Model F ablation, cliff curve and knockout tests (rewrites abm_final_*.json) about 23 min
python ai_bust_probability.py --calibrate-mapping rebuilds the shock-to-outcome mapping (rewrites abm_shock_to_realised.json) about 1 min
python -m unittest test_ai_bust_live the unit tests under 1 s

Seeds are fixed. Parts I and III reproduce the published odds exactly; Model F shows small run-to-run differences even with fixed seeds (about $0.2B on a $22.6B expected loss in the re-run), so treat small Model F differences as noise. Back up a result file before re-running the command that overwrites it. The 6 October 2026 reproduction is in probability_results_rerun_20261006.json and Section 18 of the paper.

What is in the repository

Path Contents
ai_bust_probability.py Part I (Model G, history, market, indicators, pooling) and Part III (expected damage)
ai_bust_models.py Models A–E: revenue gap, depreciation, neocloud solvency, contagion network (Model D), macro transmission
ai_bust_abm.py Model F, the weekly agent-based model with nine switchable mechanisms
run_abm_final.py Model F ablation, cliff and knockout runs
ai_bust_live.py, dashboard.html, manual_inputs.json Live-data pipeline, API and dashboard
build_site.py, working_paper.md Builds the paper as a web page
*.json Published results; fixtures/ the recorded snapshot of the paper's inputs
docs/ Full specification (equations, algorithms, parameters), the paper, data sources
deploy/ Example Caddy and systemd files

Documentation: overview and simulation register · Models A–E · Part I and Model G · Model F · live pipeline · data and assumptions · the paper

Known limitations

Credit and citation

If you use the code, the results or the text, please credit the work.

Khalil, Y. (2026). When the Buildout Breaks: How Likely Is an AI Bust, and How Bad Would It Be? Working paper, Edition 2. Written by Claude (Anthropic).

@techreport{khalil2026buildout,
  author      = {Khalil, Yassin},
  title       = {When the Buildout Breaks: How Likely Is an AI Bust, and How Bad Would It Be?},
  year        = {2026},
  type        = {Working paper, Edition 2},
  note        = {Written by Claude (Anthropic). Code and results: see repository}
}

GitHub also reads CITATION.cff ("Cite this repository").

License

Contributing

See CONTRIBUTING.md. Please do not commit the live_history.db database, credentials or server addresses.