| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Fixed-Income Toolbox |
| Contents | Index |
| Learn more about Fixed-Income Toolbox |
[YearDuration, ModDuration] = mbsdurp(Price, Settle, Maturity, IssueDate, GrossRate, CouponRate, Delay, PrepaySpeed, PrepayMatrix)
| Price | Clean price for every $100 face value. |
| Settle | Settlement date. A serial date number or date string. Settle must be earlier than or equal to 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 | Net coupon rate, in decimal. Default = GrossRate. |
Delay | Delay in days. |
| PrepaySpeed | (Optional) Relation of the conditional payment rate (CPR) to the benchmark model. Default = 0. Set PrepaySpeed to [] if you input a customized prepayment matrix. |
| PrepayMatrix | (Optional) Used only when PrepaySpeed is
unspecified. Customized prepayment vector. A NaN-padded
matrix of size |
All inputs (except PrepayMatrix) are number of mortgage-backed securities (NMBS) by 1 vectors.
[YearDuration, ModDuration] = mbsdurp(Price, Settle, Maturity, IssueDate, GrossRate, CouponRate, Delay, PrepaySpeed, PrepayMatrix) computes the mortgage-backed security Macaulay (YearDuration) and modified (ModDuration) durations, given time information, price at settlement, and optionally, a prepayment model.
Note If you specify the PSA or FHA model, it will be seasoned with how long the debt has been outstanding (the loan's age). |
Given a mortgage-backed security with the following characteristics, compute the Macaulay and modified durations of the security.
Price = 101;
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;
[YearDuration, ModDuration] = mbsdurp(Price, Settle, Maturity,...
IssueDate, GrossRate, CouponRate, Delay, Speed)
YearDuration =
6.4380
ModDuration =
6.2080
[1] PSA Uniform Practices, SF-49
![]() | mbsconvy | mbsdury | ![]() |
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-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |