Accounting for income inequality supports stronger climate policy
A stylized climate-economy model exploring how the distribution of climate damage and abatement costs across incomes affects the social cost of carbon and future warming.
This repository accompanies the manuscript:
Papargyri, L., & Caldeira, K. Accounting for income inequality supports stronger climate policy. Submitted to Nature Climate Change (2026).
- Overview
- Installation and Requirements
- Quick Start
- Analyzing Results
- Model Overview
- Configuration
- Output Files
- Testing
- Project Structure
- License
- Authors
This project develops a stylized climate-economy model that incorporates income inequality and progressive taxation into the calculation of the social cost of carbon. The model extends the COIN framework presented in Caldeira et al. (2023) by adding:
- Income distribution - a continuous income distribution (empirical Lorenz curve) with time-varying inequality (Gini coefficient)
- Progressive taxation - a continuous equal-utility-loss tax schedule parameterized by a single Tax Progressivity Parameter τ (code name:
tax_equity) - Income-dependent climate damage - climate damage distributed across incomes via a power-law controlled by the Climate Damage Vulnerability Exponent β (code name:
y_damage_distribution_exponent; positive values shift damage toward lower incomes; zero gives uniform damage)
The model optimizes time trajectories to maximize discounted aggregate utility, jointly optimizing the carbon pricing trajectory f(t) and the savings rate s(t) as independent control variables (free savings rate between 0 and 1). All manuscript results use this configuration.
The stored reference runs are reproduced by this code: replaying them with their stored optimal controls reproduces the stored results to round-off, and reference cases re-optimized from scratch match them (see Testing). METHODS_DETAIL.md specifies every formula, constant and numerical procedure, including parameter estimation and figure processing, precisely enough to reimplement the model and reproduce its numbers.
An interactive companion page is in interactive/coin-equality.html. Open the file in a browser; it needs no installation and works offline. It shows the results for any tax progressivity (τ) and damage vulnerability (β) on the grid of Fig. 3, and walks through one timestep of the model with the model's equations.
- Python 3.9 or higher (developed and tested with Python 3.10 and NumPy 2.2)
- pip package manager
Install all required Python packages:
pip install -r requirements.txt
Required packages include:
- numpy (2.0 or later) - numerical computations
- scipy - quadrature nodes, interpolation and root finding
- pandas - data manipulation and analysis
- matplotlib - plotting and visualization
- nlopt - nonlinear optimization
- openpyxl - Excel file generation
- pytest - the regression test suite (see Testing)
Run an optimization with a configuration file:
python scripts/run_optimization.py data/output/prod_s/9cases_s/9cases_s_gid-1_20260709_231226/9cases_s_gid-1.json 9cases_s
The first argument is the configuration file (stored inside each run directory alongside the results; the example above is the base case τ=0, β=0). The second argument names the output subfolder: results are written to data/output/prod/{category}/{run_name}_YYYYMMDD-HHMMSS/.
Any configuration value can be overridden on the command line with --section.key value, e.g. --scalar_parameters.rho 0.02 or --optimization_parameters.controls.f.n_points_final 12. The configuration written to the run directory includes the overrides.
This finds the optimal time trajectories of f(t) = log₁₀(carbon price) and s(t) = savings rate that maximize the discounted time-integral of aggregate utility.
Run a forward integration using control trajectories from an optimization result:
python scripts/run_integration.py data/output/prod/{category}/{run_name}_YYYYMMDD-HHMMSS/or with the optimized controls held constant at their initial guesses:
python scripts/run_integration.py path/to/config.json
Results are written to data/output/prod/integration/.
Simulation results are in data/output/prod_s/ and the manuscript figure scripts are in scripts/prod-s/figures/ (one folder or script per figure). The final figure PDFs are included in data/output/prod_s/figures/.
| Figure | Script | Data source |
|---|---|---|
| Fig 1 (conceptual) | scripts/prod-s/figures/fig1/plot_fig1_conceptual.py |
No simulation data (illustrative diagram) |
| Fig 2 (6 reference cases) | scripts/prod-s/figures/fig2/plot_fig2_allcases.py |
data/output/prod_s/9cases_s/ (included) |
| Fig 3 (contours) | scripts/prod-s/figures/fig3/plot_fig3_contours.py |
1,681 contour grid runs (external archive; grid values in data/si_datafiles/fig3_data.xlsx) |
| Fig 4 (ridgeline) + Extended Data Fig 3 (scatter) | scripts/prod-s/figures/fig4/plot_fig4_ridgeline.py |
Monte Carlo and parameter sweeps (external archive; run values in data/si_datafiles/fig4_data.xlsx) |
| Fig 5 (cloud) | scripts/prod-s/figures/fig5/plot_fig5_cloud.py |
outputs/audits/points_cloud_1_6_balanced.csv (included) |
| Extended Data Fig 1 (DICE reference) | scripts/prod-s/figures/plot_dice_reference_si.py |
Cached run extractions in outputs/audits/ (included) |
| Extended Data Fig 2 (growth contour) | scripts/prod-s/figures/figS/plot_si2_growth_contour.py |
data/output/prod_s/9cases_s/ (included) |
The Extended Data figure PDFs keep their file names from the scripts: Extended Data Fig 1, 2 and 3 are si_3.pdf, si_2.pdf and si_1.pdf.
Figures 1, 2 and 5 and Extended Data Figs 1 and 2 regenerate directly from this repository. Figures 3 and 4 require the full simulation outputs (see Data Availability). json/prod_s/ contains the configuration file of every run whose result appears in a figure (14,801 configs), so every simulation behind the manuscript can be re-run with scripts/run_optimization.py.
data/si_datafiles/ contains one xlsx per figure with exactly the data plotted:
| File | Contents |
|---|---|
fig2_data.xlsx |
Social cost of carbon and temperature trajectories (2025–2100) for the 6 reference cases (3 τ × 2 β) |
fig3_data.xlsx |
41 × 41 grid over (τ, β): social cost of carbon 2030 and temperature change 2100 |
fig4_data.xlsx |
Sensitivity runs behind the ridgelines (and Extended Data Fig 3 scatter): MC joint, ρ sweep, η sweep |
fig5_data.xlsx |
The plotted Monte Carlo cells (β, τ, η, ρ, r_μ, social cost of carbon, temperature) |
figs2_data.xlsx |
Extended Data Fig 2: consumption growth rate matrix (year × income rank), 2030 cross-section, ḡ and g_μ |
figs3_data.xlsx |
Extended Data Fig 1: plotted values of the three curves (DICE-2023, COIN Gini=0, COIN empirical Gini) |
In fig3_data.xlsx, fig4_data.xlsx and fig5_data.xlsx the 2030 social cost of carbon is the column carbon_price_2030_usd_per_tco2.
Included in this repository:
| Directory | Contents |
|---|---|
data/output/prod_s/9cases_s/ |
9 reference-case runs (complete outputs: results, optimization summary, distributions xlsx, run status, terminal log, and the configuration file) |
data/output/prod_s/figures/ |
Final manuscript figure PDFs |
data/si_datafiles/ |
Per-figure data files (see above) |
json/prod_s/ |
Configuration files for all 14,801 figure-used runs |
outputs/audits/ |
Fig 5 dataset and cached extractions for Extended Data Fig 1 |
The full Monte Carlo, parameter sweep, and contour grid outputs (~22 GB) are not included.
The model optimizes the time-integral of aggregate utility by choosing two control trajectories:
max ∫ e^(-ρ(t - t_start)) · U(t) · L(t) dt over t_start ≤ t ≤ t_end (2020-2420 in all manuscript runs)
evaluated with the trapezoidal rule on the annual integration time grid, where:
- ρ = pure rate of time preference
- U(t) = mean utility of the population at time t
- L(t) = population at time t
Control variables:
- f(t) = log₁₀(carbon price) in $/tCO₂
- s(t) = savings rate (fraction of output invested in capital) — optimized jointly with f(t) when the configuration has an
optimization_parameters.controls.sentry (all manuscript runs), otherwise prescribed bytime_functions.s
Each optimized control is represented by its values at a set of control times and interpolated in between (PCHIP). The optimization refines the control grid over several iterations with a derivative-free NLopt algorithm (LN_SBPLX in all manuscript runs), starting each iteration from the previous solution.
At the optimum, the carbon price chosen by the model, which equals the marginal abatement cost, is the equity-adjusted social cost of carbon of Emmerling, Groom & van der Ploeg (2026), referred to throughout as the social cost of carbon. It is the marginal welfare benefit of avoided damage divided by the marginal welfare cost of abatement, and both depend on who bears the damage (β) and who pays for abatement (τ).
- In models such as DICE, with no income distribution and no binding constraint on abatement, the social cost of carbon at the optimum likewise equals the marginal abatement cost.
- The equity-adjusted social cost of carbon differs from the social cost of carbon as typically defined. The two are equal only if abatement costs and climate damage each reduce everyone's consumption by the same fraction (τ = 0 and β = 0).
- The figures report the social cost of carbon in a year as the marginal abatement cost θ₁μ^(θ₂−1) in that year (the
marginal_abatement_costcolumn of the results CSV).
The model combines three subsystems:
-
Economic Model (Solow-Swan Growth)
- Cobb-Douglas production function
- Capital accumulation with depreciation
- Climate damage reducing output
- Income distribution (Pareto-Lorenz or Empirical Lorenz)
-
Climate Model
- Temperature change from emissions before 2020 plus a convolution of later emissions with the temperature response to an instantaneous emission pulse (median model of Ricke & Caldeira 2014)
- Industrial emissions from economic activity (scaled by emission_ratio for non-CO2 GHGs)
- Exogenous land-use emissions (Eland)
- Abatement reducing emissions
-
Utility and Inequality
- CRRA (isoelastic) utility function
- Income-dependent climate damage distribution
- Progressive taxation via continuous equal-utility-loss schedule
The model supports an empirical Lorenz curve formulation as an alternative to the Pareto-Lorenz distribution. The base empirical Lorenz curve is defined as:
L_base(F) = w₀·F^p₀ + w₁·F^p₁ + w₂·F^p₂ + w₃·F^p₃
where w₀ = (1 - w₁ - w₂ - w₃), and the parameters are:
| Parameter | Value |
|---|---|
| p₀ | 1.500036 |
| w₁ | 0.3776187268483524 |
| p₁ | 4.367440 |
| w₂ | 0.3671247620949191 |
| p₂ | 14.072005 |
| w₃ | 0.09538538350961864 |
| p₃ | 135.059674 |
The base Gini coefficient is computed as:
Gini_base = 1 - 2·[w₀/(p₀+1) + w₁/(p₁+1) + w₂/(p₂+1) + w₃/(p₃+1)]
To construct a Lorenz curve for an arbitrary Gini coefficient G, we use linear interpolation between perfect equality and the base curve:
L(F) = (1 - G/Gini_base)·F + (G/Gini_base)·L_base(F)
This formulation is controlled by the use_empirical_lorenz boolean parameter in the configuration. All manuscript runs use the empirical Lorenz curve. The Pareto-Lorenz alternative is not used for any result, and with the standard 32 quadrature points it is integrated inaccurately (its income density is singular at the top of the distribution).
The model reports an effective consumption discount rate r_consumption(t) as a derived diagnostic. The standard Ramsey rule
r = ρ + η·g
assumes a single representative agent whose consumption grows at one rate g. Because the model tracks a full income distribution (via Gauss-Legendre quadrature) whose shape evolves over time, different income groups grow at different rates and there is no unique g. The correct social discount rate for a marginal consumption increment distributed across society — under the utilitarian welfare function W = Σᵢ ωᵢ·u(cᵢ) used throughout the model — is the marginal-utility-weighted Ramsey rule:
r = ρ − d/dt ln( Σᵢ ωᵢ·u'(cᵢ) ), with CRRA u'(c) = c^(−η)
= ρ + η·( Σᵢ ωᵢ·cᵢ^(−η)·gᵢ ) / ( Σᵢ ωᵢ·cᵢ^(−η) )
where the welfare weights ωᵢ are the quadrature population shares and gᵢ = ċᵢ/cᵢ is the growth rate of income group i. The relevant growth rate is thus a marginal-utility-weighted average that gives more weight to lower-income (high marginal utility) groups.
Writing cᵢ = c̄·xᵢ (mean consumption × relative consumption), the correction relative to the representative-agent rule reduces exactly to
r − r_representative = − d/dt ln S, where S = Σᵢ ωᵢ·xᵢ^(−η) ≥ 1
is a pure consumption-inequality index. The correction is therefore zero when the distribution is static (regardless of growth) and is driven entirely by how fast inequality changes: falling inequality (the poor catching up) raises r_consumption, while rising inequality lowers it. For configurations with a meaningfully time-varying Gini this is a first-order effect on the discount rate (on the order of ~1 percentage point per year in early decades for a strongly evolving distribution).
Values are for the reference cases (η = 1.5, ρ = 2.5%/yr) unless stated.
-
Progressive financing of abatement raises the social cost of carbon: Abatement is paid for by a tax whose progressivity is set by τ. Shifting that cost toward higher incomes, where marginal utility is lower, reduces the welfare cost of each dollar of abatement, so the optimum buys more abatement. With uniform vulnerability, the 2030 social cost of carbon rises from $43/tCO₂ (flat tax) to $70 (progressive) and $144 (highly progressive).
-
Low-income vulnerability raises the social cost of carbon: When climate damage falls disproportionately on low incomes (β = 0.5), avoided damage has a higher welfare value. Under the flat tax, the 2030 social cost of carbon rises from $43 to $62/tCO₂.
-
The two effects are approximately multiplicative: Increased low-income vulnerability raises the 2030 social cost of carbon by about 45% at every tax level, and the progressive and highly progressive taxes raise it by about 64% and 236% at either vulnerability level. Combined, the 2030 social cost of carbon is $207/tCO₂ and 2100 warming is 1.89 °C, against $43 and 3.11 °C with a flat tax and uniform vulnerability.
-
The elasticity of marginal utility η has opposing effects: With ρ fixed, a higher η lowers the social cost of carbon under the flat and highly progressive taxes, but raises it under the progressive tax (τ = 0.5), where η also sets how progressive the tax is.
-
Time preference dominates the spread: Across ρ = 0–5%/yr and η = 1–2, the effective pure rate of time preference ρ is the largest source of variation in the social cost of carbon. For η > 1, greater tax progressivity raises the social cost of carbon at every discount rate.
All model parameters are specified in JSON configuration files. See data/output/prod_s/9cases_s/9cases_s_gid-1_20260709_231226/9cases_s_gid-1.json for a current example (base case: τ=0, β=0).
Key configuration sections (every field is required; keys starting with _ are comments):
scalar_parameters- Time-invariant constants (α, δ, η, ρ, τ, β, etc.)time_functions- Time-dependent functions (A(t), L(t), σ(t), θ₁(t), gini(t), emission_ratio(t), Eland(t), and s(t) when the savings rate is prescribed)integration_parameters- Time span, step size and number of quadrature pointsoptimization_parameters- Refinement iterations, evaluation budgets, NLopt algorithm and tolerances, andcontrols: one entry per optimized control,f(log₁₀ carbon price) and, for a free savings rate,s, each withinitial_guess,bounds,n_points_initialandn_points_final. Without ansentry the savings rate followstime_functions.s.
The temperature impulse-response coefficients and the 2020 climate state are fixed constants in src/constants.py.
The model uses several time-dependent exogenous functions specified in the time_functions section:
| Function | Description | Typical Type |
|---|---|---|
A |
Total factor productivity | gompertz_growth |
L |
Population | gompertz_growth |
sigma |
Carbon intensity of GDP (tCO2/$) | gompertz_growth |
theta1 |
Abatement cost coefficient ($/tCO2) | double_exponential_growth |
gini |
Background Gini index | exponential_growth |
emission_ratio |
CO2-equivalent to CO2 ratio (accounts for non-CO2 GHGs) | exponential_growth |
Eland |
Total land emissions (tCO2/yr) | exponential_growth |
emission_ratio: Converts industrial CO2 emissions to CO2-equivalent emissions by accounting for non-CO2 greenhouse gases (e.g., methane, N2O). Uses exponential decline from 1.40 in 2020 to 1.18 in 2100 (Barrage & Nordhaus 2023).
Eland: Exogenous land-use emissions that decline exponentially over time: 5.9 GtCO2/yr at t_base = 2020, declining at 2.107%/yr.
The model's key policy parameters are (manuscript name first, code name in parentheses):
-
Tax Progressivity Parameter τ (
tax_equity, float, [0, 1)) — progressivity of the tax schedule (see below) -
Climate Damage Vulnerability Exponent β (
y_damage_distribution_exponent, float) — how strongly climate damage falls on lower incomes. Named cases: β = 0 (uniform vulnerability: every person loses the same fraction of income), β = 0.5 (increased low-income vulnerability), β = 1 (equal absolute damage: every person loses the same dollar amount). -
income_dependent_aggregate_damage(boolean)- When true: aggregate damage is computed directly from the per-quantile income-weighted sum of damage fractions; richer economies experience a lower aggregate damage fraction.
- When false: the per-quantile damage array is rescaled so the aggregate damage fraction matches
Omega_base(temperature-only DICE-like scaling).
-
eta(float) — elasticity of marginal utility of consumption -
rho(float) — pure rate of time preference
The tax schedule is the equal-utility-loss formula with a progressivity-adjusted exponent:
η_eff = 1 + (tax_equity / (1 − tax_equity)) · (η − 1)
where tax_equity ∈ [0, 1) and η is the elasticity of marginal utility of consumption.
tax_equity |
η_eff |
Resulting schedule | Behavior |
|---|---|---|---|
| 0 | 1 | c = y · exp(−K) |
Flat fractional rate (DICE-like) |
| 0.5 | η | Equal-utility-loss formula | Same utility loss for all earners |
| → 1 | → ∞ | Steep progressive schedule | Tax concentrated on highest incomes |
At η = 1, η_eff = 1 for any tax_equity and the knob is degenerate — the tax is always a flat fractional rate.
Tax schedule (closed form):
- For
η_eff ≠ 1:c(F) = [y(F)^(1−η_eff) − (1−η_eff)K]^(1/(1−η_eff)) - For
η_eff = 1:c(F) = y(F) · exp(−K)
K (deltaU in the code) is solved numerically via Brent's method in log-K space, in normalized income units so the solver is stable at large η_eff and realistic income scales. The revenue constraint is ∫₀¹ [y(F) − c(F)] dF = tax_amount.
Derivation: Starting from U = c^(1−η)/(1−η) (so dc/du = c^η for equal utility loss), take a marginal tax rate r = r0·c^(η_tax). Tax amount per person is tax = r·c = r0·c^(η_tax+1). Iterating that infinitesimally to a finite revenue yields the ODE dc/dt = −r0·c^(η_tax+1), whose closed form is the schedule above with η_eff = η_tax + 1. Monotonicity dc/dy > 0 holds automatically, so no explicit iteration loop is needed.
Usage:
"scalar_parameters": { "tax_equity": 0.5, "eta": 2.0, "income_dependent_aggregate_damage": false }
Each optimization run creates a timestamped directory:
./data/output/prod/{category}/{run_name}_YYYYMMDD-HHMMSS/
├── {config file name}.json # Configuration run (with command-line overrides)
├── {run_name}_optimization_results.csv # Time series of all variables
├── {run_name}_optimization_distributions.xlsx # Per-quantile income, damage, utility, tax rates
├── {run_name}_optimization_plots.pdf # Grouped plots, whole run
├── {run_name}_optimization_plots_2025-2100.pdf # Grouped plots, 2025-2100
├── plots_full.pdf # One variable per panel
├── {run_name}_optimization_summary.csv # Optimal controls and convergence by iteration
└── terminal_output.txt # Console output
The stored reference runs in data/output/prod_s/9cases_s/ were written by the batch driver used for the manuscript, which named the files {run_name}_results.csv etc. and also wrote run_status.csv.
A regression suite checks that code changes do not change results:
pytest
It takes about a minute and compares the current code against a golden baseline (tests/baseline/):
- forward integrations replaying the nine reference runs with their stored optimal controls, also compared with the published
data/output/prod_s/9cases_s/*_results.csv - forward integrations of model options not used in the manuscript (Pareto Lorenz curve, income-dependent aggregate damage, η = 1, η < 1 with high τ, emission and consumption pulses, other time-function types)
- a short optimization (a 50-year horizon run to convergence)
- numerical kernels, the results-CSV format, loading of every configuration, and an end-to-end run of both scripts
Tolerances are relative to each variable's magnitude: 1e-12 without iterative solves, 1e-9 (the tax root-solve tolerance) with them. The terminal summary lists the largest difference per case. The baseline is regenerated (python -m tests.generate_baseline) only for a deliberate numerical change.
coin-equality/
├── README.md # This file
├── methods/ # Full methods specification
│ ├── METHODS_DETAIL.md # Implementation-level specification, for reimplementation and verification
│ └── methods.tex, methods.pdf # The same methods as mathematics (LaTeX), for the paper
├── LICENSE # MIT (code); data files CC-BY-4.0
├── requirements.txt # Python dependencies
├── src/ # Core library modules
│ ├── constants.py # Physical constants, numerical tolerances and bounds
│ ├── parameters.py # Configuration dataclasses, time functions, loading
│ ├── config_cli.py # Command-line configuration overrides
│ ├── distribution_utilities.py # Lorenz curves, quadrature grid, progressive tax
│ ├── economic_model.py # Tendencies and forward (Euler) integration
│ ├── optimization.py # Control trajectories and iterative-refinement optimization
│ ├── output.py # Output files (CSV, xlsx, summary, config)
│ └── visualization_utils.py # PDF reports
├── scripts/
│ ├── run_optimization.py # Main optimization script
│ ├── run_integration.py # Forward integration from optimization results
│ └── prod-s/ # Manuscript figure pipeline
│ ├── label_utils.py # Interactive label positioning for figures
│ └── figures/ # Publication figure scripts
│ ├── fig1/ # Fig 1: conceptual diagram
│ ├── fig2/ # Fig 2: 6 reference cases
│ ├── fig3/ # Fig 3: contour plots (τ × β)
│ ├── fig4/ # Fig 4: ridgeline + Extended Data Fig 3 scatter
│ ├── fig5/ # Fig 5: cloud scatter
│ ├── figS/ # Extended Data Fig 2: growth contour
│ └── plot_dice_reference_si.py # Extended Data Fig 1: DICE-2023 reference
├── json/prod_s/ # Configs for all 14,801 figure-used runs
│ ├── 9cases_s/ prod_contour_s/ mc/ single_param/ dice_comparison/
├── data/
│ ├── output/prod_s/
│ │ ├── 9cases_s/ # 9 reference-case runs (complete outputs)
│ │ └── figures/ # Final manuscript figure PDFs
│ └── si_datafiles/ # Per-figure data files (xlsx)
├── outputs/audits/ # Fig 5 dataset + Extended Data Fig 1 cached extractions
├── interactive/
│ └── coin-equality.html # Interactive companion page: open it in a browser (works offline)
├── parameter_estimation/ # Offline data-fitting for model constants
└── tests/ # Regression suite: cases, golden baseline, tests
MIT License
Copyright (c) 2026 Lamprini Papargyri and Ken Caldeira
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Code is licensed under the MIT License (above; see also LICENSE). Data files (data/, outputs/) are licensed under CC-BY-4.0 — please cite the paper when reusing them.
Lamprini Papargyri and Ken Caldeira