hjmsens

Instrument prices and sensitivities from HJM interest-rate tree

Syntax

[Delta, Gamma, Vega, Price] = hjmsens(HJMTree, InstSet,
Options)

Arguments

HJMTree

Heath-Jarrow-Morton tree sampling a forward-rate process. See hjmtree for information on creating HJMTree.

InstSet

Variable containing a collection of instruments. Instruments are categorized by type. Each type can have different data fields. The stored data field is a row vector or string for each instrument.

Options

(Optional) Derivatives pricing options structure created with derivset.

Description

[Delta, Gamma, Vega, Price] = hjmsens(HJMTree, InstSet, Options) computes instrument sensitivities and prices for instruments using an interest-rate tree created with hjmtree. NINST instruments from a financial instrument variable, InstSet, are priced. hjmsens handles instrument types: 'Bond', 'CashFlow', 'OptBond', 'OptEmBond', 'Fixed', 'Float', 'Cap', 'Floor', 'Swap'. See instadd for information on instrument types.

Delta is an NINST-by-1 vector of deltas, representing the rate of change of instrument prices with respect to changes in the interest rate. Delta is computed by finite differences in calls to hjmtree. See hjmtree for information on the observed yield curve.

Gamma is an NINST-by-1 vector of gammas, representing the rate of change of instrument deltas with respect to the changes in the interest rate. Gamma is computed by finite differences in calls to hjmtree.

Vega is an NINST-by-1 vector of vegas, representing the rate of change of instrument prices with respect to the changes in the volatility . Vega is computed by finite differences in calls to hjmtree. See hjmvolspec for information on the volatility process.

Price is an NINST-by-1 vector of prices of each instrument. The prices are computed by backward dynamic programming on the interest-rate tree. If an instrument cannot be priced, NaN is returned.

Delta and Gamma are calculated based on yield shifts of 100 basis points. Vega is calculated based on a 1% shift in the volatility process.

Examples

Load the tree and instruments from a data file. Compute Delta and Gamma for the cap and bond instruments contained in the instrument set.

load deriv.mat; 
HJMSubSet = instselect(HJMInstSet,'Type', {'Bond', 'Cap'}); 
instdisp(HJMSubSet)

Index Type   CouponRate Settle      Maturity     Period  Name 
... 
1     Bond   0.04       01-Jan-2000 01-Jan-2003  1       4% bond 
2     Bond   0.04       01-Jan-2000 01-Jan-2004  2       4% bond  
   
Index Type Strike Settle      Maturity     CapReset...  Name ...  
3     Cap  0.03   01-Jan-2000 01-Jan-2004  1            3% Cap 
     
[Delta, Gamma] = hjmsens(HJMTree, HJMSubSet)

Warning: Not all cash flows are aligned with the tree. Result will 
be approximated.

Delta =

 -272.6462
 -347.4315
  294.9700

Gamma =

  1.0e+003 *

    1.0299
    1.6227
    6.8526

See Also

hjmprice, hjmtree, hjmvolspec, instadd

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS