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

    %% Price a 5% Fixed-Rate Note Using a Black-Karasinski Interest-Rate Tree  

% Copyright 2015 The MathWorks, Inc.


%% 
% Load the file |deriv.mat|, which provides |BKTree|. The |BKTree| structure
% contains the time and interest-rate information needed to price the note. 
load deriv.mat;   

%% 
% Set the required values. Other arguments will use defaults. 
CouponRate = 0.05;
Settle = '01-Jan-2005';
Maturity = '01-Jan-2006';  

%% 
% Use |fixedbybk| to compute the price of the note. 
Price = fixedbybk(BKTree, CouponRate, Settle, Maturity)