Recent Posts

Sunday, December 2, 2018

Principal Component Analysis And Hedge Ratios

Chart: First PCA Factor

Principal Component Analysis (PCA) has two main applications in my area of interest: yield curve analysis, and in the creation of composite indicators. This article explains how PCA analysis is used in fixed income, in particular from a hedging perspective.

This article does not attempt to explain what PCA analysis is; I am in the middle of writing a primer on the topic. Instead, we are looking at the final result, which justifies why we are interested in PCA analysis in the first place. I had little need to use PCA analysis in my days in academia; I knew what it was, but not enough exposure to make it easy to explain the technical details. However, from the perspective of someone in industry, all you need to really know is how to call the PCA function in your computer language of choice. For example, to generate the analysis in this article, I just needed to pass four time series (as a matrix) into the R language prcomp function.


We use PCA analysis to generate the "typical" movements of a yield curve. The output that I am showing was generated by using the Treasury yield data from the Federal Reserve's H.15 report from 1995-2000. (I chose that period to get PCA factors for a curve that is well away from the zero bound; and I also wanted to avoid the period where the 30-year Treasury yield was discontinued.) The analysis is on typical changes in the yield curve; I converted the data to monthly, and looked at monthly yield changes, for the 2-, 5-, 10-, and 30-year tenors.

The chart above shows the first PCA factor. It represents the most likely type of curve movement. The scaling is not important, rather the relative magnitude of the components. The factor loadings I found were (rounded to 3 places):
  • 2-year: 0.528;
  • 5-year: 0.555;
  • 10-year: 0.499;
  • 30-year: 0.404.
These are the typical relative movements of the yield curve. What we see is that if there is a positive shock, the 5-year would be expected to rise by 0.555 times the shock magnitude, while the 30-year will only rise 0.404 times the shock magnitude. For example, if the 5-year rises by 55.5 basis points, the 30-year would only rise by 40.4 basis points, which implies a flattening of about 15 basis points.

This prediction fits the usual empirical story about directionality: the curve flattens in a bear market, and steepens in a rally. I will return to the practical implications of this later.

Since I chose four time series, there are 4 PCA factors. The first three have standard interpretations: level, slope, and curvature (butterfly). The next two factors are shown below.
Chart: Second PCA Factor

The second PCA factor shows a monotonic decline in the values. For example, for a unit shock on this factor, the 2-year rises by 0.64 units, and the 30-year falls by -0.65 units. That is, this is a flattening movement.
Chart: Third PCA Factor

This is the third factor, and it has the expected butterfly shape. The 2- and 30-year wings rise, while the 5- and 10-year belly fall.

Invariance to Added Tenors

One thing to note is that if we add new tenors to the analysis, the shape of the initial factors is largely unchanged. 
Chart: First PCA factor, With 6 Tenors

The chart above shows the first PCA factor if we add in the 7-year and 20-year tenors to the analysis. Since there are six tenors, there are six PCA factors. However, the shape of the first is unchanged. Although the magnitudes of the vector values are different, what matters are the ratios of the values, and those are unchanged.

The initial factors explain almost all the variation of the curve. The statistical summary provided by R tells us that the first PCA factor explains 96.8% of the variance, and the first two explain 99.6% of the variance.

Application to Hedging

Since the most likely movement in the curve is going to resemble the first PCA factor, we can see that trades that are DV01-neutral are likely going to end up with a directional component. For example, if we have a 5-/30-year flattener put on (long 30-year, short 5-year), we implicitly have a bearish position, even if the trade is DV01 neutral. This is because if there is a downward shock in yields following the first PCA factor, the five year will rally more (in yield terms) than the 30-year, and the flattener would lose money.

One would hope that risk management teams would take this embedded directionality into account when assessing duration risk. Certainly most fixed income portfolio managers are aware of this, and will take it into account during risk assessment.

Where PCA analysis is used the most is during the analysis of butterfly trades. The objective of butterfly trades is to isolate one bond bond versus the curve. Since we are just focusing on one mis-priced bond, we do not want to have any directional risk. We can then use PCA weightings to eliminate the implicit directionality in the trade.

Concluding Remarks

Principal Component Analysis provides a rigorous mechanism to asses the embedded directionality of relative value positions.

This article was brief; there are two followup areas of interest (that I hope to cover soon).

  1. A primer on the mathematics of PCA analysis.
  2. The effect of zero interest rate policy (ZIRP) on PCA factors.

(c) Brian Romanchuk 2018


  1. Readers who need to understand principal components might benefit from this youtube video on eigen vectors which underpins PCA,

  2. "all you need to really know is how to call the PCA function in your computer language of choice"

    funny, I have taken multiple econometrics & financial time series classes and the professors spent all their time with biasedness, consistency, asymptotic theory and other mathematical statistics jargon and never once we learned practical things such as estimating some of these techniques on a computer

    1. And all those details will offer what practical benefit for directional risk assessment in fixed income portfolios?

  3. This comment has been removed by a blog administrator.

  4. So a 4:3:1 schatz bobl bund butterfly done with futures (quantity ratios are calculated based on DV01 of respective cheapest-to–deliver securities) will be anyway affected by directional risk e slope. The same goes for a non-directional steepener/flattener. Is that correct?


    1. Yes. The idea is that you are hedging a shock that matches the first PCA factor, not a parallel shock (which is what being DV01 flat hedges against).

  5. This comment has been removed by a blog administrator.


Note: Posts are manually moderated, with a varying delay. Some disappear.

The comment section here is largely dead. My Substack or Twitter are better places to have a conversation.

Given that this is largely a backup way to reach me, I am going to reject posts that annoy me. Please post lengthy essays elsewhere.