mbswal
Weighted average life of mortgage pool
Syntax
Description
specifies options using one or more optional arguments in addition to the input
arguments in the previous syntax. WAL
= mbswal(___CouponRate
,Delay
,PrepaySpeed
,PrepayMatrix
)
Examples
Determine the Weighted Average Life of a Mortgage Pool
This example shows how to determine the weighted average life of a mortgage pool, given a pass-through security with the following characteristics.
Settle = datetime(2002,4,15); Maturity = datetime(2030,1,1); IssueDate = datetime(2000,1,1); GrossRate = 0.08125; CouponRate = 0.075; Delay = 14; Speed = 100; WAL = mbswal(Settle, Maturity, IssueDate, GrossRate, ... CouponRate, Delay, Speed)
WAL = 10.5477
Input Arguments
Settle
— Settlement date
datetime array | string array | date character vector
Settlement date, specified as an
NMBS
-by-1
vector using a datetime
array, string array, or date character vectors. Settle
must be earlier than Maturity
.
To support existing code, mbswal
also
accepts serial date numbers as inputs, but they are not recommended.
Maturity
— Maturity date
datetime array | string array | date character vector
Maturity date, specified as an
NMBS
-by-1
vector using a datetime
array, string array, or date character vectors.
To support existing code, mbswal
also
accepts serial date numbers as inputs, but they are not recommended.
IssueDate
— Issue date
datetime array | string array | date character vector
Issue date, specified as an
NMBS
-by-1
vector using a datetime
array, string array, or date character vectors.
To support existing code, mbswal
also
accepts serial date numbers as inputs, but they are not recommended.
GrossRate
— Gross coupon rate (including fees)
vector of decimal values
Gross coupon rate (including fees), specified as an
NMBS
-by-1
vector of decimal
values.
Data Types: double
CouponRate
— Net coupon rate
GrossRate
(default) | vector of decimal values
(Optional) Net coupon rate, specified as an
NMBS
-by-1
vector of decimal
values.
Data Types: double
Delay
— Delay (in days) between payment from homeowner and receipt by bondholder
0
(no delay between payment and receipt) (default) | vector
(Optional) Delay (in days) between payment from homeowner and receipt by
bondholder, specified as an NMBS
-by-1
vector.
Data Types: double
PrepaySpeed
— Speed relative to PSA standard
0
(no prepayment) (default) | vector
(Optional) Speed relative to PSA standard, specified as an
NMBS
-by-1
vector. The PSA standard
is 100
.
Note
Set the PrepaySpeed
to []
if
you input a customized PrepayMatrix
.
Data Types: double
PrepayMatrix
— Customized prepayment vector
matrix
(Optional) Customized prepayment vector, specified as a
NaN
-padded matrix of size
max(TermRemaining)
-by-NMBS
. Each
column corresponds to each mortgage-backed security, and each row
corresponds to each month after settlement.
Note
Use PrepayMatrix
only when
PrepaySpeed
is unspecified.
Data Types: double
Output Arguments
WAL
— Weighted Average Life of MBS, in number of years
vector
Weighted Average Life (WAL) of MBS, in number of years, returned as a
NMBS
-by-1
vector.
References
[1] PSA Uniform Practices, SF-49
Version History
Introduced before R2006aR2022b: Serial date numbers not recommended
Although mbswal
supports serial date numbers,
datetime
values are recommended instead. The
datetime
data type provides flexible date and time
formats, storage out to nanosecond precision, and properties to account for time
zones and daylight saving time.
To convert serial date numbers or text to datetime
values, use the datetime
function. For example:
t = datetime(738427.656845093,"ConvertFrom","datenum"); y = year(t)
y = 2021
There are no plans to remove support for serial date number inputs.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)