Skip to content

Instantly share code, notes, and snippets.

View MaxGhenis's full-sized avatar

Max Ghenis MaxGhenis

View GitHub Profile
"""Generate hero image for the Madoff fact-check post.
Uses PolicyEngine design tokens (theme.css CSS variables).
See: @policyengine/ui-kit/theme.css
"""
import matplotlib.pyplot as plt
import matplotlib.font_manager as fm
from pathlib import Path
@MaxGhenis
MaxGhenis / wealth_tax_analysis.py
Created April 20, 2026 13:48
PolicyEngine-US Enhanced CPS analysis: do the wealthiest households appear among federal nonpayers? (Supporting analysis for https://maxghenis.com/blog/madoff-billionaire-nonpayers/)
"""Are the wealthiest U.S. households in the top 1% of federal income+payroll tax payers?
Uses PolicyEngine-US Enhanced CPS microdata. Net worth is imputed from the Federal
Reserve's Survey of Consumer Finances and caps at ~$190M in the 2026 file — true
centibillionaires are not represented.
"""
import numpy as np
import pandas as pd
from policyengine_us import Microsimulation
@MaxGhenis
MaxGhenis / v4_trace_walkthrough.executed.ipynb
Last active April 20, 2026 11:26
PolicyEngine v4 TRACE TRO walkthrough — real household calc + replicability chain
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MaxGhenis
MaxGhenis / trace_tro_walkthrough.ipynb
Last active April 18, 2026 15:47
PolicyEngine TRACE TRO walkthrough — executed notebook showing bundle TRO, per-simulation TRO chaining, and verifier workflow per TROv 2023/05 vocabulary (PolicyEngine/policyengine.py#237)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MaxGhenis
MaxGhenis / README.md
Last active April 11, 2026 00:21
Historical PolicyEngine US CTC reform reproduction for Nov 1 2025 package + HF snapshot

Historical PolicyEngine US CTC Reform Reproduction

This directory contains an executed notebook reproducing the reform run against the historical PolicyEngine US stack current by the end of November 1, 2025 in America/New_York.

It includes both the main credit aggregates and the federal/state/payroll tax decomposition behind the household_net_income change.

Re-execution

Run the notebook from a clean environment with:

@MaxGhenis
MaxGhenis / org_validation_2024.ipynb
Last active March 31, 2026 12:01
ORG validation for policyengine-us-data PR
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MaxGhenis
MaxGhenis / top_income_thresholds.ipynb
Created March 24, 2026 20:05
PolicyEngine 2025 top income thresholds (top 1% and 0.1% AGI minimums)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MaxGhenis
MaxGhenis / ca_wealth_tax_income_share_executed.ipynb
Created March 17, 2026 13:23
CA vs federal income tax share among high earners — PolicyEngine microsimulation showing LTCG treatment makes billionaires contribute 1.34x more to CA state income tax relative to federal
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MaxGhenis
MaxGhenis / watca_zero_tax_thresholds.ipynb
Created March 6, 2026 02:18
WATCA zero-tax threshold correction: divide by 2.333 not 1.333
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MaxGhenis
MaxGhenis / sparse_calibrator_vs_hardconcrete.ipynb
Created February 10, 2026 14:01
SparseCalibrator (L1, convex) vs HardConcrete (L0, non-convex) reweighting frontier comparison
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.