Skip to Main Content Skip to Search
Product Documentation

mbsyield - Mortgage-backed security yield given price

Syntax

[MYield, BEMBSYield] = mbsyield(Price, Settle, Maturity, IssueDate, 
GrossRate, CouponRate, Delay,  PrepaySpeed, PrepayMatrix)

Arguments

Price

Clean price for every $100 face value.

Settle

Settlement date. A serial date number or date string. Settle must be earlier than Maturity.

Maturity

Maturity date. A serial date number or date string.

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.

PrepaySpeed

(Optional) Relation of the conditional payment rate (CPR) to the benchmark model. Default = 0 (no prepayment). 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

[MYield, BEMBSYield] = mbsyield(Price, Settle, Maturity, IssueDate, GrossRate, CouponRate, Delay, PrepaySpeed, PrepayMatrix) computes a mortgage-backed security yield to maturity and the bond equivalent yield, given time information, price at settlement, and optionally, a prepayment model.

MYield is the yield to maturity of the mortgage-backed security (the mortgage yield). This yield is compounded monthly (12 times a year).

BEMBSYield is the corresponding bond equivalent yield of the mortgage-backed security. This yield is compounded semiannually (two times a year).

Examples

Example 1. Given a mortgage-backed security with the following characteristics, compute the mortgage yield and the bond equivalent yield of the security.

Price = 102;
Settle = '15-Apr-2002';
Maturity = '1 Jan 2030';
IssueDate = '1-Jan-2000';
GrossRate = 0.08125;
CouponRate = 0.075;
Delay = 14;
Speed = 100;

[MYield, BEMBSYield] = mbsyield(Price, Settle, Maturity, ... 
IssueDate, GrossRate, CouponRate, Delay,  Speed)

MYield =

    0.0715

BEMBSYield =

    0.0725

Example 2. Given a portfolio of mortgage-backed securities, compute the mortgage yields and the bond equivalent yields.

Price = 102;
Settle = datenum(['13-Feb-2000';'17-Apr-2002';'17-May-2002';... 
'13-Jan-2000']);
Maturity  = datenum('1-Jan-2030');
IssueDate = datenum('1-Jan-2000');
GrossRate = 0.08125;
CouponRate = [0.075; 0.07875; 0.0775; 0.08125];
Delay = 14;
Speed = 100;

[MYield, BEMBSYield] = mbsyield(Price, Settle, Maturity,... 
IssueDate, GrossRate, CouponRate, Delay,  Speed)

MYield =

    0.0717
    0.0751
    0.0739
    0.0779

BEMBSYield =

    0.0728
    0.0763
    0.0750
    0.0791

References

[1] PSA Uniform Practices, SF-49

See Also

mbsprice

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

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