Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

hwsens

Instrument prices and sensitivities from Hull-White interest-rate tree

Syntax

[Delta,Gamma,Vega,Price] = hwsens(HWTree,InstSet,Options)

Arguments

HWTree

Interest-rate tree structure created by hwtree.

InstSet

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

Options

(Optional) Derivatives pricing options structure created with derivset.

Description

[Delta,Gamma,Vega,Price] = hwsens(HWTree,InstSet,Options) computes instrument sensitivities and prices for instruments using an interest-rate tree created with the hwtree function. NINST instruments from a financial instrument variable, InstSet, are priced. hwsens handles instrument types: 'Bond', 'CashFlow', 'OptBond', 'OptEmBond', 'OptEmBond', 'OptFloat', 'OptEmFloat', 'Fixed', 'Float', 'Cap', 'Floor', 'RangeFloat', '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 hwtree. See hwtree 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 hwtree.

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 σ(t,T). Vega is computed by finite differences in calls to hwtree. See hwvolspec for information on the volatility process.

Note

All sensitivities are returned as dollar sensitivities. To find the per-dollar sensitivities, divide by the respective instrument price.

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

collapse all

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

load deriv.mat; 
HWSubSet = instselect(HWInstSet,'Type', {'Bond', 'Cap'}); 

instdisp(HWSubSet)
Index Type CouponRate Settle         Maturity       Period Basis EndMonthRule IssueDate FirstCouponDate LastCouponDate StartDate Face Name    Quantity
1     Bond 0.04       01-Jan-2004    01-Jan-2007    1      0     1            NaN       NaN             NaN            NaN       100  4% bond 20      
2     Bond 0.04       01-Jan-2004    01-Jan-2008    1      0     1            NaN       NaN             NaN            NaN       100  4% bond 15      
 
Index Type Strike Settle         Maturity       CapReset Basis Principal Name   Quantity
3     Cap  0.06   01-Jan-2004    01-Jan-2008    1        0     100       6% Cap 10      
 

Compute the Delta and Gamma for the cap and bond instruments.

[Delta, Gamma] = hwsens(HWTree, HWSubSet)
Delta = 

 -291.2580
 -374.6368
   60.9580

Gamma = 

   1.0e+03 *

    0.8584
    1.4609
    5.5994

Introduced before R2006a

Was this topic helpful?