I have data from 2012 to 2016 for interest rates whose term range from 2 month to 30 years, a total of 10 Principal components can be calculated. Then I want to construct a portfolio, $$WFLY = w_1 *5Y - 7Y +w_2 * 10Y$$, this portfolio will have no exposure to the first two principle components, level and slope. How to determine the coefficients $w_1$ and $w_2$?


2 Answers 2


Let $S$ be your risk sarray, expressed in pv01, for each of your (implied) 10 instruments. You restrict the array to all zeroes except those corresponding to the 5Y, 7Y and 10Y risks, e.g. if 1Y:10Y were your instruments you would have:

$$S = [0, 0, 0, 0, w_1, 0, -1, 0, 0, w_2]^T $$

You seek the solution of $w_1$, $w_2$ such that your risk expressed in PCs is zero relative to the first two components, i.e. where $E_{1,2}$ are the two columnwise PCs:

$$ S^T E_{1,2} = [0, 0] $$

This reduces to:

$$[w_1, -1, w_2] \begin{bmatrix} e_{5y,1} & e_{5y,2} \\ e_{7y,1} & e_{7y,2} \\ e_{10y,1} & e_{10y,2} \\ \end{bmatrix} = [0, 0]$$

Taking the constant to the right to form a linear system (Ax = b) is:

$$ [w_1, w_2] \begin{bmatrix} e_{5y,1} & e_{5y,2} \\ e_{10y,1} & e_{10y,2} \\ \end{bmatrix} = [e_{7y,1}, e_{7y,2}] $$

The solution is (if it exists):

$$ [w_1, w_2] = [e_{7y,1}, e_{7y,2}] \begin{bmatrix} e_{10y,2} & -e_{5y,2} \\ -e_{10y,1} & e_{5y,1} \\ \end{bmatrix} \frac{1}{e_{5y,1}e_{10y,2}-e_{5y,2}e_{10y,1}} $$

A word of warning: these weights might be very unstable depending upon small correlation/covariance changes.

You may also be interested in How to adjust butterfly 2s5s10s swaps trade for directionality?

  • 2
    $\begingroup$ FYI You should accept answers by clicking the tick icon if you believe it to be correct and solve your problem $\endgroup$
    – Attack68
    Commented Nov 17, 2018 at 8:39

Just implement PCA and use the 3rd PC (curvature) as weights

  • $\begingroup$ Thnak you Advouk7, can you detail it ? $\endgroup$ Commented Feb 27 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.