Products & Services Solutions Academia Support User Community Company

Learn more about Financial Derivatives Toolbox   

crrprice - Instrument prices from CRR tree

Syntax

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

Arguments

CRRTree

Interest-rate tree structure created by crrtree.

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 string for each instrument. For more information about how to create the InstSet structure, see instadd.

Options

(Optional) Derivatives pricing options structure created with derivset.

Description

[Price, PriceTree] = crrprice(CRRTree, InstSet, Options) computes stock option prices using a CRR binomial tree created with crrtree.

Price is a number of instruments (NINST)-by-1 vector of prices for each instrument. The prices are computed by backward dynamic programming on the stock tree. If an instrument cannot be priced, NaN is returned.

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.

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

Related single-type pricing functions are:

Examples

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 ...  
1     Barrier call 105   01-Jan-2003 01-Jan-2006 1           ui ...     
 
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, PriceTree] = crrprice(CRRTree, CRRSubSet)

Price =

   12.1272
    7.6015
   11.7772

PriceTree = 

    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.

treeviewer(PriceTree, CRRSubSet)

See Also

crrsens, crrtree, instadd

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

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