Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Medicare Part D GLP-1 Spending Model

About the Project

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.

Data

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.

What the Program Does

  • 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

Actuarial Concepts

Exam P: Expected Value

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.

Exam FM: Present Value

I discounted projected spending using Treasury rates for each forecast year:

PV = Projected Spending / (1+i)^t

Results

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

Charts

Historical and projected spending

2025 claim distribution

Present value by scenario

How to Run It

Install the required packages:

python -m pip install -r requirements.txt

Place the CMS CSV files in data/raw, then run:

python main.py

Limitations

This 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.

Tools Used

  • Python
  • Pandas
  • SQL and SQLite
  • Matplotlib

About

Python and SQL model forecasting Medicare Part D GLP-1 spending using actuarial expected value and present value concepts.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages