| Financial Derivatives Toolbox™ | ![]() |
[Price, PriceTree] = swaptionbyhjm(HJMTree,
OptSpec, Strike,
ExerciseDates, Spread, Settle,
Maturity,
'Name1', Value1, 'Name2', Value2)
HJMTree | Interest-rate tree structure created by hjmtree. | |
OptSpec | NINST-by-1 cell array of strings 'call' or 'put'. A call swaption entitles the buyer to pay the fixed rate. A put swaption entitles the buyer to receive the fixed rate. | |
Strike | NINST-by-1 vector of strike swap rate values. | |
ExerciseDates | For a European option: NINST-by-1 vector of exercise dates. Each row is the schedule for one option. For a European option, there is only one ExerciseDate on the option expiry date. For an American option: NINST-by-2 vector of exercise date boundaries. For each instrument, the option can be exercised on any coupon date between or including the pair of dates on that row. If only one non-NaN date is listed, or if ExerciseDates is NINST-by-1, the option can be exercised between the underlying swap Settle and the single listed ExerciseDate. | |
Spread | NINST-by-1 vector representing the number of basis points over the reference rate. | |
Settle | NINST-by-1 vector of dates representing the settle date for each swap. | |
Maturity | NINST-by-1 vector of dates representing the maturity date for each swap. | |
| ||
AmericanOpt | (Optional) NINST-by-1 flags options:
| |
SwapReset | (Optional) NINST-by-1 vector representing the reset frequency per year for the underlying swap. Default is 1. | |
Basis | (Optional) Day-count basis of the instrument. A vector of integers.
| |
Principal | (Optional) NINST-by-1 vector of the notional principal amounts. Default is 100. | |
Options | (Optional) Derivatives pricing options structure created with derivset. | |
[Price, PriceTree] = swaptionbyhjm(HJMTree, OptSpec, Strike, ExerciseDates, Spread, Settle, Maturity,'Name1', Value1, 'Name2', Value2) computes the price of a swaption from a HJM interest-rate tree.
Note The Settle date for every swaption is set to the ValuationDate of the HJM tree. The swap argument Settle is ignored. |
The swaption may be a call swaption or a put swaption.
A call swaption or payer swaption allows the option buyer to enter into an interest rate swap in which the buyer of the option pays the fixed rate and receives the floating rate.
A put swaption or receiver swaption allows the option buyer to enter into an interest rate swap in which the buyer of the option receives the fixed rate and pays the floating rate.
Price is a (NINST-by-1 vector of expected swaption prices at time 0.
PriceTree is a MATLAB® structure of trees containing vectors of swaption instrument prices and a vector of observation times for each node. Within PriceTree:
PriceTree.PTree contains the clean prices.
PriceTree.tObs contains the observation times.
Price a 1-year call swaption using an HJM interest-rate tree.
Assume that interest rate is fixed at 5% annually between the valuation date of the tree until its maturity. Build a tree with the following data.
Specify the RateSpec:
Rates = [ 0.05;0.05;0.05;0.05];
StartDates = 'jan-1-2007';
EndDates =['jan-1-2008';'jan-1-2009';'jan-1-2010';'jan-1-2011'];
ValuationDate = StartDates;
Compounding = 1;
RateSpec = intenvset('Rates', Rates, 'StartDates', StartDates, 'EndDates',...
EndDates, 'Compounding', Compounding); Use VolSpec to compute the interest rate volatility:
VolSpec=hjmvolspec('Constant',0.01);Use TimeSpec to specify the structure of the time layout for the HJM interest-rate tree:
TimeSpec = hjmtimespec(ValuationDate, EndDates, Compounding);
Build the HJM tree:
HJMTree = hjmtree(VolSpec, RateSpec, TimeSpec);
Use the following swaption arguments:
SwapSettlement = 'jan-1-2007'; SwapMaturity = 'jan-1-2010'; Spread = [0]; SwapReset = 1; Basis = 1; Principal = 100; OptSpec = 'call'; Strike=0.05; ExerciseDates = '01-Jan-2008';
Price the swaption
[Price, PriceTree] = swaptionbyhjm(HJMTree, OptSpec, Strike, ExerciseDates, ... Spread, SwapSettlement, SwapMaturity,'SwapReset', SwapReset, ... 'Basis', Basis, 'Principal', Principal)
to return
Price =
0.9296
PriceTree =
FinObj: 'HJMPriceTree'
tObs: [5x1 double]
PBush: {[0.9296] [1x1x2 double] [1x2x2 double] [1x4x2 double] [0 0 0 0 0 0 0 0]}hjmtree, instswaption, swapbyhjm
![]() | swaptionbybk | swaptionbyhw | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |