This project uses Medicare Part D data to analyze historical GLP-1 spending and forecast spending from 2026 through 2028.
I built it to practice Python, pandas, SQL, SQLite, and data visualization while applying concepts from actuarial Exams P and FM.
The project uses public data from CMS
The model combines annual data from 2020–2024 with full-year 2025 data. It also uses 2026 Q1 data as a starting point for the forecast.
- Filters the CMS files for GLP-1 medications
- Cleans and reshapes the data with pandas
- Stores the cleaned data in SQLite
- Uses SQL to summarize spending and claims
- Calculates historical growth rates
- Creates low, base, and high forecast scenarios
- Discounts future spending to present value
- Saves the results to CSV files and charts
I treated each GLP-1 product as a possible claim outcome. Its probability was calculated as its share of total GLP-1 claims.
I then calculated expected cost per claim using:
E[X] = sum of P(X=i) x Cost(i)
The 2025 expected cost was approximately $1,315.68 per claim.
I discounted projected spending using Treasury rates for each forecast year:
PV = Projected Spending / (1+i)^t
Medicare Part D GLP-1 gross spending increased from about $7.0 billion in 2020 to $39.3 billion in 2025.
Projected 2028 spending was:
- Low: $52.1 billion
- Base: $77.1 billion
- High: $114.8 billion
The present value of total projected spending from 2026–2028 was:
- Low: $133.0 billion
- Base: $174.7 billion
- High: $232.9 billion
Install the required packages:
python -m pip install -r requirements.txtPlace the CMS CSV files in data/raw, then run:
python main.pyThis is a scenario model, not a machine-learning prediction. The CMS figures represent gross spending and do not include manufacturer rebates. The 2026 data is preliminary, and annualizing Q1 may not capture seasonality.
- Python
- Pandas
- SQL and SQLite
- Matplotlib


