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

    %% Compute the Cash Flow of Principal, Interest, and Prepayment of a Pass-Through Security
% This example shows how to compute the cash flows and balances of a
% 3-month old mortgage pool with original term of 360 months, assuming a
% prepayment speed of 100.
%%

% Copyright 2015 The MathWorks, Inc.

OriginalBalance = 100000;
GrossRate = 0.08125;
OriginalTerm = 360;
TermRemaining = 357;
PrepaySpeed = 100;

[Balance, Payment, Principal, Interest, Prepayment] =... 
mbspassthrough(OriginalBalance, GrossRate, OriginalTerm,... 
TermRemaining, PrepaySpeed)