Skip to Main Content Skip to Search
Product Documentation

eqptree - Construct Equal Probabilities stock tree

Syntax

EQPTree = eqptree(StockSpec, RateSpec, TimeSpec)

Arguments

StockSpec

Stock specification. See stockspec for information on creating a stock specification.

RateSpec

Interest-rate specification for the initial risk free rate curve. See intenvset for information on declaring an interest-rate variable.

TimeSpec

Tree time layout specification. Defines the observation dates of the equal probabilities binomial tree. See eqptimespec for information on the tree structure.

Description

EQPTree = eqptree(StockSpec, RateSpec, TimeSpec) constructs an equal probabilities stock tree.

EQPTree is a MATLAB structure specifying the time layout for an equal probabilities stock tree.

Examples

Using the data provided, create a stock specification (StockSpec), rate specification (RateSpec), and tree time layout specification (TimeSpec). Then use these specifications to create an EQP tree with eqptree.

Sigma = 0.20;
AssetPrice = 50;
DividendType = 'cash';
DividendAmounts = [0.50; 0.50; 0.50; 0.50];
ExDividendDates = {'03-Jan-2003'; '01-Apr-2003'; '05-July-2003'; 
'01-Oct-2003'}

StockSpec = stockspec(Sigma, AssetPrice, DividendType, ... 
DividendAmounts, ExDividendDates)
StockSpec = 

               FinObj: 'StockSpec'
                Sigma: 0.2000
           AssetPrice: 50
         DividendType: 'cash'
      DividendAmounts: [4x1 double]
      ExDividendDates: [4x1 double]

RateSpec = intenvset('Rates', 0.05, 'StartDates',... 
'01-Jan-2003', 'EndDates', '31-Dec-2003')

RateSpec = 

           FinObj: 'RateSpec'
      Compounding: 2
             Disc: 0.9519
            Rates: 0.0500
         EndTimes: 1.9945
       StartTimes: 0
         EndDates: 731946
       StartDates: 731582
    ValuationDate: 731582
            Basis: 0
     EndMonthRule: 1

ValuationDate = '1-Jan-2003';
Maturity = '31-Dec-2003';
TimeSpec = eqptimespec(ValuationDate, Maturity, 4)

TimeSpec = 

           FinObj: 'BinTimeSpec'
    ValuationDate: 731582
         Maturity: 731946      
       NumPeriods: 4
            Basis: 0
     EndMonthRule: 1
             tObs: [0 0.2493 0.4986 0.7479 0.9972]
             dObs: [731582 731673 731764 731855 731946]

EQPTree = eqptree(StockSpec, RateSpec, TimeSpec)

EQPTree = 

       FinObj: 'BinStockTree'
       Method: 'EQP'
    StockSpec: [1x1 struct]
     TimeSpec: [1x1 struct]
     RateSpec: [1x1 struct]
         tObs: [0 0.2493 0.4986 0.7479 0.9972]
         dObs: [731582 731672 731763 731856 731946]
        STree: {1x5 cell}
      UpProbs: [0.5000 0.5000 0.5000 0.5000]

Use treeviewer to observe the tree you have created.

See Also

eqptimespec | intenvset | stockspec

  


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-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS