Skip to Main Content Skip to Search
Product Documentation

mbsprice - Mortgage-backed security price given yield

Syntax

[Price, AccrInt] = mbsprice(Yield, Settle, Maturity, IssueDate, 
GrossRate, CouponRate, Delay, PrepaySpeed, PrepayMatrix)

Arguments

Yield

Mortgage yield, compounded monthly (in decimal).

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

[Price, AccrInt] = mbsprice(Yield, Settle, Maturity, IssueDate, GrossRate, CouponRate, Delay, PrepaySpeed, PrepayMatrix) computes a mortgage-backed security price, given time information, mortgage yield at settlement, and optionally, a prepayment model.

All outputs are scalar values.

Price is the clean price for every $100 face value of the securities.

AccrInt is the accrued interest of the mortgage-backed securities.

Examples

Example 1. Given a mortgage-backed security with the following characteristics, compute the price and the accrued interest due on the security.

Yield = 0.0725;
Settle = datenum('15-Apr-2002');
Maturity = datenum('1 Jan 2030');
IssueDate = datenum('1-Jan-2000');
GrossRate = 0.08125;
CouponRate = 0.075;
Delay = 14;
Speed = 100;

[Price AccrInt] = mbsprice(Yield, Settle, Maturity, IssueDate,... 
GrossRate, CouponRate, Delay, Speed)

Price =

  101.3147


AccrInt =

    0.2917

Example 2. Given a portfolio of mortgage-backed securities, compute the clean prices and accrued interest.

Yield = 0.075;
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;

[Price AccrInt] = mbsprice(Yield, Settle, Maturity, IssueDate,... 
GrossRate, CouponRate, Delay, Speed)

Price =

   99.7085
  102.0678
  101.2792
  104.0175

AccrInt =

    0.2500
    0.3500
    0.3444
    0.2708

References

[1] PSA Uniform Practices, SF-49

See Also

mbsyield

  


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