Skip to content
All library documents

Using PCA to Reduce Commodity Forward Curve Risk Factors

Article Quant Q&A · Author: snowave

Summary

The document explains how principal component analysis (PCA) can reduce the number of risk drivers used to model a commodity forward curve. At each historical observation date, the data matrix has one row per delivery bucket and one column per date; its entries are changes in log forward prices across the selected maturities. The sample correlation matrix across buckets is then decomposed into eigenvalues and eigenvectors.

The proposed dimension reduction keeps enough leading components to meet a chosen cumulative variance target, with 95% given as an example. The answer describes a two-factor approximation in which each maturity’s standardized change is represented by loadings on two independent drivers, then maps those drivers to Brownian motions or other independent normal processes. Two factors are presented as often sufficient, not as a universal result; the required number depends on the data and variance target. The document provides a modeling explanation, not an empirical validation or detailed estimation procedure.

Key ideas

  • Rows of the historical data matrix represent delivery buckets, while columns represent observation dates.
  • PCA is applied to the sample correlation matrix of changes in log forward prices across maturities.
  • Leading eigenvectors define common curve movements, and their eigenvalues measure the variance associated with each component.
  • The number of retained factors can be selected by a cumulative explained-variance threshold.
  • A two-factor model is an approximation whose adequacy depends on the curve data and chosen threshold.

Tags

Full text
# How PCA is performed in the paper "Markov Models..."


# How PCA is performed in the paper "Markov Models..."












can anyone explain in a bit detail on how PCA is performed in the paper "Markov Models for Commodity Futures: Theory and Practice" by Leif B. G. Andersen. I'm not clear on how the high dimension matrix for Xj is constructed, specifically what is the rows and columns in the matrix? Thanks. link: http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1138782

$X_j(t)$ is defined as:

$X_j(t)=lnF(t,t+\delta_j)$, $j=$ 1 month, 2 months,...,48 months. So I think the rows are these 48 $X_j(t)$ variables, but what is the column component? By using PCA, he reduced the dimension of a 48*N matrix to 48*2, and concludes that the number of random drivers is 2.

## Answer by Gordon (score 1, accepted)

https://quant.stackexchange.com/a/27739

Generally, the PCA approach proceeds as follows.

Consider historical observation times $t_0 < t_1 < \cdots < t_K \le0$. For bucketing times $\delta_1 < \cdots \delta_n$, let $X_j(t_k) = \ln F(t_k, t_k+\delta_j)$. Moreover, let $\eta_j$, for $j=1, \ldots, n$, be a normal random variable with a sample set $\big\{X_j(t_k)-X_j(t_{k-1}\}_{k=1}^K\big\}$. Furthermore, let $\Omega = (\rho_{i, j})_{i,j=1}^n$ be the sample correlation matrix. Observe that \begin{align*} \Omega = \Sigma \Gamma\Sigma^T, \end{align*} where $\Gamma = diag(\gamma_1, \ldots, \gamma_n)$ is a diagonal matrix of eigenvalues $\gamma_i\ (i=1, \ldots, n)$, and the columns of $\Sigma = (\omega_{i, j})_{i,j=1}^n$ contains the orthonormal eigenvectors of $\Omega$; here, we assume that $\gamma_i\ge \gamma_{i+1}$, for $i=1, \ldots, n-1$. Then, in distribution, there are $n$ independenr standard normal random variables $\xi_i$, for $i=1, \ldots, n$, such that \begin{align*} \left(\! \begin{array}{c} \frac{\eta_1-\mu_1}{\sigma_1}\\ \vdots\\ \frac{\eta_n-\mu_n}{\sigma_n} \end{array} \!\right) = \left(\! \begin{array}{ccc} \omega_{1,1} & \cdots & \omega_{1, n}\\ \vdots & \ddots &\vdots\\ \omega_{n,1} & \cdots & \omega_{n, n} \end{array} \!\right) \left(\! \begin{array}{ccc} \sqrt{\gamma_1} & & \\ & \ddots & \\ & & \sqrt{\gamma_n} \end{array} \!\right) \left(\! \begin{array}{c} \xi_1\\ \vdots\\ \xi_n \end{array} \!\right). \end{align*} The PCA approach is to find the integer $p$, where $0< p \le n$, such that \begin{align*} \frac{\sum_{i=1}^p \gamma_i}{\sum_{i=1}^n \gamma_i}\ge l, \end{align*} where $l$ is a certain given level, for example, 95%. In general, $p=2$ is sufficient. We assume that $p=2$ below.

Based on PCA, we assume that \begin{align*} \left(\! \begin{array}{c} \frac{\eta_1-\mu_1}{\sigma_1}\\ \vdots\\ \frac{\eta_n-\mu_n}{\sigma_n} \end{array} \!\right) &\approx \left(\! \begin{array}{cc} \omega_{1,1} & \omega_{1, 2}\\ \vdots & \vdots\\ \omega_{n,1} & \omega_{n, 2} \end{array} \!\right) \left(\! \begin{array}{cc} \sqrt{\gamma_1} & 0 \\ 0 & \sqrt{\gamma_2} \end{array} \!\right) \left(\! \begin{array}{c} \xi_1\\ \xi_2 \end{array} \!\right) \label{pca_1} \\ &=\left(\! \begin{array}{c} \omega_{1,1}\sqrt{\gamma_1}\xi_1 + \omega_{1,2}\sqrt{\gamma_2}\xi_2\\ \vdots\\ \omega_{n,1}\sqrt{\gamma_1}\xi_1 + \omega_{n,2}\sqrt{\gamma_2}\xi_2 \end{array} \!\right). \tag{1} \end{align*}

Motivated by $(1)$, we can assume that, for $i=1, \ldots, n$, \begin{align*} d \ln F(t, t+\delta_i) &= \mu_i dt + \sigma_i^0 \left(\omega_{i, 1}\sqrt{\gamma_1} dW_t^1 + \omega_{i, 2}\sqrt{\gamma_2} dW_t^2\right)\\ &=\mu_i dt + \sigma_i^1 dW_t^1 + \sigma_i^2 dW_t^2, \end{align*} where $\{W_t^1, t\ge 0\}$ and $\{W_t^2, t\ge 0\}$ are two independent standard Brownian motions, or certain other independent normal (e.g., mean-reverting) processes.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.