www.gusucode.com > fininst 案例源码程序 matlab代码 > fininst/MultipleMortgeBacSecuritiesPricesExample.m
%% Determine Multiple Mortgage-Backed Securities Prices Given the Yield % This example shows how to determine multiple mortgage-backed securities prices, % given a portfolio of mortgage-backed securities with the following % characteristics. %% % Copyright 2015 The MathWorks, Inc. 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)