Minsky Sim EconomicsSimulationAgent-Based ModellingFinanceReinforcement Learning

Minsky Market Sim: Agent-Based Financial Instability

An agent-based simulation of Minsky's Financial Instability Hypothesis: exploring how profit-maximising agents endogenously generate leverage cycles and market crashes from a stable equilibrium.

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:

  1. Interest accrues on all outstanding agent debt
  2. Each active agent observes the market state and submits a buy/sell order
  3. Net demand is aggregated and passed to the price mechanism
  4. Price and fundamental value update
  5. Agents are marked to market; leverage is recalculated
  6. Agents exceeding the leverage cap receive margin calls and are force-liquidated
  7. 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:

AgentBeliefMarket Role
FundamentalPrice reverts to intrinsic valueStabilising
MomentumTrends persistDestabilising
NoiseNo systematic viewLiquidity / randomness
RL (Phase 4)Learns from reward signalAdaptive

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:

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:

CategoryConditionInterpretation
HedgeL < 1.5Income covers debt service
Speculative1.5 <= L < 3.0Can service interest, not principal
PonziL >= 3.0Must 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

← Back to Minsky Market Sim