preloader
image

Quant /Python/ PCA Analysis

Project goals were to build a streamlined Python pipeline to perform PCA analysis on different sectors of the yield curve and flag which sectors were cheap or expensive based on their residuals.

Project Details

In this project I engineered a Python program that ingests sector-by-sector yield-curve data from Bloomberg (via the xbbg library), preprocesses it using pandas, numpy and StandardScaler, and then applies Principal Component Analysis (PCA) from scikit-learn to extract the dominant curve movements. By reconstructing each sector’s yields from the top principal components and measuring the residuals, the system automatically identifies mispriced (cheap/expensive) segments. Optional KMeans clustering was incorporated for grouping similar residual patterns, and results are visualized with Matplotlib and Plotly for interactive analysis.

  • Date

    29 Apr, 2024
  • Categories

    Deep Learning, Machine Learning, Financial Analysis
  • Client

    Jonathan Cooper