Yield given option-adjusted spread
[MYield,BEMBSYield] = mbsoas2yield(ZeroCurve,OAS,Settle,Maturity,IssueDate,GrossRate,CouponRate,Delay,Interpolation,PrepaySpeed,PrepayMatrix)
A matrix of three columns:
Option-adjusted spreads in basis points.
Settlement date (scalar only). A serial date number or
date character vector. Date when option-adjusted spread is calculated.
Maturity date. Scalar or vector in serial date number or date character vector.
Issue date. A serial date number or date character vector.
Gross coupon rate (including fees), in decimal.
(Optional) Net coupon rate, in decimal. Default =
(Optional) Delay (in days) between payment from homeowner
and receipt by bondholder. Default =
Interpolation method. Computes the corresponding spot
rates for the bond's cash flow. Available methods are (
(Optional) Relation of the conditional payment rate (CPR)
to the benchmark model. Default = end of month's CPR. Set
(Optional) Customized prepayment matrix. A matrix of
All inputs (except
PrepayMatrix) are number
of mortgage-backed securities (
[MYield,BEMBSYield] = mbsoas2yield(ZeroCurve,OAS,Settle,Maturity,IssueDate,GrossRate,CouponRate,Delay,Interpolation,PrepaySpeed,PrepayMatrix) computes
the mortgage and bond-equivalent yields of a pass-through security.
MYield is the yield to maturity of the mortgage-backed
security (the mortgage yield). This yield is compounded monthly (12
times per year). For example:
BEMBSYield is the corresponding bond equivalent
yield of the mortgage-backed security. This yield is compounded semiannually
(two times per year). For example:
Given an option-adjusted spread, a spot curve, and a prepayment assumption, compute the theoretical yield to maturity of a mortgage pool. First, create the bonds matrix:
Bonds = [datenum('11/21/2002') 0 100 0 2 1; datenum('02/20/2003') 0 100 0 2 1; datenum('07/31/2004') 0.03 100 2 3 1; datenum('08/15/2007') 0.035 100 2 3 1; datenum('08/15/2012') 0.04875 100 2 3 1; datenum('02/15/2031') 0.05375 100 2 3 1];
Choose a settlement date.
Settle = datenum('20-Aug-2002');
Assume the following clean prices for the bonds:
Prices = [ 98.97467; 98.58044; 100.10534; 98.18054; 101.38136; 99.25411];
Use the following formula to compute spot compounding for the bonds:
SpotCompounding = 2*ones(size(Prices));
Compute the zero curve.
[ZeroRatesP, CurveDatesP] = zbtprice(Bonds, Prices, Settle); ZeroCurve = [CurveDatesP, ZeroRatesP, SpotCompounding]
ZeroCurve = 1.0e+05 * 7.3154 0.0000 0.0000 7.3163 0.0000 0.0000 7.3216 0.0000 0.0000 7.3327 0.0000 0.0000 7.3510 0.0000 0.0000 7.4185 0.0000 0.0000
Assign the following parameters:
OAS = [26.0502; 28.6348; 31.2222]; Maturity = datenum('02-Jan-2030'); IssueDate = datenum('02-Jan-2000'); GrossRate = 0.08125; CouponRate = 0.075; Delay = 14; Interpolation = 1; PrepaySpeed = [0 50 100];
Compute the mortgage yield and bond equivalent mortgage yield.
[MYield BEMBSYield] = mbsoas2yield(ZeroCurve, OAS, Settle, ... Maturity, IssueDate, GrossRate, CouponRate, Delay, ... Interpolation, PrepaySpeed)
MYield = 0.0802 0.0814 0.0828
BEMBSYield = 0.0816 0.0828 0.0842