www.gusucode.com > fininst 案例源码程序 matlab代码 > fininst/CalculateCashFlowAmountsandDatesTimeFactorsandMortgageFaExample.m
%% Calculate Cash Flow Amounts and Dates, Time Factors, and Mortgage Factors for a Single Mortgage % Given a mortgage with the following characteristics, compute the cash % flow amounts and dates, the time factors, and the mortgage factors. % Copyright 2015 The MathWorks, Inc. %% % Define the mortgage characteristics. Settle = datenum('17-April-2002'); Maturity = datenum('1-Jan-2030'); IssueDate = datenum('1-Jan-2000'); GrossRate = 0.08125; CouponRate = 0.075; Delay = 14; PrepaySpeed = 100; %% % Use |mbscfamonts| to evaluate the mortgage. [CFlowAmounts, CFLowDates, TFactors, Factors] = ... mbscfamounts(Settle, Maturity, IssueDate, GrossRate, ... CouponRate, Delay, PrepaySpeed) %% % The result is contained in four 334-element row vectors.