Main Content

astoptfloat

Create option instrument on floating-rate note or add instrument to current portfolio

Description

例子

InstSet= instoptfloat(FloatIndex,,,,OPTSPEC,,,,Strike,,,,锻炼为浮动票据指定欧洲选项。

例子

InstSet= instoptfloat(FloatIndex,,,,OPTSPEC,,,,Strike,,,,锻炼,,,,AmericanOptto specify an American or Bermuda option for a floating-rate note.

InstSet= instoptfloat(Instsetold,,,,___将仪器添加到现有投资组合中。

[[fieldlist,,,,classList,,,,打字] = intoptfloat列出了字段元数据'OptFloat'instrument.

Examples

全部收缩

Define the floating-rate note:

定居='Nov-1-2012';成熟度=“ 2015年11月1日”;Spread = 50; Reset = 1;

CreateInstSet

Instset = instfloat(传播,定居,成熟,重置)
InstSet =结构with fields:finoBj:'instruments'距离:[1x1 struct]类型:{'float'} fieldName:{{9x1 cell}} fieldClass:{{9x1 cell}} fieldData:{9x1 cell}}}}

Display the instrument:

Instdisp(Instset)
指数类型传播定居成熟度浮点数基础主要端对底型caprate floortare 1 float 50 01-NOV-2012 01-NOV-2015 1 0 100 1 INF -INF -INF -INF -INF-INF

Add a European call option to the instrument portfolio:

OptSpec ='call';罢工= 100;行使=“ 2015年11月1日”;

CreateInstSet

InstSet = instoptfloat(InstSet, 1, OptSpec, Strike, ExerciseDates)
InstSet =结构with fields:finoBj:“仪器”二十字信息:[1x1 struct]类型:{2x1 cell} fieldName:{2x1 cell} fieldClass:{2x1 cell} fieldData:{2x1 cell}

Display the instrument:

Instdisp(Instset)
指数类型传播定居成熟度浮点数基础主要端对底型caprate floortare 1 float 50 01-NOV-2012 01-NOV-2015 1 0 100 1 INF -INF -INF -INF -INF-INFIndex Type UnderInd OptSpec Strike ExerciseDates AmericanOpt 2 OptFloat 1 call 100 01-Nov-2015 0

输入参数

全部收缩

指向基础工具的指数Type'漂浮'由a指定NINST-by-1向量。这instruments ofType'漂浮'也存储在InstSetvariable. For more information, seeinstfloat

数据类型:双倍的

选项的定义as'call'or'put'specified as aNINST-by-1字符向量的单元格数for'call'or'put'

数据类型:char|cell

期权罢工价格价值(欧洲,百慕大或美国)指定为非负整数使用ASNINST-by-NSTRIKES罢工价格值的向量。

  • 对于欧洲或百慕大的选择 -NINST-by-NSTRIKES罢工价格值的矩阵。每行都是一个选项的时间表。如果选项的少于NSTRIKESexercise opportunities, the end of the row is padded withs。

  • For an American Option —NINST-by-1每个选项的罢工价格值的向量。

数据类型:单身的|双倍的

期权的锻炼日期(欧洲,百慕大或美国),指定为串行日期数字或日期角色向量NINST-by-NSTRIKESorNINST-by-2向量of for the option exercise dates, depending on the option type.

  • 对于欧洲或百慕大的选择 -NINST-by-NSTRIKES运动日期的矩阵。每行都是一个选项的时间表。对于欧洲选择,只有一个运动在期权到期日期

  • 对于美国选择 -NINST-by-2矢量的运动边界。为每个instrument, the option can be exercised on any coupon date between or including the pair of dates on that row. If only one non-列出了日期,或者锻炼NINST-by-1,可以在基础债券之间行使该选项定居日期和列出的单曲运动

数据类型:双倍的|char|cell

选项类型指定为NINST-by-1带有值的正整数标量标志。

  • 对于欧洲或百慕大的选择 -AmericanOpt0for each European or Bermuda option.

  • 对于美国选择 -AmericanOpt1对于每个美国选项。这AmericanOpt援引美国锻炼规则需要论点。

数据类型:单身的|双倍的

包含现有仪器集合的变量,指定为结构。有关有关的更多信息InstSetvariable, seeinstget

数据类型:结构

输出参数

全部收缩

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 theInstSetvariable, seeinstget

仪器类型的数据字段返回NFIELDS-by-1字符向量的单元格数字列出了此仪器类型的每个数据字段的名称。

每个字段的数据类都返回NFIELDS-by-1字符向量的单元格数listing the data class of each field. The class determines how arguments are parsed.

添加的仪器类型作为角色向量返回。浮动速率选项仪器的角色向量是打字='OptFloat'

版本历史记录

Introduced in R2013a