# Documentation

### This is machine translation

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

# barrierbyitt

Price barrier options using implied trinomial tree (ITT)

## Syntax

``````[Price,PriceTree] = barrierbyitt(ITTTree,OptSpec,Strike,Settle,AmericanOpt,ExerciseDates,BarrierSpec,Barrier)``````
``````[Price,PriceTree] = barrierbyitt(___,Rebate,Options)``````

## Description

example

``````[Price,PriceTree] = barrierbyitt(ITTTree,OptSpec,Strike,Settle,AmericanOpt,ExerciseDates,BarrierSpec,Barrier)``` calculates prices for barrier options using implied trinomial tree (ITT).```

example

``````[Price,PriceTree] = barrierbyitt(___,Rebate,Options)``` adds optional arguments for `Rebate` and `Options`.```

## Examples

collapse all

This example shows how to price a barrier option using an ITT tree by loading the file deriv.mat, which provides ITTTree. The ITTTree structure contains the stock specification and time information needed to price the option.

```load deriv.mat; OptSpec = 'Call'; Strike = 85; Settle = '01-Jan-2006'; ExerciseDates = '31-Dec-2008'; AmericanOpt = 1; BarrierSpec = 'UI'; Barrier = 115; Price = barrierbyitt(ITTTree,OptSpec,Strike,Settle,ExerciseDates,AmericanOpt,... BarrierSpec,Barrier)```
```Price = 2.4074 ```

## Input Arguments

collapse all

Stock tree structure, specified by using `itttree`.

Data Types: `struct`

Definition of an option as `'call'` or `'put'`, specified as a `NINST`-by-`1` cell array of character vector values.

Data Types: `char` | `cell`

Option strike price value for a European or an American Option, specified as `NINST`-by-`1` matrix of strike price values. Each row is the schedule for one option.

Data Types: `double`

Settlement or trade date for the barrier option, specified as a `NINST`-by-`1` matrix of serial date numbers or date character vectors. The `Settle` date for every barrier is set to the `ValuationDate` of the stock tree. The barrier argument `Settle` is ignored.

Data Types: `double` | `char`

Option exercise dates, specified as a serial date number or a date character vector:

• For a European option, use a `1`-by-`1` matrix of dates. Each row is the schedule for one option. For a European option, there is only one `ExerciseDates` on the option expiry date which is the maturity of the instrument.

• For an American option, use a `1`-by-`2` vector of exercise date boundaries. The option can be exercised on any date between or including the pair of dates on that row. If only one non-`NaN` date is listed, or if `ExerciseDates` is a `NINST`-by-`1`, the option can be exercised between `ValuationDate` of the stock tree and the single listed date in `ExerciseDates`.

Data Types: `double` | `char`

Option type, specified as `NINST`-by-`1` positive integer scalar flags with values:

• `0` — European

• `1` — American

Data Types: `double`

Barrier option type, specified as a character vector or a cell array of character vectors with the following values:

• `'UI'` — Up Knock In

This option becomes effective when the price of the underlying asset passes above the barrier level. It gives the option holder the right, but not the obligation, to buy/sell (call/put) the underlying security at the strike price if the underlying asset goes above the barrier level during the life of the option. Note, `barrierbyfd` does not support American knock-in barrier options.

• `'UO'` — Up Knock Out

This option gives the option holder the right, but not the obligation, to buy/sell (call/put) the underlying security at the strike price as long as the underlying asset does not go above the barrier level during the life of the option. This option terminates when the price of the underlying asset passes above the barrier level. Usually, with an up-and-out option, the rebate is paid if the spot price of the underlying reaches or exceeds the barrier level.

• `'DI'` — Down Knock In

This option becomes effective when the price of the underlying stock passes below the barrier level. It gives the option holder the right, but not the obligation, to buy/sell (call/put) the underlying security at the strike price if the underlying security goes below the barrier level during the life of the option. With a down-and-in option, the rebate is paid if the spot price of the underlying does not reach the barrier level during the life of the option. Note, `barrierbyfd` does not support American knock-in barrier options.

• `'DO'` — Down Knock Up

This option gives the option holder the right, but not the obligation, to buy/sell (call/put) the underlying asset at the strike price as long as the underlying asset does not go below the barrier level during the life of the option. This option terminates when the price of the underlying security passes below the barrier level. Usually the option holder receives a rebate amount if the option expires worthless.

OptionBarrier TypePayoff if Barrier CrossedPayoff if Barrier not Crossed
Call/PutDown Knock-outWorthlessStandard Call/Put
Call/PutDown Knock-inCall/PutWorthless
Call/PutUp Knock-outWorthlessStandard Call/Put
Call/PutUp Knock-inStandard Call/PutWorthless

Data Types: `char` | `cell`

Barrier value, specified as a `NINST`-by-`1` matrix.

Data Types: `double`

(Optional) Rebate value, specified as a `NINST`-by-`1` matrix of integers. For Knock In options, the rebate is paid at expiry. For Knock Out options, the rebate is paid when the barrier is reached.

Data Types: `double`

(Optional) Derivatives pricing options, specified as structure that is created with `derivset`.

Data Types: `struct`

## Output Arguments

collapse all

Expected prices for barrier options at time 0, returned as a `NINST`-by-`1` vector.

Structure with a vector of barrier option prices at each node, returned as a tree structure.

`PriceTree` is a MATLAB® structure of trees containing vectors of instrument prices and a vector of observation times for each node.

`PriceTree.PTree` contains the prices.

`PriceTree.tObs` contains the observation times.

`PriceTree.dObs` contains the observation dates.

collapse all

### Barrier Option

A Barrier option has not only a strike price but also a barrier level and sometimes a rebate.

A rebate is a fixed amount that is paid if the option cannot be exercised because the barrier level has been reached or not reached. The payoff for this type of option depends on whether the underlying asset crosses the predetermined trigger value (barrier level), indicated by `Barrier`, during the life of the option.

## References

[1] Derman, E., I. Kani, D. Ergener and I. Bardhan. “Enhanced Numerical Methods for Options with Barriers.” Financial Analysts Journal. (Nov.-Dec.), 1995, pp. 65–74.