instoptbnd

Construct bond option

Syntax

InstSet = instoptbnd(BondIndex,OptSpec,Strike,ExerciseDates)
InstSet = instoptbnd(InstSet,BondIndex,OptSpec,Strike,ExerciseDates)
InstSet = instoptbnd(InstSet,BondIndex,OptSpec,Strike,ExerciseDates,AmericanOpt)
[FieldList,ClassList,TypeString] = instoptbnd

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 character vector for each instrument.

BondIndex

Number of instruments (NINST)-by-1 vector of indices pointing to underlying instruments of Type 'Bond' which are also stored in InstSet. See instbond for information on specifying the bond data.

OptSpec

NINST-by-1 list of character vector values for 'Call' or 'Put'.

Note

The interpretation of the Strike and ExerciseDates arguments depends upon the setting of the AmericanOpt argument. If AmericanOpt = 0, NaN, or is unspecified, the option is a European or Bermuda option. If AmericanOpt = 1, the option is an American option.

Strike

European option: NINST-by-1 vector of strike price values.

Bermuda option: NINST by number of strikes (NSTRIKES) matrix of strike price values.

Each row is the schedule for one option. If an option has fewer than NSTRIKES exercise opportunities, the end of the row is padded with NaNs.

For an American option:

NINST-by-1 vector of strike price values for each option.

ExerciseDates

NINST-by-1 (European option) or NINST-by-NSTRIKES (Bermuda option) matrix 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:

NINST-by-2 vector of exercise date boundaries. For each instrument, the option can be exercised on any coupon 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 underlying bond Settle and the single listed exercise date.

Data arguments are NINST-by-1 vectors, scalar, or empty. Fill in unspecified entries vectors with NaN. Only one data argument is required to create the instrument. The others may be omitted or passed as empty matrices [].

Description

InstSet = instoptbnd(BondIndex,OptSpec,Strike,ExerciseDates) creates a bond option, specified as a European or Bermuda option.

InstSet = instoptbnd(InstSet,BondIndex,OptSpec,Strike,ExerciseDates) adds a bond option, specified as a European or Bermuda option, to an existing instrument set.

InstSet = instoptbnd(InstSet,BondIndex,OptSpec,Strike,ExerciseDates,AmericanOpt) specifies an American option if AmericanOpt is set to 1. If AmericanOpt is not set to 1, the function specifies a European or Bermuda option.

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

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

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

TypeString is a character vector specifying the type of instrument added. For a bond option instrument, TypeString = 'OptBond'.

Examples

collapse all

Create a new instrument variable with the following information:

BondIndex = 1;
OptSpec = 'call';
Strike= 85;
ExerciseDates = 'Nov-1-2014'; 
AmericanOpt = 1;
CouponRate= [0.035;0.04];
Settle= 'Nov-1-2013'; 
Maturity = 'Nov-1-2014'; 
Period =1;

Create the instrument portfolio with two bonds.

InstSet = instbond(CouponRate, Settle, Maturity, ...
Period)
InstSet = struct with fields:
        FinObj: 'Instruments'
    IndexTable: [1x1 struct]
          Type: {'Bond'}
     FieldName: {{11x1 cell}}
    FieldClass: {{11x1 cell}}
     FieldData: {{11x1 cell}}

Create an option on the first bond

InstSet = instoptbnd(InstSet, BondIndex, OptSpec, Strike, ExerciseDates, AmericanOpt)
InstSet = struct with fields:
        FinObj: 'Instruments'
    IndexTable: [1x1 struct]
          Type: {2x1 cell}
     FieldName: {2x1 cell}
    FieldClass: {2x1 cell}
     FieldData: {2x1 cell}

Display the instrument set.

instdisp(InstSet)
Index Type CouponRate Settle         Maturity       Period Basis EndMonthRule IssueDate FirstCouponDate LastCouponDate StartDate Face
1     Bond 0.035      01-Nov-2013    01-Nov-2014    1      0     1            NaN       NaN             NaN            NaN       100 
2     Bond 0.04       01-Nov-2013    01-Nov-2014    1      0     1            NaN       NaN             NaN            NaN       100 
 
Index Type    UnderInd OptSpec Strike ExerciseDates  AmericanOpt
3     OptBond 1        call    85     01-Nov-2014    1          
 

Introduced before R2006a