intenvsens - Instrument price and sensitivities from set of zero curves

Syntax

[Delta, Gamma, Price] = intenvsens(RateSpec, InstSet)

Arguments

RateSpec

A structure containing the properties of an interest-rate structure. See intenvset for information on creating RateSpec.

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.

Description

[Delta, Gamma, Price] = intenvsens(RateSpec, InstSet) computes dollar prices and price sensitivities for instruments that use a zero coupon bond rate structure.

Delta is a number of instruments (NINST) by number of curves (NUMCURVES) matrix of deltas, representing the rate of change of instrument prices with respect to shifts in the observed forward yield curve. Delta is computed by finite differences.

Gamma is an NINST-by-NUMCURVES matrix of gammas, representing the rate of change of instrument deltas with respect to shifts in the observed forward yield curve. Gamma is computed by finite differences.

Price is an NINST-by-NUMCURVES matrix of prices of each instrument. If an instrument cannot be priced, a NaN is returned.

intenvsens handles the following instrument types: 'Bond', 'CashFlow', 'Fixed', 'Float', 'Swap'. See instadd for information about constructing defined types.

Examples

Load the tree and instruments from a data file.

load deriv.mat
instdisp(ZeroInstSet)

[Delta, Gamma] = intenvsens(ZeroRateSpec, ZeroInstSet)

Delta =

 -272.6403
 -347.4386
 -272.6403
   -1.0445
 -282.0405

Gamma =

  1.0e+003 *

    1.0298
    1.6227
    1.0298
    0.0033
    1.0596

See Also

hjmprice, hjmsens, instadd, intenvprice, intenvset

  


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