In general, the CMO workflow is:
Calculate underlying mortgage cash flows.
Define CMO tranches
If using a PAC or TAC CMO, calculate the principal schedule.
Calculate cash flows for each tranche.
Analyze the CMO by computing price, yield, spread of CMO cash flows.
Underlying mortgage pool pass-through cash flows are calculated
by the existing function
The CMO cash flow functions require the principal payments (including
prepayments) calculated from existing functions
principal = 10000000; coupon = 0.06; terms = 360; psa = 150; [principal_balance, monthly_payments, sched_principal_payments,... interest_payments, prepayments] = mbspassthrough(principal,... coupon, terms, terms, psa, ); principal_payments = sched_principal_payments.' + prepayments.';
After determining principal payments for the underlying mortgage
collateral, you can generate cash flows for a sequential CMO, with
or without a Z-bond, by using
For a PAC or TAC CMO, the cash flows are generated using
Define CMO tranche; for example, define a CMO with two tranches:
TranchePrincipals = [500000; 500000]; TrancheCoupons = [0.06; 0.06];
Calculate the PAC/TAC principal balance schedule based on a band of PSA speeds. For scheduled
CMOs (PAC/TAC), the CMO cash flow functions additionally take in the principal
balance schedule calculated by the CMO schedule function
terms = 360; coupon = 0.06; principal = 10000000; speed = [100 300]; [balanceSchedule, initialBalance] = cmosched(principal, coupon,... terms, terms, speed, TranchePrincipals(1));
You can reuse the output from the cash flow generation functions
to further divide the cash flows into tranches. For example, the output
cmoschedcf for a PAC tranche
can be divided into sequential tranches by passing the principal cash
flows of the PAC tranche into the
The outputs of the CMO cash flow functions are the principal and
interest cash flows, and the principal balance.
[principal_balances, principal_cashflows, interest_cashflows] = cmoschedcf(principal_payments,... TranchePrincipals, TrancheCoupons, balanceSchedule);
The outputs from the CMO functions (
cmoschedcf) are cash flows. The functions
used to analyze a CMO are based on these cash flows. To that end,
you can use
cfprice to compute prices,
yield, and spreads for the CMO cash flows. In addition, using the
following, you can calculate a weighted average life (WAL) for each
tranche in the CMO:
P is the total principal.
Pi is the principal repayment of the coupon i.
is the fraction of the principal repaid in coupon i.
ti is the time in years from the start to coupon i.