**Simulating Yield of Non-Agency CMO in Python**

This post aims to provide conceptual background for the CMO model available here.

**Introduction**

Collateralized Mortgage Obligation (CMO) is a type of mortgage-backed security that, essentially, distribute payments of interest and principal of a pool of mortgages to separate debt instruments. These instruments are split into classes (tranches) to create securities with different maturities that would be attractive to a broader range of investors than the original pool of loans.

Originally, CMOs were created out of mortgage pools guaranteed by US federal agencies or government sponsored enterprises (mostly Fannie Mae, Freddie Mac, and Ginnie Mae). If the cash flows from the pool are lower than expected (due to defaults or delinquencies) the difference is covered by the GSEs. These so-called ‘agency’ CMOs were perceived as almost free from credit risk. Although only Ginnie Mae has the explicit guarantee of the US government, everybody expects that the US government will step-in, if the GSE face any solvency issues (it actually happened in 2008).

Non-agency CMOs are created from pools of mortgages not eligible for a GSE guarantee, for example, loans that are too big (jumbo loans) or loans of lower credit quality. Hence, non-agency CMOs are subject to credit risk.

The simplest CMO structure is Sequential Pay CMO. Here, the tranches are repaid in a sequence, based on their seniority and other predefined rules. For example, let’s say our collateral is a pool of 30-year mortgages of $100,000, with a weighted average coupon of 4% (assuming no service fees) . Any interest and principal cash flows from the pool will be used to repay CMO, consisting of three classes of bonds:

` +-------+------------+-----------+`

| Class | Principal | Interest |

+-------+------------+-----------+

| A | $60,000 | 4.0% |

| B | $30,000 | 4.0% |

| C | $10,000 | 4.0% |

+-------+------------+-----------+

The cash flows from the original pool can be divided into 2 streams: principal repayments and interest payments. The interest payments will be used to pay promised interest to all classes. The principal repayments will flow to class A (until fully repaid), then to class B (until fully repaid), and finally to class C. As you probably have already realised, class A shares will be paid first (in less than 30 years). Class B will have longer maturity than class A but a shorter one than class C. This way, out of a pool of 30-year mortgages, we created securities with maturities shorter than 30 years.

The two major risks in a non-agency CMO is prepayment risk and default risk. Prepayment risk is a risk that borrowers will repay their loans earlier than expected, so interest will be paid for a shorter period. Default risk refers to the fact that borrowers may not be able to repay the loans. To diminish the negative impact of defaults CMOs are sometimes overcollateralized, i.e. the face value of the issued securities is lower than the value of the collateral. For instance, 3% overcollateralization would mean that the CMO face value is 97% of the original mortgage pool. Using the structure from the example above, the principal of 3 tranches would sum up to $97,000, not $100,000, if that structure was 3% overcollateralized.

Consider this 3% overcollateralized CMO structure:

` +----------+------------+-----------+`

| Class | Principal | Interest |

+----------+------------+-----------+

| A | $60,000 | 4.0% |

| B | $30,000 | 4.0% |

| C | $7,000 | 4.0% |

| Residual | $0 | 0% |

+----------+------------+-----------+

Here, we introduce the Residual class (also called ‘equity’ piece) that will receive any cash flows that are left after the promised interest is distributed to more senior tranches (these cash flows are commonly referred to as ‘excess spread’). Ideally, the Residual will capture all the cash flows generated by the 3% of collateral that was ‘put aside’ as an overcollateralization to support senior tranches. If the defaults exceed the size of overcollateralization, these cash flows will be used to decrease the loss to the senior tranches.

**Modelling Prepayments**

First, the Python model projects cash flows from the pool of mortgages. I estimate the prepayments with Richard and Roll (1989) prepayment model (I use the approach originally shown in [2] and [3]). Richard and Roll prepayment model assumes that prepayment rates are dependent on 4 factors:

