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

    %% Create a Structure Specifying the Volatility for |hwtree|
% This example shows how to create a Hull-White volatility specification (|VolSpec|) using the following data. 
%%

% Copyright 2015 The MathWorks, Inc.

ValuationDate = '01-01-2004';
StartDate = ValuationDate;
VolDates = ['12-31-2004'; '12-31-2005'; '12-31-2006'; 
'12-31-2007'];
VolCurve = 0.01;
AlphaDates = '01-01-2008';
AlphaCurve = 0.1;

HWVolSpec = hwvolspec(ValuationDate, VolDates, VolCurve,...  
AlphaDates, AlphaCurve)