# Can PCA be used to transform a ladder of interest rate risk?

The context

For traders/market makers on interest rate swaps desks, it is essential to have a model that transforms risk from its most complex representation (i.e. a ladder of every tenor) into a less complex one (i.e. a reduced ladder with the main tenors).

Example: consider the base risk ladder $$S$$ which displays your risk in every tenor: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 20, 25, 30, 35, 40, 45, 50}. Traders always need to know their exposure to the main curves, e.g. 2s5s, 5s10s, and 10s30s. So it is essential to find a model that transforms $$S$$ into a reduced representation, $$S'$$, which displays the portfolio's exposure to e.g. {1, 2, 5, 10, 30}.

(This transformation displays our exposure to 2s5s, 5s10s, and 10s30s.)

Existing solutions

Different traders and risk managers have different methods for doing this. A few that people commonly use are

• Jacobian matrix transformations

• OLS regressions

These approaches are documented online if you look hard enough.

My question

Can we use PCA to create the transformation $$S\rightarrow S'$$, outlined above?

I've been playing around with PCA for the first time lately, and all of the online resources demonstrate how the first 3 principal components can be used to explain the following in terms of interest rate risk and market moves:

1. PC1: Outright exposures (parallel curve moves)

2. PC2: Curve exposures (steepening and flattening curve moves e.g. 5s10s, 10s30s)

3. PC3: Fly exposures (moves in things like 2s5s10s, 5s7s10s, 10s20s30s)

The ability of PCA to explain these different types of exposures makes me think that it must be possible to use it to transform the risk as we have demonstrated above. The transformations described above are done precisely to model broad curve and fly exposure, as PC2 and PC3 explain.

However: I'm struggling to find anything online, and I'm a little rusty on my maths and am struggling to figure it out for myself.

I'm sure that the following principle components could be used to transform the risk ladder in the following ways:

1. PC2: $$S\rightarrow S_\text{curves}$$ = {1, 2, 5, 10, 30, 50}

2. PC3: $$S\rightarrow S_\text{flies}$$ = {1, 2, 5, 7, 10, 20, 30, 40, 50}

Ideally your answer would have a mathematical and logical explanation. Even better would include some code. Would be great to see some references or resources too. Thanks!

• You can read my book if you like "Pricing and Trading Interest Rate Derivatives". In it I describe all the techniques you want, and also comment that I greatly dislike the PCA approach. I have tried to adopt it numerous times and it has significant failings for market-makers, in my opinion. And it is outperformed by other approaches.
– Attack68
Commented Sep 20, 2023 at 18:40
• Also you own old question seems to state the equation: quant.stackexchange.com/questions/61909/… ??
– Attack68
Commented Sep 20, 2023 at 18:52
• @Attack68 ha! what time can do to memory I suppose. Wow! I've actually read your book which introduced me to the Jacobian method (which I use for bond risk management btw, so thanks!), but I don't remember the PCA method from the book, so will have to revisit! Probably where I got that formula from in my old question... Commented Sep 20, 2023 at 18:55
• @Attack68 one thing I’m struggling to conceptualise is how the transformation is reflected as tenors. Say I have 30 tenors on my ladder, and transform this using 3 PCs, so that $\tilde{S} = E^TS$ (to use the book’s notation) has shape 3x1. What would that actually mean in terms of risk? Would it be showing me 2s5s, 5s10s, and 10s30s? I’m guessing that it depends circumstantially on what each PC shows. Cont Commented Sep 21, 2023 at 9:40
• And how then can one transform the ladder into fly risk across the curve. Say fly risk is observed in 7y, 15y, 20y, 40y tenors. How many PCs to include then? If you include 4, it would surely not naturally lean towards those tenors. Anyway, kind of confused Commented Sep 21, 2023 at 9:42

PCA is a mathematical transformation from a certain basis representation, i.e. 1y,2y,3y,4y, into another representation PC1, PC2, PC3 and PC4. In its raw form it is not a dimension reduction procedure. It becomes dimension reduction when you arbitrarily discard some PCs, such as PC4, where the framework is designed to capture the most explanatory variance in PC1 with decreasing amounts in PC2, PC3 etc. So the dimensions you reduce are designed to lose only the smallest amount of explanatory variance.

Since it is based on historical data and covariance matrix the PCs are not always intuitive objects. Certainly they do not provide the level of granularity to isolote a 20s25s30s position, and this is not their purpose.

Custom Risk Models

For what is it is worth I use custom built Jacobian transformations to isolate these types of butterflies or spreads. The advantage of the framework and by doing it this way is that it does not lose information (you do not reduce diomensions) and the PnL Explain that you can produce is exact and intuitive.

The only aspect to be aware of in this framework is that if you have, for example,

5y,6y,7y,8y,9y,10y -> 5y, 5s10s, 5s7s10s, 5s6s7s, 7s8s9s, 8s9s10s,

That these positions are not uncorrelated. They are pretty close but not exactly. For example 5s6s7s has 5% correlation with 5s10s, if you have a large position in 5s6s7s this can add up to a non-negligible effect from the movemnet of 5s10s. This is why I usually overlay this method with VaR minimisation techiniques which also use a correlation matrix and can assess this dynamically.

The other option is to be really refined and tweak the 5s6s7s instrument to embed an ofsetting amount of 5s10s into it, thereby creating a custom instrument. Call it the (5s6s7s 5s10s hedged). A few years ago I would have probably have built this into my framework, if I had thought of it, but now I'm so used to the framework I have established I don't think it would add a huge amount of value to me personally.

Simplified Portfolio

In "Pricing and Trading Interest Rate Derivatives" I also describe a technique for dimension reduction called the simplified portfolio representation. In this procedure you choose a subset of your risk instruments, sucha as 2y, 5y, 10y, 30y and solve a multi-instrument VaR minimisation problem. What this reflects is, "if my portoflio can be hedged with only 2y 5y 10y and 30y which trades would best hedge the entirety of my portfolio?"

• That’s great, thanks. With Jacobians, I like to take a layered approach using 3 different Jacobians constructed with 3 different regressions, so one will be like (1, 2, 5, 30), the next would add in (7, 20, 50), and the final one would add in (15, 25, 40). That way you can work your way down visually to observe how your third layer is trading in terms of e.g. 5s10s. I don’t go as granular as 1y gaps tho with the Jacobians Commented Sep 21, 2023 at 11:51