www.gusucode.com > fininst 案例源码程序 matlab代码 > fininst/WeightedAverageLifeMortgagePoolExample.m

    %% 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.
%%

% Copyright 2015 The MathWorks, Inc.

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;

WAL = mbswal(Settle, Maturity, IssueDate, GrossRate, ... 
CouponRate, Delay, Speed)