Main Content

cap

Price caps using Normal or Bachelier pricing model

Description

例子

[[卡普里斯,,,,帽子] = capbynormal(r一个teSpec,,,,Strike,,,,定居,,,,Maturity,,,,挥发性价格上限使用普通(BACELIE)定价模型的负价上限。capcomputes prices of vanilla caps and amortizing caps.

例子

[[卡普里斯,,,,帽子] = capbynormal(___,,,,名称,价值一个dds optional name-value pair arguments.

Examples

collapse all

考虑一个投资者,该投资者签订了一份合同,该合同将100,000美元贷款的利率限制为季度的季度复合3个月,从2009年1月1日开始。复合和波动率为20%,使用此数据计算上限价格。首先,计算r一个teSpec,然后使用cap计算卡普里斯

估值日期='Jan-01-2008';EndDates ='April-01-2010';r一个tes = 0.0069394; Compounding = -1; Basis = 1; RateSpec = intenvset(“评估日期”,评估日期,...“开始日”,评估日期,'EndDates',终点,...'Rates',,,,r一个tes,'Compounding',,,,Compounding,'Basis', 基础);定居='Jan-01-2009';百分比从一年开始成熟度=“ 2009年4月1日”;波动率= 0.20;caprate = -0.008;capReset = 4;校长= 100000;capprice = capbynormal(Ratesspec,Caprate,setter,Ederity,Everations,lopatition ,,...'Reset',,,,C一个preset,“评估日期”,评估日期,'主要的',,,,Principal,...'Basis',,,,Basis)
卡普里斯= 2.1682e+03

Define ther一个teSpec

settle = datenum('20 -Jan-2016');ZeroTimes = [.5 1 2 3 4 5 7 10 20 30]'; ZeroRates = [0.0052 0.0055 0.0061 0.0073 0.0094 0.0119 0.0168 0.0222 0.0293 0.0307]'; ZeroDates = datemnth(Settle,12*ZeroTimes); RateSpec = intenvset('开始日期',定居,'EndDates',,,,ZeroDates,'Rates',Zerorates)
Ratespec =结构with fields:FinObj: 'RateSpec' Compounding: 2 Disc: [10x1 double] Rates: [10x1 double] EndTimes: [10x1 double] StartTimes: [10x1 double] EndDates: [10x1 double] StartDates: 736349 ValuationDate: 736349 Basis: 0 EndMonthRule: 1

定义帽仪器和价格Capbyblk

锻炼= datenum('20-Jan-2026');[[~,ParSwapRate] = swapbyzero(RateSpec,[NaN 0],Settle,ExerciseDate)
parswaprate = 0.0216
罢工= .01;blackvol = .3;stransvol = blackvol*parswaprate;价格= capbyblk(Ratesspec,罢工,定居,锻炼,blackvol)
价格= 11.8693

使用帽仪器使用cap

Price_Normal = capbynormal(RateSpec,Strike,Settle,ExerciseDate,NormalVol)
Price_normal = 12.5495

使用帽仪器使用cap负面打击。

PRICE_Normal = capbynormal(Ratesspec, - 。005,定居点,锻炼,常规)
Price_Normal = 24.4816

输入参数

collapse all

利率期限结构(年度化和连续复合),由r一个teSpec从...获取IntenVSet。有关利率规范的信息,请参阅IntenVSet

数据类型:结构

行使上限的比率,指定为NINST-by-1向量of decimal values.

数据类型:double

CAP的结算日期,指定为NINST-by-1串行日期数,日期字符向量,日期对象或字符串对象的向量。

数据类型:double|char|datetime|细绳

Maturity date for the cap, specified as aNINST-by-1串行日期数,日期字符向量,日期对象或字符串对象的向量。

数据类型:double|char|datetime|细绳

正常波动值,,,,specified as aNINST-by-1向量of numeric values.

For more information on the Normal model, see使用功能处理负利率负利率

数据类型:double

名称值参数

指定可选的逗号分隔对名称,价值一个rguments.姓名是参数名称和Valueis the corresponding value.姓名must appear inside quotes. You can specify several name and value pair arguments in any order as姓名1,,,,Value1,...,NameN,ValueN

Example:[capprice,caplets] = capbynormal(Ratesspec,罢工,定居点,成熟度,波动性,“重置”,capreset,'principtal',100000,“基础”,7)

每年重置频率付款,指定为逗号分隔对'Reset'一个nd aNINST-by-1向量。

数据类型:double

名义本金金额,指定为逗号分隔对'主要的'一个nd aNINST-by-1of notional principal amounts, or aNINST-by-1单元阵列。每个元素NINST-by-1单元阵列是一个NumDates-by-2单元阵列,第一列是日期,第二列是相关的主量。日期表示主值有效的最后一天。

UsePrincipal至p一个ss a schedule to compute the price for an amortizing cap.

数据类型:double|cell

Day-count basis of instrument representing the basis used when annualizing the input forward rate, specified as the comma-separated pair consisting of'Basis'一个nd aNINST-by-1向量of integers. Values are:

  • 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(ICMA)

  • 11= 30/360E (ICMA)

  • 12 =实际/365(ISDA)

  • 13= BUS/252

For more information, seeBasis

数据类型:double

Observation date of the investment horizon, specified as the comma-separated pair consisting of“评估日期”一个nd a serial date number, date character vector, datetime object, or string array.

数据类型:double|char|datetime|细绳

用于投影未来现金流的利率曲线,指定为逗号分隔的一对“投影”一个nd rate curve structure. This structure must be created usingIntenVSet。Use this optional input if the forward curve is different from the discount curve.

数据类型:结构

输出参数

collapse all

Expected price of the cap, returned as aNINST-by-1向量。

帽子,返回NINST-by-NCF一个rr一个y of caplets, padded withs。

更多关于

collapse all

C一个p

一个capis a contract that includes a guarantee that sets the maximum interest rate to be paid by the holder, based on an otherwise floating interest rate.

The payoff for a cap is:

max (( C r r e n t r 一个 t e - C 一个 p r 一个 t e ,,,, 0

For more information, seeC一个p

在R2017A中引入