Instswaption
构建交换仪器
句法
Description
至specify an American swaption.InstSet
= instswaption(___,,,,一个mericanOpt
,,,,SwapReset
,,,,Basis
,,,,Principal
)
至add swaption instruments to an instrument variable.InstSet
= instswaption(Instsetold
,,,,___)
Examples
创建两个交换器械
此示例显示了如何使用以下数据创建两种欧洲交换工具。
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
OPTSPEC
-选项的定义
字符向量的单元格数with values'call'
or'put'
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
Strike
-罢工掉期利率值
向量
罢工掉期利率值,,,,specified as aNINST
-by-1
向量。
Data Types:double
锻炼
-期权锻炼日期
serial date number|date character vector
选项练习日期,指定为日期字符向量或序列日期编号的向量,其中每一行是一个选项的时间表,每行的最后一个元素必须与树的成熟度相同。
对于欧洲选项,请使用
NINST
-by-1
运动日期的向量。Each row is the schedule for one option. For a European option, there is only one运动
在期权到期日期。For an American option, use a
NINST
-by-2
运动日期的向量。对于每种仪器,可以在该行上的任何优惠券日期或包括一对日期之间行使该选项。如果只有一个非南
列出了日期,或者锻炼
isNINST
-by-1
,可以在基础交换之间行使该选项定居
and the single listed运动
。
Data Types:double
|char
Spread
-Number of basis points over the reference rate
非负整数|向量of nonnegative integers
参考率的基点数,指定为工具数量的非负整数向量(NINST
)-by-1
)。
Data Types:单身的
|double
定居
-定居每次交换的日期
serial date number|date character vector
定居每次交换的日期,,,,specified as aNINST
-by-1
日期字符向量或序列日期编号的向量。
Data Types:char
|double
Maturity
-Maturity date for each swap
serial date number|date character vector
Maturity date for each swap, specified as aNINST
-by-1
日期字符向量或序列日期编号的向量。
Data Types:char
|double
一个mericanOpt
-Option type
0
欧洲的(默认)|integer with values0
or1
(Optional) Option type, specified asNINST
-by-1
具有值的整数标志:
0
-欧洲的1
-一个merican
这一个mericanOpt
援引美国锻炼规则需要论点。
Data Types:double
SwapReset
-Reset frequency per year for each leg
1
(默认)|numeric
(Optional) Reset frequency per year for each leg, specified as aNINST
-by-1
向量orNINST
-by-2
矩阵。如果SwapReset
isNINST
-by-2
,,,,the first column represents the receiving leg, while the second column represents the paying leg.
Data Types:double
Basis
-Day-count basis of instrument
0
(actual/actual)(默认)|整数来自0
至13
(Optional) Day-count basis of the instrument, specified as aNINST
-by-1
向量orNINST
-by-2
matrix representing the basis for each leg. IfBasis
isNINST
-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
Principal
-名义本金
100
(默认)|numeric
(可选)名义本金,指定为NINST
-by-1
向量。
Data Types:double
Instsetold
-Variable containing an existing collection of instruments
struct
包含现有仪器集合的变量,指定为结构。仪器按类型进行分类;每种类型都可以具有不同的数据字段。存储的数据字段是每个仪器的行矢量或字符向量。这Instsetold
argument is specified only when adding swaption instruments to an existing instrument set. For more information on theInstSet
variable, seeinstget
。
Data Types:struct
输出参数
InstSet
- 包含乐器收集的变量
向量
(可选)包含仪器集合的变量。仪器按类型分解,每种类型都可以具有不同的数据字段。每个存储的数据字段都有每个仪器的行矢量或字符向量。有关有关的更多信息InstSet
variable, seeinstget
。
Data Types:double
fieldlist
- 此仪器类型的每个数据字段的名称
字符向量的单元格数
该仪器类型的每个数据字段的名称,返回为NFIELDS
-by-1
字符矢量的细胞阵列。
Data Types:char
|cell
classList
-Data class of each field
具有价值的角色向量:'dble'
,,,,'日期'
, 或者'char'
。
每个字段的数据类,returned as aNFIELDS
-by-1
字符矢量的细胞阵列。有效的角色向量是'dble'
,,,,'日期'
,,,,and'char'
。
Data Types:char
|cell
打字
-Type of instrument added
character vector
Type of instrument added, returned as a character vector (for a swaption,打字= 'Swaption'
)。
Data Types:char
版本历史记录
Abrir Ejemplo
Tiene unaversiónmodificada de esjemplo。„ Desea abrir este ejemplo con s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s ejemplo?
Comando de MATLAB
Ha Hecho Clic en ener eNRACE que对应了este comando de matlab:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
Select a Web Site
选择一个网站以获取可用的翻译内容,并查看本地事件和优惠。根据您的位置,我们建议您选择:。
You can also select a web site from the following list:
如何获得最佳网站性能
选择中国网站(中文或英语)以获得最佳场地性能。其他Mathworks乡村网站未针对您所在的访问进行优化。
一个mericas
- 一个mérica Latina(Español)
- Canada(English)
- United States(English)