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

    %% Price a 3% Floor Instrument Using an HJM Forward-Rate Tree
% This example shows how to price a 3% floor instrument using an HJM
% forward-rate tree by loading the file |deriv.mat|, which provides |HJMTree|.
% The |HJMTree| structure contains the time and forward-rate information
% needed to price the floor instrument.
%%

% Copyright 2015 The MathWorks, Inc.

load deriv.mat;

Strike = 0.03;
Settle = '01-Jan-2000';
Maturity = '01-Jan-2004';

Price = floorbyhjm(HJMTree, Strike, Settle, Maturity)