1)**Refinancing Incentive** — which measures the difference between the current refinancing rate and the interest rate of the mortgages. The bigger the difference, the more money borrowers would save by refinancing the mortgage at a lower rate. This difference is usually calculated as a ratio of mortgage rate ‘C’ divided by refinancing rate ‘R’ or, alternatively, as ‘C’ minus ‘R’. It was observed that the relationship between ‘C’ and ‘R’ is nonlinear. Typically, an arctangent function (or some variation of it) is used to represent this relationship.

where:

2)**Seasoning Multiplier** — this factor accounts for the observation that prepayments increase as the loans get older (or ‘season’). It is calculated as:

Here, we assume that the peak of the prepayments occurs in the 30th month. This assumption similar to the one behind PSA — Public Securities Association prepayment benchmark.

3)**Month of The Year** — Richard and Roll observed that prepayments tend to occur more often in certain months of the year. It is supposed that prepayments are more frequent in the summer or early autumn than in winter. For the multiplier, I use the values estimated by Richard and Roll:

` +-------+-------------+`

| Month | Value of MM |

+-------+-------------+

| 1 | 0.94 |

| 2 | 0.76 |

| 3 | 0.74 |

| 4 | 0.95 |

| 5 | 0.98 |

| 6 | 0.92 |

| 7 | 0.98 |

| 8 | 1.10 |

| 9 | 1.18 |

| 10 | 1.22 |

| 11 | 1.23 |

| 12 | 0.98 |

+-------+-------------+

4)**Burnout Multiplier** — this factor takes into account the fact that the borrowers’ propensity to prepay mortgage decreases over time. The cause of that could be, for example, an adverse change in borrowers credit status that makes their loans not eligible for refinancing. I use the following formula to calculate the burnout multiplier:

The annualized Conditional Prepayment Rate (CPR) is a product of all four factors:

**Modelling interest rates path**

To calculate Reinvestment Incentive, we need to have the refinancing rate. I model the path of interest rates with the Cox-Ingersoll-Ross (CIR) short term interest rate process:

Parameter ‘** b**’ is a long-term mean and ‘

*a**’*is a speed of adjustment to the mean. Sigma represents standard deviation and ‘

**’ is a Brownian motion. We calibrate the model (i.e. estimate ‘**

*Wt***’ and ‘**

*a***’) to the time series of average 30-year mortgage rates in the US over the last 10 years. The frequency is monthly, and the data comes from the FRED database. In our example, we estimate the long-term mean at 3.95%, speed of adjustment (‘**

*b***’) at 0.0896, and the standard deviation at 0. 8094%. As a starting point for the simulation the model uses last available observation (as of 22 Nov 2020), 2.72%.**

*a*Estimation of these parameters is crucial for the whole prepayment model. It directly affects Refinancing Incentive which has the biggest impact on the final CPR.

**Modelling Defaults**

To account for defaults, the model employs Standard Default Assumption (SDA) developed by the Bond Market Association. SDA assumes Constant Default Rate rises from 0% to 0.6% until the 30th month and stay on this level for another 30 months. Then it gradually decreases to 0.03% by 120th month and stays at this level for the remaining period. The convention here is similar to the PSA benchmark, for example, 200% SDA would mean that the CDR peaks at 1.2% (0.6% * 200%) and the final CPR after 120th month is 0.06% (0.03% * 200%).

## Numerical Example and Monte Carlo Simulation

To calculate yield of a sample CMO, we need to estimate the cash flows from the hypothetical pool of 30-year mortgages. I assume a WAC of 3.5%, WAM of 357 months, net coupon of 3%, and a size of $300,000,000. The monthly default rates are calculated assuming 100% SDA. The lag between the default of a mortgage and recovery (time to liquidation) is 14 months. During this period any payments of principal and interest are assumed to be advanced by the servicer. The loss severity is assumed to be 20%.

