[R-SIG-Finance] How to use PCA output to hedge level and slope

amit jain buddyhi at indiatimes.com
Sun Aug 28 03:40:02 CEST 2011


Hi everyone,

I want to hedge level and slope of a treasury curve. I found the pca loadings using prcomp function of R. I used 2yr, 5yr, 7yr, 10yr and 30yr points with 3m data and found the pca loadings. Then i reduced these 5 PC factors to just 3 and obtained the new loadings and rotation. Now i am unclear on how to use these PCA loadings to come up with hedging ratios for level and slope specifically in a butterfly for eg 2yr, 5yr and 7yr curve, how do i find the pca weighted risk weightings for the butterfly.  I used following code:

 mypca = prcomp(YC, scale = T)
 print(mypca)
 summary(mypca)
 plot(mypca)
 mypcaX = mypca$x %*% t(mypca$rotation)

where YC has last 3 months of generic rates data.
Thanks in advance for your help. If you need any more clarification to help me better, please let me know i would be happy to provide more details of what i did and tried.

Thanks
Amit



More information about the R-SIG-Finance mailing list