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

expand all

Determine a Mortgage-Backed Security Yield Given the Price

This example shows how to determine the mortgage-backed security yield, given a mortgage-backed security with the following characteristics.

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

Determine Multiple Mortgage-Backed Securities Yields Given the Price

This example shows how to determine multiple mortgage-backed securities yields, given a portfolio of mortgage-backed securities with the following characteristics.

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

Was this topic helpful?