GitHub profile

Technical Definitions

PCA is run on $\widetilde{\mathbf{Y}}_c$, not raw $\mathbf{Y}$.

See the Linear Algebra page for Eigenvectors, eigendecomposition, Orthogonality, and Orthonormal.

See PCA Concepts for Loadings, Principal component loadings/scores, and latent variables.

Raw Data

Matrix definition

Let $\mathbf{Y}$ be the matrix of spot yields, with:

$$ \mathbf{Y} \in \mathbb{R}^{T \times N}, \qquad \mathbf{Y} = \begin{bmatrix} y_{1,1} & y_{1,2} & \cdots & y_{1,N} \\ y_{2,1} & y_{2,2} & \cdots & y_{2,N} \\ \vdots & \vdots & \ddots & \vdots \\ y_{T,1} & y_{T,2} & \cdots & y_{T,N} \end{bmatrix} $$

Define a new matrix, say $\widetilde{\mathbf{Y}}$, with entries indexed by a shifted time variable:

$\widetilde{\mathbf{Y}} \in \mathbb{R}^{(T-12)\times N}$

$ \widetilde{y}_{s,n} = y_{s+12,n} , s = 1, \dots, T-12$

so that

$$ \widetilde{\mathbf{Y}} = \begin{bmatrix} y_{13,1} & y_{13,2} & \cdots & y_{13,N} \\ y_{14,1} & y_{14,2} & \cdots & y_{14,N} \\ \vdots & \vdots & \ddots & \vdots \\ y_{T,1} & y_{T,2} & \cdots & y_{T,N} \end{bmatrix} $$

Probablistic PCA

Loading matrix: $\mathbf{W} \in \mathbb{R}^{d \times k}$ — maps latent space to observed space

Latent variables: $\mathbf{z} \in \mathbb{R}^k$ — k-dimensional hidden vector, k≪dk≪d

Individual observations (single samples) are vectors: $$\mathbf{x} \in \mathbb{R}^d$$

$n$ samples produce a matrix $X$: $$\mathbb{R}^{n \times d}$$

The generative model is for a single observation: $$\mathbf{x} = \mathbf{W}\mathbf{z} + \boldsymbol{\mu} + \boldsymbol{\epsilon}$$

note: $x$ is used for observations AND generations in the generative model. This is because the model is saying "this is the process that generated what you observed".

??i am assuming this changes under bayesian PCA??