# Lecture 9: Principal Component Analysis in Finance

Source: https://www.youtube.com/watch?v=CechARGinR4
Recap page: https://rapidrecap.app/video/CechARGinR4
Generated: 2025-12-03T16:12:53.335+00:00

---
## Quick Overview

Principal Component Analysis (PCA) is a core, efficient, and fast unsupervised learning tool in finance, primarily used for dimensionality reduction and understanding correlation structures in high-dimensional, highly correlated data like US Treasury yields, where it decomposes yield changes into persistent, interpretable factors like level, slope, and curvature.

**Key Points:**
- PCA is an absolutely core data science tool in finance, essential for learning by doing through projects, and helpful for job interviews.
- PCA functions as an unsupervised learning method for clustering and dimensionality reduction, unlike regression, it implies no causality, treating all dimensions equally.
- In the US bond market example, PCA decomposed highly correlated yield changes into three persistent factors: PC1 (Level, explaining 85-90% of variance), PC2 (Slope, 5-10% of variance), and PC3 (Curvature).
- A critical step in PCA application is ensuring the data is mean-centered (demeaned) because PCA rotates around the origin (0,0), which is often overlooked when applying it to positive data like stock prices.
- When using PCA, analyzing eigenvalues (variance explained) is crucial; one seeks eigenvalues that are distinct, ideally separated by an order of magnitude, indicating robust factors.
- A key use case in finance is constructing uncorrelated portfolios (e.g., PC2 and PC3 portfolios) based on factor loadings to isolate specific dynamics (like slope or curvature) that can then be traded, often requiring leverage due to low individual factor variance.
- The decision to normalize variance is context-dependent: normalize when units are arbitrary (like temperature vs. pressure) but avoid normalization when units are inherently comparable and meaningful (like quiz grades or comparable yield changes).

**Context:** The lecture features Stefan Andreev, a PhD in Chemical Physics from Harvard who has worked at Morgan Stanley and Citadel, discussing Principal Component Analysis (PCA) as a guest speaker. The context centers on applying PCA within quantitative finance, emphasizing its utility for understanding complex, high-dimensional datasets, particularly time series data common in financial markets like the US bond market.

## Detailed Analysis

Stefan Andreev establishes PCA as a fundamental, fast, and scalable linear algebra tool for unsupervised learning, crucial for dimensionality reduction in finance. He stresses that practical application via projects is essential for learning. He illustrates PCA using toy models to show it identifies the true underlying dimensionality by rotating the coordinate system to align with the directions of maximum variance (eigenvectors) and quantifies importance via variance (eigenvalues). Andreev distinguishes PCA from regression by noting PCA minimizes perpendicular distance and implies no causality, making it suitable for understanding correlation structure rather than modeling dependent variables. Robustness to noise is highlighted, noting that PCA output becomes worthless if the data lacks a dominant direction, which is identified by examining eigenvalues; distinct eigenvalues indicate robust factors. In finance, PCA is applied to time series, often focusing on returns rather than levels, requiring careful hyperparameter choices regarding history length and observation weighting. The main deep dive is the application to the US Treasury yield curve, where daily yield changes are highly correlated. PCA decomposes these changes into three main persistent factors: PC1 (Level, explaining ~90% of variance), PC2 (Slope), and PC3 (Curvature). Andreev explains that these factors translate directly into tradeable, uncorrelated portfolios (curves), allowing investors to isolate and model specific market dynamics while hedging out the dominant level movement (PC1), often requiring significant leverage due to the lower variance explained by PC2 and PC3.

### PCA Fundamentals

- Core data science tool in finance
- Unsupervised learning for dimensionality reduction
- Calculation relies on linear algebra, making it fast and scalable
- Requires data centering (demeaning) as it rotates around the origin

### Interpreting PCA Output

- Eigenvectors define directions of data concentration (principal components)
- Eigenvalues measure variance along those directions and indicate factor importance
- Analyzing eigenvalue plots, especially in log space, reveals factor robustness; distinct, non-crossing lines are desired

### PCA vs. Regression

- PCA minimizes perpendicular distance to the line and implies no causality
- Regression minimizes distance along the independent variable axis, implying dependency

### Application in Finance

- PCA is often applied to time series like historical returns
- Key hyperparameters include history length and observation weighting
- Normalization choice depends on whether units are comparable (e.g., yield changes) or arbitrary

### US Bond Market Example

- Decomposes highly correlated yield changes into Level (PC1), Slope (PC2), and Curvature (PC3) factors
- PC1 explains the vast majority of variance (~90%) and represents overall rate movement

### Trading Factor Portfolios

- Constructing portfolios based on PC2 and PC3 allows isolation of specific dynamics uncorrelated to PC1
- These factor portfolios require leverage to achieve meaningful daily volatility compared to PC1, but offer orthogonal trading opportunities

