02 — Policy experiments#

Open In Colab

The comparative-static workflow is: solve benchmark → create an independent scenario → change an exogenous assumption → solve again → compare.

%pip install -q "https://github.com/miraflor/CGE-core/releases/download/v0.8.0/cge_core-0.8.0-py3-none-any.whl"
from cge_core import StandardCGE

base = StandardCGE.example().solve()
print("benchmark BRD tariff rate:", base.value("taum", "BRD"))

Experiment A — abolish the BRD import tariff#

tariff = base.scenario("Abolish BRD tariff")
tariff.tariff("BRD", 0.0)
tariff_result = tariff.solve()
tariff_result.summary()
comparison = tariff_result.compare(base)
focus = comparison[comparison["component"].isin(["Z", "pq", "M", "E", "Xp", "Tm"])]
focus

The model does not mechanically reduce one price and stop. Imports, domestic production, household demand, factor use, tax revenue, trade, and all equilibrium prices adjust together.

Experiment B — a 10% larger capital endowment#

A separate scenario starts from the same benchmark and does not inherit the tariff experiment.

capital = base.scenario("10% more capital")
capital.endowment("CAP", change=0.10)
capital_result = capital.solve()
capital_result.compare(base).query("component in ['Z', 'F', 'pf', 'Xp']").head(20)

Level versus proportional change#

tariff("BRD", 0.05) sets a 5% rate. tariff("BRD", change=-0.50) cuts the existing rate by half. Keeping those two meanings separate prevents a common policy-simulation error.