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 Cox-Ross-Rubinstein stock tree


CRRTree = crrtree(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 CRR binomial tree. See crrtimespec for information on the tree structure.

    Note   The standard CRR 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 CRR tree.


CRRTree = crrtree(StockSpec, RateSpec, TimeSpec) creates a structure specifying the time layout for a CRR binomial 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 a CRR tree with crrtree.

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 = crrtimespec(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]
CRRTree = crrtree(StockSpec, RateSpec, TimeSpec)
CRRTree = 

       FinObj: 'BinStockTree'
       Method: 'CRR'
    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.5370 0.5370 0.5370 0.5370]

Use treeviewer to observe the tree you have created.

Related Examples

Introduced before R2006a

Was this topic helpful?