Documentation

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.

crrtree

Construct Cox-Ross-Rubinstein stock tree

Syntax

CRRTree = crrtree(StockSpec,RateSpec,TimeSpec)

Description

example

CRRTree = crrtree(StockSpec,RateSpec,TimeSpec) constructs a Cox-Ross-Rubinstein stock tree.

Examples

collapse all

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';
'01-Oct-2003'};

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

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

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

CRRTree = crrtree(StockSpec, RateSpec, TimeSpec)
Warning: RateSpec was not created with continuous compounding. Compounding will
be set to continuous while leaving discount factors unaltered. This will result
in the recalculation of the interest rates. 

CRRTree = 

  struct with fields:

       FinObj: 'BinStockTree'
       Method: 'CRR'
    StockSpec: [1×1 struct]
     TimeSpec: [1×1 struct]
     RateSpec: [1×1 struct]
         tObs: [0 0.2493 0.4986 0.7479 0.9972]
         dObs: [731582 731673 731764 731855 731946]
        STree: {1×5 cell}
      UpProbs: [0.5370 0.5370 0.5370 0.5370]

Use treeviewer to observe the tree you have created.

Input Arguments

collapse all

Stock specification, specified by the StockSpec obtained from stockspec. See stockspec for information on creating a stock specification.

Data Types: struct

Interest-rate specification for initial risk-free rate curve, specified by the RateSpec obtained from intenvset. For information on the interest-rate specification, see intenvset.

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 is not a standard CRR tree.

Data Types: struct

Tree time layout specification, specified by the TimeSpec obtained from crrtimespec. The TimeSpec defines the observation dates of the CRR binomial tree. See crrtimespec for information on the tree structure.

Data Types: struct

Output Arguments

collapse all

CRR binomial tree, returned as a structure specifying the time layout for the tree.

Introduced before R2006a

Was this topic helpful?