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.

stttimespec

Specify time structure for standard trinomial tree

Syntax

TimeSpec = stttimespec(ValuationDate,Maturity,NumPeriods)

Description

example

TimeSpec = stttimespec(ValuationDate,Maturity,NumPeriods) creates a time spec for a standard trinomial (STT) tree.

Examples

collapse all

Create a RateSpec.

StartDates = 'Jan-1-2014'; 
EndDates = 'Jan-1-2018'; 
Rates = 0.025; 
Basis = 1; 
Compounding = -1;

RateSpec = intenvset('ValuationDate', StartDates, 'StartDates', StartDates,'EndDates',...
EndDates, 'Rates', Rates,'Compounding', Compounding, 'Basis', Basis)
RateSpec = struct with fields:
           FinObj: 'RateSpec'
      Compounding: -1
             Disc: 0.9048
            Rates: 0.0250
         EndTimes: 4
       StartTimes: 0
         EndDates: 737061
       StartDates: 735600
    ValuationDate: 735600
            Basis: 1
     EndMonthRule: 1

Create a StockSpec.

AssetPrice = 110; 
Sigma = 0.22; 
Div = 0.02; 
StockSpec = stockspec(Sigma, AssetPrice, 'continuous', Div)
StockSpec = struct with fields:
             FinObj: 'StockSpec'
              Sigma: 0.2200
         AssetPrice: 110
       DividendType: {'continuous'}
    DividendAmounts: 0.0200
    ExDividendDates: []

Create a STTTimespec and STTTree.

NumPeriods = length(cfdates(StartDates,EndDates,12));
TimeSpec = stttimespec(StartDates, EndDates, NumPeriods)
TimeSpec = struct with fields:
           FinObj: 'STTTimeSpec'
    ValuationDate: 735600
         Maturity: 737061
       NumPeriods: 48
            Basis: 0
     EndMonthRule: 1
             tObs: [1x49 double]
             dObs: [1x49 double]

STTT = stttree(StockSpec, RateSpec, TimeSpec)
STTT = struct with fields:
       FinObj: 'STStockTree'
    StockSpec: [1x1 struct]
     TimeSpec: [1x1 struct]
     RateSpec: [1x1 struct]
         tObs: [1x49 double]
         dObs: [1x49 double]
        STree: {1x49 cell}
        Probs: {1x48 cell}

Input Arguments

collapse all

Date marking the pricing date and first observation in the tree, specified as a scalar using a serial date number or date character vector.

Data Types: double | char

Date marking the depth of the tree, specified as a scalar using a serial date number or date character vector.

Data Types: double | char

Determines how many time steps are in tree, specified as a scalar using a nonnegative integer value.

Data Types: double

Output Arguments

collapse all

Time layout for standard trinomial (STT) tree, returned as a structure.

See Also

Introduced in R2015b

Was this topic helpful?