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

    %% Create a Float-Float Swap and Price with |bdtprice|

%% 
% Use |instswap| to create a float-float swap and price the swap with |bdtprice|. 
RateSpec = intenvset('Rates',.05,'StartDate',today,'EndDate',datemnth(today,60));
IS = instswap([.02 .03],today,datemnth(today,60),[], [], [], [1 1]);
VolSpec = bdtvolspec(today,datemnth(today,[10 60]),[.01 .02]);
TimeSpec = bdttimespec(today,cfdates(today,datemnth(today,60),1));
BDTTree = bdttree(VolSpec,RateSpec,TimeSpec);
bdtprice(BDTTree,IS)