Skip to Main Content Skip to Search
Product Documentation

instcompound - Construct compound option

Syntax

InstSet = instcompound(InstSet, UOptSpec, UStrike, USettle,
UExerciseDates, UAmericanOpt, COptSpec, CStrike, CSettle,
CExerciseDates, CAmericanOpt)
[FieldList, ClassList, TypeString] = instcompound

Arguments

InstSet

Variable containing a collection of instruments. Instruments are classified by type; each type can have different data fields. The stored data field is a row vector or string for each instrument.

UOptSpec

String = 'Call' or 'Put'.

UStrike

1-by-1 vector of strike price values.

USettle

1-by-1 vector of Settle dates.

UExerciseDates

For a European option (UAmericanOpt = 0):

1-by-1 vector of exercise dates. For a European option, there is only one exercise date, the option expiry date.

For an American option (UAmericanOpt = 1):

1-by-2 vector of exercise date boundaries. The option can be exercised on any tree date. If only one non-NaN date is listed, or if ExerciseDates is 1-by-1, the option can be exercised between the valuation date of the stock tree and the single listed exercise date.

UAmericanOpt

If UAmericanOpt = 0, NaN, or is unspecified, the option is a European option. If UAmericanOpt = 1, the option is an American option.

COptSpec

NINST-by-1 list of string values 'Call' or 'Put' of the compound option.

CStrike

NINST-by-1 vector of strike price values. Each row is the schedule for one option.

CSettle

1-by-1 vector containing the settlement or trade date.

CExerciseDates

For a European option (CAmericanOpt = 0):

NINST-by-1 vector of exercise dates. Each row is the schedule for one option. For a European option, there is only one exercise date, the option expiry date.

For an American option (CAmericanOpt = 1):

NINST-by-2 vector of exercise date boundaries. For each instrument, the option can be exercised on any tree date between or including the pair of dates on that row. If only one non-NaN date is listed, or if ExerciseDates is NINST-by-1, the option can be exercised between the valuation date of the stock tree and the single listed exercise date.

CAmericanOpt

If CAmericanOpt = 0, NaN, or is unspecified, the option is a European option. If CAmericanOpt = 1, the option is an American option.

Description

InstSet = instcompound(InstSet, UOptSpec, UStrike, USettle, UExerciseDates, UAmericanOpt, COptSpec, CStrike, CSettle, CExerciseDates, CAmericanOpt) specifies a compound option.

[FieldList, ClassList, TypeString] = instcompound displays the classes.

FieldList is a number of fields (NFIELDS)-by-1 cell array of strings listing the name of each data field for this instrument type.

ClassList is an NFIELDS-by-1 cell array of strings listing the data class of each field. The class determines how arguments are parsed. Valid strings are 'dble', 'date', and 'char'.

TypeString is a string specifying the type of instrument added. For a compound option instrument, TypeString = 'Compound'.

See Also

instadd | instdisp | instget

  


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