| Period | Previous p | Output q | Clearing p | Price error |
|---|
Watch prices spiral toward equilibrium.
Reshape the curves, choose a starting price, then follow the cobweb.
01
The cobweb & curve controls
DemandD(pₜ) = max(0, 120 − 4pₜ)
SupplyS(pₜ₋₁) = max(0, 30 + 2pₜ₋₁)
Use p, + − * / ^, exp, log, sqrt, abs, min, max. Supply uses the previous price.
Convergent
READY TO DRAW THE COBWEB
Press Play cobweb to draw the spiral.
Previous price pₜ₋₁23.00
Supply quantity qₜNot started
Clearing price pₜNot started
Price error |p − p*|8.00
Period 0 · current price = 23Equilibrium · p* = 15 · q* = 60|S′ / D′| = 0.50
02
Prices across periods
Completed periods: 0Latest 8 observations · CSV includes all periods
How the cobweb works & stability
1 · PREVIOUS PRICEUse the previous price pₜ₋₁
2 · HORIZONTAL → SUPPLYProduce qₜ = S(pₜ₋₁)
3 · VERTICAL → DEMANDFind pₜ = D⁻¹(qₜ)
Producers expect last period’s price to persist. Output is fixed before today’s price is known. Each completed period clears the market: D(pₜ) = S(pₜ₋₁).
Equilibrium: price 15.00, quantity 60.00.
D(p*) = S(p*)
Local ratio: below 1 → convergence; above 1 → divergence. A ratio of 1 gives a two-period cycle for the linear model.
For nonlinear curves the ratio is a local test. The path stops if the clearing price is nonunique or outside the selected price range. Model reference: QuantEcon.