Price controls
A price ceiling below the equilibrium price, or a floor above it, binds: the market does not clear, and the quantity traded is the smaller of the quantities demanded and supplied at the controlled price.
PriceControlScenario(control_type, control_price)
PriceControlType.CEILING | PriceControlType.FLOOR
A CEILING or FLOOR at control_price, from
principle_viz.core.controls.
evaluate_price_control(
demand,
supply,
scenario
)
Whether the control changes the outcome.
Quantity actually traded.
Price buyers pay: the controlled price when binding, otherwise the equilibrium price.
Price sellers receive: the controlled price when binding, otherwise the equilibrium price.
Excess demand under a ceiling (zero otherwise).
Excess supply under a floor (zero otherwise).
The uncontrolled market.
The controlled market, as a PriceControlResult:
from principle_viz import evaluate_price_control
from principle_viz.core.controls import (
PriceControlScenario,
PriceControlType,
)
scenario = PriceControlScenario(PriceControlType.CEILING, 4.0)
ceiling = evaluate_price_control(demand, supply, scenario)
print(
ceiling.is_binding,
ceiling.traded_quantity,
ceiling.shortage,
)
# True 2.0 4.0
A ceiling above the equilibrium price (for example 7) leaves is_binding
False.
MarketFigure.add_price_control(
result,
*,
gap_brace="line"
)
Draw the control line, named "Price ceiling" or "Price floor", with \(p_c\)
on the price axis. A binding control also marks \(Q_d\) and \(Q_s\) and
braces the gap: "Shortage" below a ceiling, "Surplus" above a floor.
gap_brace="axis" braces it under the quantity axis instead (see
A binding price ceiling. and A binding price floor.).
outcome_from_control() turns the result into a market outcome for the
welfare functions of Welfare (see Welfare under a price ceiling of 3.5.):
from principle_viz.welfare.surplus import (
compare_surplus,
outcome_from_control,
outcome_from_equilibrium,
)
eq = solve_equilibrium(demand, supply)
baseline = outcome_from_equilibrium(eq)
controlled = outcome_from_control(ceiling)
delta = compare_surplus(demand, supply, baseline, controlled)
fig.add_price_control(ceiling)
fig.add_welfare(delta.policy)
Under a price ceiling, the deadweight loss is the surplus of the units that are no longer traded, and part of the remaining surplus transfers from sellers to buyers.