instoptfloat
Create option instrument on floating-rate note or add instrument to current portfolio
Syntax
Description
to specify a European option for a floating-rate note.InstSet = instoptfloat(FloatIndex,OptSpec,Strike,ExerciseDates)
to specify an American or Bermuda option for a floating-rate note.InstSet = instoptfloat(FloatIndex,OptSpec,Strike,ExerciseDates,AmericanOpt)
to add instruments to an existing portfolio.InstSet = instoptfloat(InstSetOld,___)
[ lists the field metadata for the
FieldList,ClassList,TypeString]
= instoptfloat'OptFloat' instrument.
Examples
Define the floating-rate note:
Settle = datetime(2012,11,1); Maturity = datetime(2015,11,1); Spread = 50; Reset = 1;
Create InstSet:
InstSet = instfloat(Spread, Settle, Maturity, Reset)
InstSet = struct with fields:
FinObj: 'Instruments'
IndexTable: [1×1 struct]
Type: {'Float'}
FieldName: {{9×1 cell}}
FieldClass: {{9×1 cell}}
FieldData: {{9×1 cell}}
Display the instrument:
instdisp(InstSet)
Index Type Spread Settle Maturity FloatReset Basis Principal EndMonthRule CapRate FloorRate 1 Float 50 01-Nov-2012 01-Nov-2015 1 0 100 1 Inf -Inf
Add a European call option to the instrument portfolio:
OptSpec = 'call'; Strike = 100; ExerciseDates = 'Nov-1-2015';
Create InstSet:
InstSet = instoptfloat(InstSet, 1, OptSpec, Strike, ExerciseDates)
InstSet = struct with fields:
FinObj: 'Instruments'
IndexTable: [1×1 struct]
Type: {2×1 cell}
FieldName: {2×1 cell}
FieldClass: {2×1 cell}
FieldData: {2×1 cell}
Display the instrument:
instdisp(InstSet)
Index Type Spread Settle Maturity FloatReset Basis Principal EndMonthRule CapRate FloorRate 1 Float 50 01-Nov-2012 01-Nov-2015 1 0 100 1 Inf -Inf Index Type UnderInd OptSpec Strike ExerciseDates AmericanOpt 2 OptFloat 1 call 100 01-Nov-2015 0
Input Arguments
Indices pointing to underlying instruments of Type
'Float' specified by a
NINST-by-1 vector. The instruments
of Type
'Float' are also stored in the InstSet
variable. For more information, see instfloat.
Data Types: double
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
Option strike price values for option (European, Bermuda, or American)
specified as nonnegative integers using as
NINST-by-NSTRIKES vector of strike
price values.
For a European or Bermuda option —
NINST-by-NSTRIKESmatrix of strike price values. Each row is the schedule for one option. If an option has fewer thanNSTRIKESexercise opportunities, the end of the row is padded withNaNs.For an American Option —
NINST-by-1vector of strike price values for each option.
Data Types: double
Exercise date for option (European, Bermuda, or American), specified as a
NINST-by-NSTRIKES or
NINST-by-2 vector using a datetime
array, string array, or date character vectors, depending on the option
type.
For a European or Bermuda option —
NINST-by-NSTRIKESmatrix of exercise dates. Each row is the schedule for one option. For a European option, there is only oneExerciseDateon the option expiry dateFor an American option —
NINST-by-2vector 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-NaNdate is listed, or ifExerciseDatesisNINST-by-1, the option can be exercised between the underlying bondSettledate and the single listedExerciseDate.
To support existing code, instoptfloat also
accepts serial date numbers as inputs, but they are not recommended.
Option type specified as NINST-by-1
positive integer scalar flags with values.
For a European or Bermuda option —
AmericanOptis0for each European or Bermuda option.For an American option —
AmericanOptis1for each American option. TheAmericanOptargument is required to invoke American exercise rules.
Data Types: single | double
Variable containing an existing collection of instruments, specified as a
struct. For more information on the InstSet variable, see
instget.
Data Types: struct
Output Arguments
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.
Data field for instrument type returned as a
NFIELDS-by-1 cell array of
character vectors listing the name of each data field for this instrument
type.
Data class of each field returned as
aNFIELDS-by-1 cell array of
character vectors listing the data class of each field. The class determines
how arguments are parsed.
Type of instrument added returned as a character vector. The character
vector for a floating-rate option instrument is
TypeString = 'OptFloat'.
More About
A floating-rate note option is a put or call option on a floating-rate note.
Financial Instruments Toolbox™ supports three types of put and call options on floating-rate notes:
American option — An option that you exercise any time until its expiration date.
European option — An option that you exercise only on its expiration date.
Bermuda option — A Bermuda option resembles a hybrid of American and European options; you can only exercise it on predetermined dates, usually monthly.
For more information, see Floating-Rate Note Options.
Version History
Introduced in R2013aAlthough instoptfloat supports serial date numbers,
datetime values are recommended instead. The
datetime data type provides flexible date and time
formats, storage out to nanosecond precision, and properties to account for time
zones and daylight saving time.
To convert serial date numbers or text to datetime values, use the datetime function. For example:
t = datetime(738427.656845093,"ConvertFrom","datenum"); y = year(t)
y =
2021
There are no plans to remove support for serial date number inputs.
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.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- 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)