This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Construct Equal Probabilities stock tree


EQPTree = eqptree(StockSpec, RateSpec, TimeSpec)



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


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


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

    Note   The standard equal probabilities tree assumes a constant interest rate, but RateSpec allows you to specify an interest-rate curve with varying rates. If you specify variable interest rates, the resulting tree will not be a standard equal probabilities tree.


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.


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'; 

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.

Related Examples

Introduced before R2006a

Was this topic helpful?