Matrix Yield Curve Analysis

This program is quite simple. We create a R matrix of cash flows for each Treasury Bond. The diagonal elements of R are equal to par plus the final coupon for each bond. The upper off diagonal elements are the semi annual coupon payments. The PV matrix is a column matrix holding the face value, or present value, of each periods bond holding. The matrix product of R and PV is the cash flow of the bond portfolio or CF for each period.

Alternatively, inverting the R matrix and multiplying by CF yields the column matrix face value requirements ( again present value) to obtain the column matrix of CF. We can also think of the resulting PV matrix as the discounted cash flows for that period. Carefully inspect the inverse matrix and you can see the discount rate for each period on the diagonal. The period discount are slightly altered to account for periodic coupon payments; those alterations are in the upper off diagonal.

$$R = \pmatrix{ cf_{11} & cf_{12} & \ldots & cf_{11m} \cr 0 & cf_{22} & \ldots & cf_{2m} \cr 0 & 0 & \ddots & \vdots \cr 0 & 0 & \ldots & cf_{mn} \cr }\\ ,PV = \pmatrix{ p_{1} \cr p_{2} \cr \vdots \cr p_{m} \cr }$$ $$R * PV = CF$$ $$PV = R^{-1} * CF$$

Below is an interactive web page to demonstrate the usage of matrix math in cash flow analysis. This concept is a precursor for deploying Linear Programming techniques in bond optimization portfolio. Recall that in Linear Programming the matrix pivot rule is used to move from one feasible solution to an optimal solution. Inverting a matrix use the same pivot rule. We will tackle linear programming in a subsequent blog discussion. Virtually all discrete cashflow problems are solvable using matrix algebra techniques!!

Finally, note that the user can select the date Treasury yield curve (back to 1953) by using the selector at the top of the page. Why? Today's interest rates are artificially low. By skipping back to dates when money actually held value, the user can see the how much the discount factors have changed. Remember, inflation is not a tax deductible expense. With a tax rate of 20 percent, you can see the painful reality of inflation on required cash flows for meeting future financial obligations.

Enjoy and feel free to ask questions!

Select Project Type
Results

Use the buttons below for changing the cash flow scenarios.

Inverse of the above matrix