Minsky Market Sim is an agent-based model (ABM) built to test Hyman Minsky’s Financial Instability Hypothesis (FIH): the proposition that prolonged stability is self-undermining, because rational agents accumulate leverage during calm periods, creating systemic fragility that amplifies small shocks into crises.
The simulation runs entirely from agent interactions: no exogenous crash event is programmed in. Financial instability must emerge endogenously, or not at all.
Try It
An interactive version of the simulation is available at the Minsky demo page, with a live Streamlit dashboard and a REST API playground for running headless simulations.
The full source is on GitHub.
What the Model Does
The market runs for T discrete time steps. At each step:
- Interest accrues on all outstanding agent debt
- Each active agent observes the market state and submits a buy/sell order
- Net demand is aggregated and passed to the price mechanism
- Price and fundamental value update
- Agents are marked to market; leverage is recalculated
- Agents exceeding the leverage cap receive margin calls and are force-liquidated
- Forced-sell volume is buffered into the next step, propagating the cascade
The one-step forced-sell buffer is a deliberate design choice: it creates the feedback delay that allows cascade propagation across time steps: modelling realistic broker execution lag.
Agent Types
Four heterogeneous agent types each embody a different belief about how prices work:
| Agent | Belief | Market Role |
|---|---|---|
| Fundamental | Price reverts to intrinsic value | Stabilising |
| Momentum | Trends persist | Destabilising |
| Noise | No systematic view | Liquidity / randomness |
| RL (Phase 4) | Learns from reward signal | Adaptive |
The interaction between stabilising and destabilising agents determines whether prices track fundamental value or diverge into bubbles.
The Minsky Mechanism
The feedback loop is straightforward:
Low volatility
→ agents increase leverage
→ leveraged buying pushes prices up
→ rising prices validate risk-taking
→ measured volatility stays low
→ agents increase leverage further
→ ...until a small shock triggers margin calls
→ forced selling cascades
→ crash disproportionate to the original shock
No single agent is programmed to cause a crash. The crash emerges from the interaction of individual leverage decisions, price impact, and the margin call mechanism.
Key Finding: Phase Transition
Experiment 2 sweeps the share of momentum traders from 0% to 80% across 10 independent seeds per condition.
The results show a sharp phase transition:
- At 30% momentum traders: zero crashes across all 10 seeds
- At 40%: crashes appear in 1 of 10 seeds
- At 50%: 9 of 10 seeds produce crashes
- At 60%+: complete market collapse in every single run
Peak leverage tracks momentum fraction with Spearman rank correlation rho = +0.977 (p < 10^-60): the strongest relationship found in the experiment.
This confirms the Minsky mechanism as an emergent property of agent interaction, not a programmed outcome.
Minsky Classification
Each agent is classified per-step according to their leverage:
| Category | Condition | Interpretation |
|---|---|---|
| Hedge | L < 1.5 | Income covers debt service |
| Speculative | 1.5 <= L < 3.0 | Can service interest, not principal |
| Ponzi | L >= 3.0 | Must sell assets or roll debt to survive |
The aggregate distribution across these categories is a real-time systemic risk indicator: a market shifting from predominantly Hedge to predominantly Speculative/Ponzi is the leading indicator of a Minsky moment.
Docs
- Theory: From Stability to Fragility: mathematical reference for the model (GBM, price impact, balance sheets, RL formulation)
- Simulation Report: full experiment results with statistical analysis