Main Content

eqpprice

Instrument prices from Equal Probabilities binomial tree

Description

[Price,PriceTree] = eqpprice(EQPTree,InstSet) computes stock option prices using an EQP binomial tree created with eqptree. All instruments contained in a financial instrument variable, InstSet, are priced.

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

example

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

example

Examples

collapse all

Load the EQP tree and instruments from the data file deriv.mat. Price 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       
 

Price the put options.

[Price, PriceTree] = eqpprice(EQPTree, EQPSubSet)
Price = 3×1

    2.6375
    4.7444
    3.9178

PriceTree = struct with fields:
    FinObj: 'BinPriceTree'
     PTree: {[3x1 double]  [3x2 double]  [3x3 double]  [3x4 double]  [3x5 double]}
      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 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

(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:

  • asianbyeqp: Price an Asian option from an EQP tree.

  • barrierbyeqp: Price a barrier option from an EQP tree.

  • cbondbyeqp: Price convertible bonds from an EQP tree.

  • compoundbyeqp: Price a compound option from an EQP tree.

  • lookbackbyeqp: Price a lookback option from an EQP tree.

  • optstockbyeqp: Price an American, Bermuda, or European option from an EQP tree.

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.

Version History

Introduced before R2006a