This is machine translation

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

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

crrprice

Instrument prices from Cox-Ross-Rubinstein tree

Syntax

[Price,PriceTree] = crrprice(CRRTree,InstSet)
[Price,PriceTree] = crrprice(___,Options)

Description

example

[Price,PriceTree] = crrprice(CRRTree,InstSet) computes stock option prices using a CRR binomial tree created with crrtree. All instruments contained in a financial instrument variable, InstSet, are priced.

crrprice handles instrument types: 'Asian', 'Barrier', 'Compound', 'CBond', 'Lookback', 'OptStock'. See instadd to construct defined types.

example

[Price,PriceTree] = crrprice(___,Options) adds an optional input argument for Options.

Examples

collapse all

Load the CRR tree and instruments from the data file deriv.mat. Price the barrier and lookback options contained in the instrument set.

load deriv.mat; 
CRRSubSet = instselect(CRRInstSet,'Type', ... 
{'Barrier', 'Lookback'}); 

instdisp(CRRSubSet)
Index Type    OptSpec Strike Settle         ExerciseDates  AmericanOpt BarrierSpec Barrier Rebate Name     Quantity
1     Barrier call    105    01-Jan-2003    01-Jan-2006    1           ui          102     0      Barrier1 1       
 
Index Type     OptSpec Strike Settle         ExerciseDates  AmericanOpt Name      Quantity
2     Lookback call    115    01-Jan-2003    01-Jan-2006    0           Lookback1 7       
3     Lookback call    115    01-Jan-2003    01-Jan-2007    0           Lookback2 9       
 

Price the barrier and lookback options.

[Price, PriceTree] = crrprice(CRRTree,CRRSubSet)
Price = 3×1

   12.1272
    7.6015
   11.7772

PriceTree = struct with fields:
    FinObj: 'BinPriceTree'
     PTree: {1x5 cell}
      tObs: [0 1 2 3 4]
      dObs: [731582 731947 732313 732678 733043]

You can use treeviewer to see the prices of these three instruments along the price tree.

Input Arguments

collapse all

Stock price tree structure, specified by using crrtree.

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

(Optional) Derivatives pricing options structure, created using derivset.

Data Types: struct

Output Arguments

collapse all

Price for 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.

Related single-type pricing functions are:

Tree structure of instrument prices, returned as a MATLAB® structure of trees containing vectors of instrument prices and accrued interest, and a vector of observation times for each node. Within PriceTree:

  • PriceTree.PTree contains the clean prices.

  • PriceTree.tObs contains the observation times.

  • PriceTree.dObs contains the observation dates.

Introduced before R2006a