# Solving the Bootstrapping equation when matrix is non-square

I am trying to construct a Zero Coupon Yield curve for US Government Bonds from market data (coupons, face values, prices, months to maturity) via Bootstrapping. However, I am not too sure how I would go about solving the equation AP = F over here if I have the Matrix A such that it isn't square. I currently have more columns (which represent the months between each coupon payment) than rows (each row represents a bond with a particular number of months to maturity). For example one of the bonds I have has a coupon issued every 3 months and the maximum months to maturity among the bonds is 360, which implies my matrix A has 120 columns. However, I have only 60 rows as I have only 60 bonds with unique months to maturity, leaving matrix A as non-square. I am sure this is easily solvable but I haven't been able to find anything on this.

Thank You

• If you're bootstrapping a US Treasury curve, how could there be bonds with coupons every month? – Helin Jul 8 '15 at 15:03
• @haginile Sorry about that. I've edited the Question. – Jojo Jul 8 '15 at 15:23
• I still don't get it. All US Treasury notes/bonds pay coupons twice a year. You should have 60 bonds such that they mature every six months in order to do this. In the absence of such bonds, you'll need to do some interpolation. – Helin Jul 8 '15 at 15:41
• Also, is there a reason why you've chosen to do bootstrapping instead of a curve fitting technique to build your zero curve? – Helin Jul 8 '15 at 15:43
• @haginile Thank you very much for the response. I am confident my query is correct, in that I am dealing solely with US Government Bonds, but I guess I could just get rid of those coupons which have a frequency of payment greater than 2. I thought this would be the simplest way for now and I realize there are many curve fitting techniques but is there one you would recommend? – Jojo Jul 8 '15 at 15:57

There are many ways to bootstrap the Treasury curve. I'll start by talking about my personal preference.

The key step is to select appropriate securities to be included in the procedure. My preference is to use 60 Treasuries that are spaced out evenly (i.e., maturing 6 months after each other). Specifically for US Treasuries, it is convenient to select Treasuries auctioned in the February and August cycles, since they span the entire maturity spectrum. So as of today, you'd start with the note maturing on 15-August-2015, then the one maturing on 15-Feb-2016, ..., 15-Feb-2045.

There will be some gaps using this scheme and you'd need to fill in the gaps. For example, there are no bonds maturing on 15-Aug-2032, but you can easily create "hypothetical bonds" using nearby issues (in this case, it would be the Feb31s and Feb36s).

Once you have created this sample set, it's trivial to create a square matrix of cash flows. Given the cashflow structure of this selection, this matrix is almost certainly invertible.

Of course, this is not the only way to do this. Another popular strategy is to use only on-the-run issues, linearly connect all the yields and assume that's the par curve, and bootstrap off of these hypothetical par bonds.

In general, bootstrapping the Treasury curve is not that great of a strategy. I'd recommend looking into spline fitting techniques for the Treasury market, given the large number of issues outstanding.

• What's your way of obtaining this data? Is this freely available somewhere? – Olorun Jul 9 '15 at 5:29
• @haginile Thank you. After rewriting my code, I find that my matrix of coupons and face values is as I would have expected (lower triangular) and is invertible. However, for some reason, I seem to be getting some negative discount factors and was wondering if you may know where this issue stems from? – Jojo Jul 9 '15 at 12:04
• @Jojo Are you using dirty prices on the right-hand side (the price vector)? – Helin Jul 9 '15 at 17:19
• @haginile Yes, I am using the formula for accrued interest here. Does this make sense? – Jojo Jul 9 '15 at 22:34

By multiplying the transpose of $A$ to both sides, you can make it to be a square matrix. That is $$A^T A P = A^T F.$$ Moreover, if $A^T A$ is invertible, you can have that $$P = \big(A^T A\big)^{-1}A^T F.$$

In general, for a non-square matrix, or a square matrix, $A$, but not invertible, the singular value decomposition approach can be employed. See the book Numerical Recipes in C.