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

    %% Compute the Price of an Amortizing and Vanilla Floors Using the BK Model   

% Copyright 2015 The MathWorks, Inc.


%% 
% Load |deriv.mat| to specify the |BKTree| and then define the floor instrument. 
load deriv.mat; 
Settle = '01-Jan-2004';
Maturity = '01-Jan-2008';
Strike = 0.045;
Reset = 1;
Principal ={{'01-Jan-2005' 100;'01-Jan-2006' 60;'01-Jan-2007' 30;'01-Jan-2008' 30};...
            100};  

%% 
% Price the amortizing and vanilla floors. 
Basis = 1;
Price = floorbybk(BKTree, Strike, Settle, Maturity, Reset, Basis, Principal)