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

    %% Specify a Four-Period Tree with Annual Nodes
% This example shows how to specify a four-period tree with annual nodes
% using annual compounding to report rates.
%%

% Copyright 2015 The MathWorks, Inc.

ValuationDate = 'Jan-1-2004';
Maturity = ['12-31-2004'; '12-31-2005'; '12-31-2006'; 
'12-31-2007'];
Compounding = 1;
TimeSpec = bktimespec(ValuationDate, Maturity, Compounding)