← All examples
65

Canonical Grid model

Economics - Tax and redistribution policy starter

Synthetic competitive market and five equal-weight households; explicit cash-budget and welfare accounts.

Scale
Small
Source
economics-policy-starter.grid
Length
83 lines
Collection
Advanced language
Level
Intermediate
Runtime
Portable
Version
1.0.0
economics-policy-starter.grid
Get Grid
MODEL "Economics - Tax and redistribution policy starter"
DESCRIPTION "Synthetic competitive market and five equal-weight households; explicit cash-budget and welfare accounts."
VERSION "1.0.0"
AUTHOR "Grid"
TAGS "economics", "policy", "starter"

# Policy assumptions
input UnitTax = 10
  VALIDATE BETWEEN 0 AND 40 MESSAGE "Choose a unit tax from 0 to 40 for this interior-market model."
input RedistributionShare = 0.5
  VALIDATE BETWEEN 0 AND 1 MESSAGE "Choose the share of revenue returned to households, from 0 to 1."
DemandIntercept = 100
DemandSlope = 2
SupplyIntercept = 20
SupplySlope = 3
BaselineIncomes = [1000, 2000, 3000, 4000, 10000]
PovertyLine = 4000

# Market prices, annual quantity and monetary surplus
FreePrice = (DemandIntercept - SupplyIntercept) / (DemandSlope + SupplySlope)
FreeQuantity = DemandIntercept - DemandSlope * FreePrice
ProducerPrice = (DemandIntercept - SupplyIntercept - DemandSlope * UnitTax) / (DemandSlope + SupplySlope)
ConsumerPrice = ProducerPrice + UnitTax
Quantity = DemandIntercept - DemandSlope * ConsumerPrice
Revenue = UnitTax * Quantity
ConsumerSurplus = 0.5 * (DemandIntercept / DemandSlope - ConsumerPrice) * Quantity
ProducerSurplus = 0.5 * (ProducerPrice + SupplyIntercept / SupplySlope) * Quantity
BaselineSurplus = 0.5 * (DemandIntercept / DemandSlope + SupplyIntercept / SupplySlope) * FreeQuantity
DeadweightLoss = 0.5 * UnitTax * (FreeQuantity - Quantity)

# Illustrative cash allocation: all five pay equally; the four poorest receive rebates.
# This allocation is an assumption, distinct from the market price-incidence result.
TaxPaymentPerHousehold = Revenue / COLUMNS(BaselineIncomes)
RebatePerRecipient = RedistributionShare * Revenue / 4
GovernmentRetains = (1 - RedistributionShare) * Revenue
HouseholdPosition = SEQUENCE(1, COLUMNS(BaselineIncomes))
AfterPolicyIncomes = MAP(BaselineIncomes, HouseholdPosition, (income, position) => income - TaxPaymentPerHousehold + (position <= 4 THEN RebatePerRecipient ELSE 0))

# Results and independent accounting identities
output ConsumerPriceResult = ConsumerPrice
output ProducerPriceResult = ProducerPrice
output QuantityResult = Quantity
output TaxRevenue = Revenue
output WelfareLoss = DeadweightLoss
output CashIncomes = AfterPolicyIncomes
output BaselineGini = GINI(BaselineIncomes)
output PolicyGini = GINI(AfterPolicyIncomes)
output BaselinePovertyGap = FGT(BaselineIncomes, PovertyLine, 1)
output PolicyPovertyGap = FGT(AfterPolicyIncomes, PovertyLine, 1)
output RetainedRevenue = GovernmentRetains
output MarketClears = ASSERT_IDENTITY(Quantity, SupplyIntercept + SupplySlope * ProducerPrice)
output CashBudgetBalances = ASSERT_IDENTITY(SUM(AfterPolicyIncomes) + GovernmentRetains, SUM(BaselineIncomes))
output WelfareAccountBalances = ASSERT_IDENTITY(ConsumerSurplus + ProducerSurplus + Revenue + DeadweightLoss, BaselineSurplus)
output Scope = "Annual dollars and quantities in a synthetic market. Equal household tax payments and targeted rebates are assumed. Cash-income inequality excludes the allocation of deadweight loss; this is not a general-equilibrium or household causal-incidence estimate."

A1 = "Policy inputs"
A3 = "Buyer price"
B3 = ConsumerPriceResult
A4 = "Seller price"
B4 = ProducerPriceResult
A5 = "Quantity"
B5 = QuantityResult
A6 = "Revenue"
B6 = TaxRevenue
A7 = "Surplus loss"
B7 = WelfareLoss
A9 = "Cash incomes"
B9 = CashIncomes
B10 = "Baseline"
C10 = "Policy"
A11 = "Gini"
B11 = BaselineGini
C11 = PolicyGini
A12 = "Poverty gap"
B12 = BaselinePovertyGap
C12 = PolicyPovertyGap
A14 = "Market check"
B14 = MarketClears
A15 = "Budget check"
B15 = CashBudgetBalances
A16 = "Welfare check"
B16 = WelfareAccountBalances
END MODEL