Skip to content
All Projects

2025

CAPM & Jensen's Alpha Quantitative Analysis

Standalone Python module

Overview

A from-scratch CAPM + Jensen's alpha analyzer that takes a ticker and benchmark, runs a 1-year regression of excess returns against the market premium, and emits the full quant readout: alpha, beta, R², Sharpe, residual standard error, and diagnostic plots. Built for fast comparative equity screens and as a reference implementation of the security characteristic line.

Highlights

  • OLS regression of excess returns vs. S&P 500 over a rolling 1-year window via statsmodels
  • Outputs Jensen's alpha, beta, R², Sharpe ratio, residual std error
  • Daily-return ingestion through yFinance with cache and clean-up of missing data
  • Residual diagnostics — normality, heteroskedasticity, autocorrelation checks
  • Reusable for portfolio screening: drop in a ticker list, get a comparison table

Stack

PythonpandasyFinancestatsmodelsMatplotlib