For each month of the pool’s life, CPR is estimated with Richard and Roll prepayment model, which uses mortgage rates from the path generated with the CIR process. It is worth noting that the rates simulated with CIR process reverse to the long-term mean. In my sample data, the long-term mean of the mortgage rates is 3.95% which is below the WAC of 3.5%. The difference between the WAC and the current rate has a strong influence on the final prepayment rate (through Refinancing Incentive). In this case, we should not expect high prepayments, because on average, WAC will be below the mortgage rate.

Occasionally, we may want to reflect our view on future mortgage rates. In this model, we can do it by adjusting the long-term mean. In this example, I stick to the average of historical rates from my dataset.

The cash flows will be used to create sample Sequential-Pay CMO with 5 tranches (shown in order of seniority):

` +----------+------------+-----------+`

| Class | Principal | Interest |

+----------+------------+-----------+

| A | 60% | 1.0% |

| B | 15% | 2.0% |

| C | 15% | 3.5% |

| D | 3% | 5.5% |

| Residual | 0% | 0% |

+----------+------------+-----------+

The CMO will be repaid monthly and is 7% overcollateralized. The waterfall structure is as follows:

- The monthly interest payments are first distributed to tranches in order of their seniority, according to their coupon rate. Any excess interest will be paid to the Residual tranche.
- All the principal cash flows (including prepayments and recoveries) will be directed to the senior tranche (until repaid), then to the mezzanine tranche (until repaid), and finally to the junior tranche (until repaid). After the junior tranche is repaid any principal cash flows will go to the Residual tranche.
- If the cumulative defaults exceed the amount of overcollateralization, all the cash flows potentially attributable to the Residual will be paid to the junior tranche that is first to bear the losses.

The simulation process can be broken down into 5 steps:

- Generate the path of mortgage rates for 360 months (30 years)
- For each of the months model prepayment rate, default rate, and recoveries. Use them to calculate monthly principal payments, interest payments, and the amount of defaults.
- Distribute cash flows to tranches according to the waterfall rules.
- Calculate the annual
**cash flow yield**(IRR) and**WAL**of the tranches. - Repeat steps 1–4
*n*times and calculate the average of WALs and yields for each of the tranches

After 10 000 simulations (*n = 10 000*) we get the following results:

` +----------+--------+----------+`

| Class | Yield | WAL (yr) |

+----------+--------+----------+

| A | 1.00% | 8.6 |

| B | 2.00% | 17.7 |

| C | 3.50% | 19.5 |

| D | 5.45% | 19.6 |

| Residual | 12.35% | 11.6 |

+----------+--------+----------+

The yield of the Residual tranche was calculated using the amount of overcollateralization as a ‘size’ of this tranche. Counterintuitively, the WAL of Residual is shorter than the WAL of tranche D. This is caused by the specific waterfall rules — nothing is distributed to Residual after the cumulative defaults exceed the amount of overcollateralization.

We can easily perform sensitivity analysis, looking at how the yield changes for different default rates:

## References

[1] Richard, S. & Roll, R. (1989). *Prepayments on fixed-rate mortgage-backed securities*, The Journal of Portfolio Management, 15(3), 73–82

[2] Davidson, A., & M. Herskovitz, (1996). *The Mortgage-Backed Securities Workbook*, McGraw-Hill, New York.

[3] Bandic, I.,(2003). *Pricing Mortgage-backed Securities and Collateralized Mortgage Obligations, *https://www.iam.ubc.ca/wp-content/uploads/2018/10/IBandic_MSc_Essay-3.pdf

[4] Fabozzi, F., & Kothari, V. (2008). *Introduction to Securitization, *John Wiley & Sons, New Jersey.

[5] Hayre, L., & Young, R. (2004). *Guide to Mortgage-Backed Securities*, Citigroup, http://www.ams.jhu.edu/~daudley/FNMA/jhuonly/MBS%20Guide%20Hayre.pdf