Documentation

# eqpsens

Instrument prices and sensitivities from Equal Probabilities binomial tree

## Syntax

``[Delta,Gamma,Vega,Price] = eqpsens(EQPTree,InstSet)``
``[Delta,Gamma,Vega,Price] = eqpsens(___,Options)``

## Description

example

````[Delta,Gamma,Vega,Price] = eqpsens(EQPTree,InstSet)` computes instrument sensitivities and prices for instruments using a binomial tree created with the `eqptree` function. All sensitivities are returned as dollar sensitivities. To find the per-dollar sensitivities, divide by the respective instrument price.`eqpsens` handles instrument types: `'Asian'`, `'Barrier'`, `'Compound'`, `'CBond'`, `'Lookback'`, and `'OptStock'`. See `instadd` for information on instrument types.```

example

````[Delta,Gamma,Vega,Price] = eqpsens(___,Options)` adds an optional input argument for `Options`.```

## Examples

collapse all

Load the EQP tree and instruments from the data file `deriv.mat`. Compute the `Delta` and `Gamma` sensitivities of the put options contained in the instrument set.

```load deriv.mat; EQPSubSet = instselect(EQPInstSet, 'FieldName', 'OptSpec', ... 'Data', 'put')```
```EQPSubSet = struct with fields: FinObj: 'Instruments' IndexTable: [1x1 struct] Type: {5x1 cell} FieldName: {5x1 cell} FieldClass: {5x1 cell} FieldData: {5x1 cell} ```
`instdisp(EQPSubSet)`
```Index Type OptSpec Strike Settle ExerciseDates AmericanOpt Name Quantity 1 OptStock put 105 01-Jan-2003 01-Jan-2006 0 Put1 5 Index Type OptSpec Strike Settle ExerciseDates AmericanOpt AvgType AvgPrice AvgDate Name Quantity 2 Asian put 110 01-Jan-2003 01-Jan-2006 0 arithmetic NaN NaN Asian1 4 3 Asian put 110 01-Jan-2003 01-Jan-2007 0 arithmetic NaN NaN Asian2 6 ```

Obtain the `Delta` and `Gamma` for the put options contained in the instrument set.

`[Delta, Gamma] = eqpsens(EQPTree, EQPSubSet)`
```Delta = 3×1 -0.2336 -0.5443 -0.4516 ```
```Gamma = 3×1 0.0218 0.0000 0.0000 ```

## Input Arguments

collapse all

Stock tree structure, specified by using `eqptree`.

Data Types: `struct`

Instrument variable containing a collection of `NINST` instruments, specified using `instadd`. 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.

Data Types: `struct`

Derivatives pricing options structure, created using `derivset`.

Data Types: `struct`

## Output Arguments

collapse all

Rate of change of instruments prices with respect to changes in the stock price, returned as a `NINST`-by-`1` vector of deltas.

For path-dependent options (`'Lookback'` and `'Asian'`), `Delta` and `Gamma` are computed by finite differences in calls to `eqpprice`. For the rest of the options (`'OptStock'`, `'Barrier'`, `'CBond'`, and `'Compound'`), `Delta` and `Gamma` are computed from the `EQPTree` and the corresponding option price tree.

Rate of change of instruments deltas with respect to changes in the stock price, returned as a `NINST`-by-`1` vector of gammas.

For path-dependent options (`'Lookback'` and `'Asian'`), `Delta` and `Gamma` are computed by finite differences in calls to `eqpprice`. For the rest of the options (`'OptStock'`, `'Barrier'`, `'CBond'`, and `'Compound'`), `Delta` and `Gamma` are computed from the `EQPTree` and the corresponding option price tree.

Rate of change of instruments prices with respect to changes in the volatility of the stock, returned as a `NINST`-by-`1` vector of vegas. `Vega` is computed by finite differences in calls to `eqptree`.

Price of each instrument, returned as a `NINST`-by-`1` vector. The prices are computed by backward dynamic programming on the stock tree. If an instrument cannot be priced, a `NaN` is returned in that entry.

 Chriss, Neil. Black-Scholes and Beyond: Option Pricing Models. McGraw-Hill, 1996, pp 308-312.