instoptemfloat
Create embedded option instrument on floating-rate note or add instrument to current portfolio
Syntax
Description
adds optional name-value pair arguments.InstSet
= instopemtfloat(___,Name,Value
)
to add InstSet
= instopemtfloat(InstSetOld
,Spread
,Settle
,Maturity
,OptSpec
,Strike
,ExerciseDates
)'OptEmFloat'
instruments to an instrument variable.
[
lists field metadata for the FieldList
,ClassList
,TypeString
]
= instoptemfloat'OptEmFloat'
instrument.
Examples
Create an Instrument Portfolio with a Embedded Option Floating-Rate Note
Define the embedded call option:
Settle = 'Nov-1-2012'; Maturity = 'Nov-1-2015'; Spread = 25; OptSpec = 'call'; Strike= 100; ExerciseDates = 'Nov-1-2015'; Reset = 1;
Create InstSet
:
InstSet = instoptemfloat(Spread, Settle, Maturity, OptSpec,... Strike, ExerciseDates,'FloatReset', Reset)
InstSet = struct with fields:
FinObj: 'Instruments'
IndexTable: [1x1 struct]
Type: {'OptEmFloat'}
FieldName: {{13x1 cell}}
FieldClass: {{13x1 cell}}
FieldData: {{13x1 cell}}
Display the instrument:
instdisp(InstSet)
Index Type Spread Settle Maturity OptSpec Strike ExerciseDates FloatReset Basis Principal EndMonthRule CapRate FloorRate AmericanOpt 1 OptEmFloat 25 01-Nov-2012 01-Nov-2015 call 100 01-Nov-2015 1 0 100 1 Inf -Inf 0
Input Arguments
Spread
— Number of basis points over the reference rate
nonnegative integer | vector of nonnegative integers
Number of basis points over the reference rate specified as a vector of nonnegative
integers for the number of instruments (NINST
)-by-1
).
Data Types: double
Settle
— Settlement dates of floating-rate note
ValuationDate
of HW Tree (default) | datetime array | string array | date character vector | serial date number
Settlement dates of floating-rate note, specified as a
NINST
-by-1
vector using a datetime array, string array,
date character vectors, or serial date numbers.
Data Types: double
| char
| string
| datetime
Maturity
— Floating-rate note maturity date
datetime array | string array | date character vector | serial date number
Floating-rate note maturity date, specified as a
NINST
-by-1
vector using a datetime array, string array,
date character vectors, or serial date numbers.
Data Types: double
| char
| string
| datetime
OptSpec
— Definition of option
character vector | cell array of character vectors
Definition of option as 'call'
or 'put'
specified
as a NINST
-by-1
cell array of character vectors for
'call'
or 'put'
.
Data Types: char
| cell
Strike
— Embedded option strike price values
nonnegative integer | vector of nonnegative integers
Embedded option strike price values for option specified as nonnegative integers using as
NINST
-by-NSTRIKES
or
NINST
-by-1
vector of strike price values, depending on
the type of option.
For a European or Bermuda Option —
NINST
-by-NSTRIKES
matrix of strike price values where each row is the schedule for one option. If an option has fewer thanNSTRIKES
exercise opportunities, the end of the row is padded withNaN
s.For an American Option —
NINST
-by-1
vector of strike price values for each option.
Data Types: double
ExerciseDates
— Exercise date for embedded option
datetime array | string array | date character vector | serial date number
Exercise date for embedded option, specified as a
NINST
-by-NSTRIKES
or
NINST
-by-2
vector using a datetime array, string array,
date character vectors, or serial date numbers, depending on the type of option.
For a European or Bermuda Option —
NINST
-by-NSTRIKES
of exercise dates where each row is the schedule for one option. For a European option, there is only oneExerciseDate
on 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 ifExerciseDates
isNINST
-by-1
, the option can be exercised between the underlying bondSettle
date and the single listedExerciseDate
.
Data Types: double
| char
| string
| datetime
InstSetOld
— Variable containing an existing collection of instruments
struct
Variable containing an existing collection of instruments, specified as a struct.
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. For more information on
instrument data parameters, see the reference entries for individual instrument types. For
example, see instfloat
for additional information on the
float instrument.
Data Types: struct
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: InstSet =
instoptemfloat(Spread,Settle,Maturity,OptSpec,Strike,ExerciseDates,'FloatReset',Reset)
AmericanOpt
— Embedded option type
0
if AmericanOpt
is NaN
or not entered (default) | scalar | vector of positive integers[0,1]
Embedded option type, specified as the comma-separated pair consisting of
'AmericanOpt'
and a NINST
-by-1
positive integer scalar flags with values:
For a European or Bermuda option —
AmericanOpt
is0
for each European or Bermuda option. The default is0
ifAmericanOpt
isNaN
or not entered.For an American option —
AmericanOpt
is1
for each American option. TheAmericanOpt
argument is required to invoke American exercise rules.
Data Types: single
| double
FloatReset
— Frequency of payments per year
1
(default) | positive integer from the set[1,2,3,4,6, 12]
| vector of positive integers from the set [1,2,3,4,6,12]
Frequency of payments per year, specified as the comma-separated pair consisting of
'FloatReset'
and positive integers for the values
1,2,4,6,12]
in a NINST
-by-1
vector.
Data Types: single
| double
Basis
— Day-count basis of the instrument
0
(actual/actual) (default) | positive integers of the set [1...13]
| vector of positive integers of the set [1...13]
Day-count basis of the instrument, specified as the comma-separated pair consisting of
'Basis'
and a positive integer using a
NINST
-by-1
vector. The Basis
value
represents the basis used when annualizing the input forward-rate tree.
0 = actual/actual
1 = 30/360 (SIA)
2 = actual/360
3 = actual/365
4 = 30/360 (PSA)
5 = 30/360 (ISDA)
6 = 30/360 (European)
7 = actual/365 (Japanese)
8 = actual/actual (ICMA)
9 = actual/360 (ICMA)
10 = actual/365 (ICMA)
11 = 30/360E (ICMA)
12 = actual/365 (ISDA)
13 = BUS/252
For more information, see Basis.
Data Types: single
| double
Principal
— Principal values
100
(default) | nonnegative integer | vector of nonnegative integers | cell array of nonnegative integers
Principal values, specified as the comma-separated pair consisting of
'Principal'
and a nonnegative integer using a
NINST
-by-1
vector of notional principal
amounts.
Data Types: single
| double
Options
— Structure containing derivatives pricing options
structure
Structure containing derivatives pricing options, specified as the comma-separated pair
consisting of 'Options'
and a structure using derivset
.
Data Types: struct
EndMonthRule
— End-of-month rule flag
1
(in effect) (default) | nonnegative integer [0,1]
End-of-month rule flag, specified as the comma-separated pair consisting of
'EndMonthRule'
and a nonnegative integer [0
,
1
] using a NINST
-by-1
vector. This
rule applies only when Maturity
is an end-of-month date for a month having
30 or fewer days.
0
= Ignore rule, meaning that a bond coupon payment date is always the same numerical day of the month.1
= Set rule on, meaning that a bond coupon payment date is always the last actual day of the month.
Data Types: single
| double
Output Arguments
InstSet
— Variable containing a collection of instruments
scalar | vector
Variable containing a collection of instruments returned as a scalar or vector with the
instruments broken down by type and each type can have different data fields. Each stored data
field has a row vector or character vector for each instrument. For more information on the
InstSet
variable, see instget
.
FieldList
— Name of each data field
character vector | cell array of character vectors
NFIELDS
-by-1
cell array of character vectors
listing the name of each data field for this instrument type.
ClassList
— Determines how arguments are parsed
character vector with value: 'dble'
, 'date'
, or 'char'
| cell array of character vectors with values: 'dble'
, 'date'
, or 'char'
NFIELDS
-by-1
cell array of character vectors
listing the data class of each field.
TypeString
— Type of instrument added
character vector with value 'OptEmFloat'
Character vector specifying the type of instrument added where
TypeString
= 'OptEmFloat'
.
Version History
Introduced in R2013a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)