mbsprice2oas - Option-adjusted spread given price

Syntax

OAS = mbsprice2oas(ZeroCurve, Price, Settle, Maturity, IssueDate, 
GrossRate, CouponRate, Delay, Interpolation  PrepaySpeed, 
PrepayMatrix)

Arguments

ZeroCurve

A matrix of three columns:

  • Column 1: Serial date numbers.

  • Column 2: Spot rates with maturities corresponding to the dates in Column 1, in decimal (for example, 0.075).

  • Column 3: Compounding of the rates in Column 2. Values are 1 (annual), 2 (semiannual, 3 (three times per year), 4 (quarterly), 6 (bimonthly), 12 (monthly), and -1 (continuous).

Price

Clean price for every $100 face value of bond issue.

Settle

Settlement date (scalar only). A serial date number or date string. Date when option-adjusted spread is calculated.

Maturity

Maturity date. Scalar or vector in serial date number or date string format.

IssueDate

Issue date. A serial date number or date string.

GrossRate

Gross coupon rate (including fees), in decimal.

CouponRate

(Optional) Net coupon rate, in decimal. Default = GrossRate.

Delay

(Optional) Delay (in days) between payment from homeowner and receipt by bondholder. Default = 0 (no delay between payment and receipt.

Interpolation

Interpolation method. Computes the corresponding spot rates for the bond's cash flow. Available methods are (0) nearest, (1) linear, and (2) cubic spline. Default = 1. See interp1 for more information.

PrepaySpeed

(Optional) Relation of the conditional payment rate (CPR) to the benchmark model. Default = end of month's CPR. Set PrepaySpeed to [] if you input a customized prepayment matrix.

PrepayMatrix

(Optional) Customized prepayment matrix. A matrix of size max(TermRemaining)-by-NMBS. Missing values are padded with NaNs. Each column corresponds to a mortgage-backed security, and each row corresponds to each month after settlement.

All inputs (except PrepayMatrix) are number of mortgage-backed securities (NMBS) by 1 vectors.

Description

OAS = mbsprice2oas(ZeroCurve, Price, Settle, Maturity, IssueDate, GrossRate, CouponRate, Delay, Interpolation, PrepaySpeed, PrepayMatrix) computes the option-adjusted spread in basis points.

Examples

Calculate the option-adjusted spread of a 30-year fixed-rate mortgage with about a 28-year weighted average maturity remaining, given assumptions of 0, 50, and 100 PSA prepayments.

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 these clean prices for the bonds.

Prices =  [ 98.97467;
            98.58044;
           100.10534;
            98.18054;
           101.38136;
            99.25411];

Use this 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];

Assign parameters.

Price         = 95;
Maturity      = datenum('02-Jan-2030');
IssueDate     = datenum('02-Jan-2000');
GrossRate     = 0.08125;
CouponRate    = 0.075;
Delay         = 14;
Interpolation = 1;
PrepaySpeed   = [0; 50; 100];
Interpolation = 1;
PrepaySpeed   = [0; 50; 100];

Compute the option adjusted spread.

OAS = mbsprice2oas(ZeroCurve, Price, Settle, Maturity, ...
IssueDate, GrossRate, CouponRate, Delay, Interpolation, ... 
PrepaySpeed)

OAS =

  26.0502
  28.6348
  31.2222

See Also

mbsoas2price, mbsoas2yield, mbsyield2oas

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS