Main Content

Instswaption

构建交换仪器

Description

例子

InstSet= instswaption(OPTSPEC,,,,Strike,,,,锻炼,,,,Spread,,,,定居,,,,Maturity指定欧洲交换。

填写未指定的条目向量。创建工具只需要一个数据参数。其他人可能被省略或通过空矩阵[[]

例子

InstSet= instswaption(___,,,,一个mericanOpt,,,,SwapReset,,,,Basis,,,,Principal至specify an American swaption.

例子

InstSet= instswaption(Instsetold,,,,___至add swaption instruments to an instrument variable.

例子

[[fieldlist,,,,classList,,,,打字] = instswaption至list field metadata for the swaption instrument.

Examples

collapse all

此示例显示了如何使用以下数据创建两种欧洲交换工具。

OPTSPEC= {'Call';'Put'};罢工= .05;行使='1月1日至2011年';Spread=0; Settle ='jan-1-2007';成熟度='1月1日至2012年;一个mericanOpt = 0; InstSet = instswaption(OptSpec, Strike, ExerciseDates, Spread, Settle, Maturity,...AmericanOpt);%使用InstdiSP查看欧洲交换工具Instdisp(Instset)
Index Type OptSpec Strike ExerciseDates Spread Settle Maturity AmericanOpt SwapReset Basis Principal FloatBasis FixedBasis FloatReset FixedReset 1 Swaption Call 0.05 01-Jan-2011 0 01-Jan-2007 01-Jan-2012 0 1 0 100 NaN NaN NaN NaN 2 Swaption Put 0.05 01-Jan-2011 0 01-Jan-2007 01-Jan-2012 0 1 0 100 NaN NaN NaN NaN

This example shows how to create two European swaption instruments with receiving and paying legs using the following data.

OPTSPEC= {'Call';'Put'};罢工= .05;行使='1月1日至2011年';Spread=0; Settle ='jan-1-2007';成熟度='1月1日至2012年;一个mericanOpt = 0; SwapReset = [2 4];%第一列表示接收腿,第二列表示付费腿基础= [1 3];%第一列表示接收腿,第二列表示付费腿Instset = Instswaption(OPTSPEC,,,,Strike,ExerciseDates,AmericanOpt,Spread,Settle,Maturity,...SwapReset,Basis);

使用使用instdisp

Instdisp(Instset)
索引类型Optspec罢工行使扩散成熟期AmericApt Swapreset基础主要floatbasis fielatbasis fielatbasis floatreset fielatreset fileadreset 1 Swaption call呼叫0.05 01-JAN-2011 0 0 0 01-JAN-JAN-2007 NAN 2 4 NAN 2 4 1 3 100 NAN NAN NAN NAN NAN NAN NAN 2 STWAPTION 2 STWAPTION 2 STWAPTION 2 swaption put 0.05 01-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan-Jan2011 0 0 0 0 01- 1007 NAN 2 4 1 3 100 NAN NAN NAN NAN NAN NAN

Input Arguments

collapse all

Definition of the option as'call'or'put',,,,specified as aNINST-by-1字符向量的单元格数with values'call'or'put'。一个'call'swaption entitles the buyer to pay the fixed rate. A'put'swaption entitles the buyer to receive the fixed rate.

Data Types:char|cell

罢工掉期利率值,,,,specified as aNINST-by-1向量。

Data Types:double

选项练习日期,指定为日期字符向量或序列日期编号的向量,其中每一行是一个选项的时间表,每行的最后一个元素必须与树的成熟度相同。

  • 对于欧洲选项,请使用NINST-by-1运动日期的向量。Each row is the schedule for one option. For a European option, there is only one运动在期权到期日期。

  • For an American option, use aNINST-by-2运动日期的向量。对于每种仪器,可以在该行上的任何优惠券日期或包括一对日期之间行使该选项。如果只有一个非列出了日期,或者锻炼isNINST-by-1,可以在基础交换之间行使该选项定居and the single listed运动

Data Types:double|char

参考率的基点数,指定为工具数量的非负整数向量(NINST)-by-1)。

Data Types:单身的|double

定居每次交换的日期,,,,specified as aNINST-by-1日期字符向量或序列日期编号的向量。

Data Types:char|double

Maturity date for each swap, specified as aNINST-by-1日期字符向量或序列日期编号的向量。

Data Types:char|double

(Optional) Option type, specified asNINST-by-1具有值的整数标志:

  • 0-欧洲的

  • 1-一个merican

一个mericanOpt援引美国锻炼规则需要论点。

Data Types:double

(Optional) Reset frequency per year for each leg, specified as aNINST-by-1向量orNINST-by-2矩阵。如果SwapResetisNINST-by-2,,,,the first column represents the receiving leg, while the second column represents the paying leg.

Data Types:double

(Optional) Day-count basis of the instrument, specified as aNINST-by-1向量orNINST-by-2matrix representing the basis for each leg. IfBasisisNINST-by-2,,,,the first column represents the receiving leg, while the second column represents the paying leg.

  • 0 =实际/实际/实际

  • 1 = 30/360(SIA)

  • 2= actual/360

  • 3 =实际/365

  • 4 = 30/360 (PSA)

  • 5 = 30/360(ISDA)

  • 6 = 30/360(欧洲)

  • 7 =实际/365(日语)

  • 8 =实际/实际(ICMA)

  • 9 = actual/360 (ICMA)

  • 10 =实际/ 365(国际)

  • 11= 30/360E (ICMA)

  • 12 =实际/365(ISDA)

  • 13= BUS/252

For more information, seeBasis

Data Types:double

(可选)名义本金,指定为NINST-by-1向量。

Data Types:double

包含现有仪器集合的变量,指定为结构。仪器按类型进行分类;每种类型都可以具有不同的数据字段。存储的数据字段是每个仪器的行矢量或字符向量。这Instsetoldargument is specified only when adding swaption instruments to an existing instrument set. For more information on theInstSetvariable, seeinstget

Data Types:struct

输出参数

collapse all

(可选)包含仪器集合的变量。仪器按类型分解,每种类型都可以具有不同的数据字段。每个存储的数据字段都有每个仪器的行矢量或字符向量。有关有关的更多信息InstSetvariable, seeinstget

Data Types:double

该仪器类型的每个数据字段的名称,返回为NFIELDS-by-1字符矢量的细胞阵列。

Data Types:char|cell

每个字段的数据类,returned as aNFIELDS-by-1字符矢量的细胞阵列。有效的角色向量是'dble',,,,'日期',,,,and'char'

Data Types:char|cell

Type of instrument added, returned as a character vector (for a swaption,打字= 'Swaption')。

Data Types:char

版本历史记录

Introduced before R2006a