📈 Financial Market — Agent-Based Model

200 heterogeneous agents — fundamentalists, trend followers and noise traders — interact in an order book. Watch bubbles and crashes emerge spontaneously from simple behavioural rules.

🇺🇦 Українська
Price chart — price (white), fundamental value (dotted), moving average (yellow)
Order book depth — bids (green) / asks (red) around current price

Market Parameters

Market Status

● STABLE
Price100.00
Fundamental V100
P / V ratio1.000
Volatility (σ₂₀)
Bid-ask spread
Tick0

Agent Population

Fundamentalists
Trend followers
Noise traders
Price update rule:
Pt+1 = Pt · exp(λ·D̃ + σ·ε)
D̃ = excess demand/N
ε ~ N(0,1)

How the Simulation Works

200 agents each submit a buy or sell order each tick based on their type. Fundamentalists compare price to the fundamental value V: they buy when P < V(1−δ) and sell when P > V(1+δ), acting as a stabilising force. Trend followers look at the 10-tick price momentum: they buy in uptrends and sell in downtrends, amplifying movements and creating bubbles. Noise traders send random orders, injecting stochastic fluctuations. The price update is log-linear in excess demand, so the model can produce fat-tailed return distributions similar to real markets. Increase trend followers (and reduce fundamentalists) to trigger bubble-crash cycles.