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

    %% Use |IRBootstrapOptionsObj| with |bootstrap| for Negative Zero Interest-Rates

%% 
% Use the |IRBootstrapOptionsObj| optional argument with the |bootstrap| method
% to allow for negative zero rates when solving for the swap zero points. 
Settle = datenum('15-Mar-2015'); 
InstrumentTypes = {'Deposit';'Deposit';'Swap';'Swap';'Swap';'Swap';}; 

Instruments = [Settle,datenum('15-Jun-2015'),.001; ... 
Settle,datenum('15-Dec-2015'),.0005; ... 
Settle,datenum('15-Mar-2016'),-.001; ... 
Settle,datenum('15-Mar-2017'),-0.0005; ... 
Settle,datenum('15-Mar-2018'),.0017; ... 
Settle,datenum('15-Mar-2020'),.0019]; 

irbo = IRBootstrapOptions('LowerBound',-1); 

bootModel = IRDataCurve.bootstrap('zero', Settle, InstrumentTypes,... 
    Instruments,'IRBootstrapOptions',irbo); 

bootModel.getZeroRates(datemnth(Settle,1:60)) 

%%
% Note that optional argument for |LowerBound| is set to |-1| for negative
% zero rates when solving the swap zero points.