Introduction

The inspiration for Bond Lab arose from the recommendation on the part of the Structured Finance Industry Group to provide mortgage and consumer asset-backed bond payment rules, commonly referred to as the waterfall, in an open source programming language. Although well intended, the recommendation suffered from the following problems:

Bond Lab is an example of open source software designed for the analysis of fixed-income securities with an emphasis on structured securities. It defines the classes, superclasses, structural elements, and methods required to create a structured security before the investor can begin to perform cash flow, relative value, and risk analysis.

The examples used in this book assume securities whose factor or origination date occurred sometime during January 2013, a random choice on my part. Swap rate data, taken from the Federal Reserve's website, is available for the month. The examples are:

Bond ID Bond Type Structure
bondlab5 Bond 5-year semi-annual coupon
bondlab10 Bond 10-year semi-annual coupon
bondlabMBS4 Mortgage 30-year pass-through
bondlabMBS5 Mortgage 30-year pass-through
BondLabMBSIO Mortgage IO strip
BondLabMBSPO Mortgage PO strip
BondLabPAC1 PAC REMIC tranche
BondLabCMP1 companion REMIC tranche
BondLabSEQ1 sequential REMIC tranche
BondLabSEQ2 sequential REMIC tranche
BondLabSEQ3 sequential REMIC tranche
BondLabSEQ4 sequentialIO REMIC tranche
BondLabPAC2 PAC REMIC tranche
BondLabFloater floater REMIC tranche
BondLabInverse inverse REMIC tranche
BondLabPACZ PAC REMIC tranche
BondLabCMP_Z companion REMIC tranche
BondLabZ accrual bond REMIC tranche

Finally, the Bond Lab structuring tool allows the reader to create any structure by defining the REMIC, its tranches, collateral group, and payment waterfall. Thus, the reader may extend her analysis and investigation in any direction she chooses. The Companion to Investing in MBS (companion2IMBS) provides a gentle introduction to BondLab, calling much of the functionality presented herein.