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

    %% Price a 4% Fixed-Rate Note Using an HJM Forward-Rate Tree
% This example shows how to price a 4% fixed-rate note 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 note.
%%

% Copyright 2015 The MathWorks, Inc.

load deriv.mat 

CouponRate = 0.04;
Settle = '01-Jan-2000';
Maturity = '01-Jan-2003';

Price = fixedbyhjm(HJMTree, CouponRate, Settle, Maturity)