# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# capvolstrip

Strip caplet volatilities from flat cap volatilities

## Syntax

``````[CapletVols,CapletPaymentDates,CapStrikes] = capvolstrip(ZeroCurve,CapSettle,CapMaturity,CapVolatility)``````
``````[CapletVols,CapletPaymentDates,CapStrikes] = capvolstrip(___,Name,Value)``````

## Description

example

``````[CapletVols,CapletPaymentDates,CapStrikes] = capvolstrip(ZeroCurve,CapSettle,CapMaturity,CapVolatility)``` strips caplet volatilities from the flat cap volatilities by using the bootstrapping method. The cap volatilities are interpolated on each caplet payment date before stripping the caplet volatilities.```

example

``````[CapletVols,CapletPaymentDates,CapStrikes] = capvolstrip(___,Name,Value)``` adds optional name-value pair arguments. The cap volatilities are interpolated on each caplet payment date before stripping the caplet volatilities.```

## Examples

collapse all

Compute the zero curve for discounting and projecting forward rates.

```ValuationDate = datenum('23-Jun-2015'); ZeroRates = [0.01 0.09 0.30 0.70 1.07 1.71]/100; CurveDates = datemnth(ValuationDate, [0.25 0.5 1 2 3 5]*12); ZeroCurve = IRDataCurve('Zero',ValuationDate,CurveDates,ZeroRates)```
```ZeroCurve = Type: Zero Settle: 736138 (23-Jun-2015) Compounding: 2 Basis: 0 (actual/actual) InterpMethod: linear Dates: [6x1 double] Data: [6x1 double] ```

Define the ATM cap volatility data.

```CapSettle = datenum('25-Jun-2015'); CapMaturity = datenum({'27-Jun-2016';'26-Jun-2017';'25-Jun-2018'; ... '25-Jun-2019';'25-Jun-2020'}); CapVolatility = [0.29;0.38;0.42;0.40;0.38];```

Strip caplet volatilities from ATM caps.

```[CapletVols, CapletPaymentDates, ATMCapStrikes] = capvolstrip(ZeroCurve, ... CapSettle, CapMaturity, CapVolatility); PaymentDates = cellstr(datestr(CapletPaymentDates)); format; table(PaymentDates, CapletVols, ATMCapStrikes)```
```ans=9x3 table PaymentDates CapletVols ATMCapStrikes _____________ __________ _____________ '27-Jun-2016' 0.29 0.0052014 '27-Dec-2016' 0.34657 0.0071594 '26-Jun-2017' 0.41404 0.0091175 '26-Dec-2017' 0.42114 0.010914 '25-Jun-2018' 0.45297 0.012698 '26-Dec-2018' 0.37257 0.014222 '25-Jun-2019' 0.36184 0.015731 '26-Dec-2019' 0.3498 0.017262 '25-Jun-2020' 0.33668 0.018774 ```

Compute the zero curve for discounting and projecting forward rates.

```ValuationDate = datenum('17-Feb-2015'); ZeroRates = [0.02 0.07 0.25 0.70 1.10 1.62]/100; CurveDates = datemnth(ValuationDate, [0.25 0.5 1 2 3 5]*12); ZeroCurve = IRDataCurve('Zero',ValuationDate,CurveDates,ZeroRates)```
```ZeroCurve = Type: Zero Settle: 736012 (17-Feb-2015) Compounding: 2 Basis: 0 (actual/actual) InterpMethod: linear Dates: [6x1 double] Data: [6x1 double] ```

Define the cap volatility data.

```CapSettle = datenum('19-Feb-2015'); CapMaturity = datenum({'19-Feb-2016';'21-Feb-2017';'20-Feb-2018'; ... '19-Feb-2019';'19-Feb-2020'}); CapVolatility = [0.44;0.45;0.44;0.41;0.39]; CapStrike = 0.013;```

Strip caplet volatilities from caps with the same strike.

```[CapletVols, CapletPaymentDates, CapStrikes] = capvolstrip(ZeroCurve, ... CapSettle, CapMaturity, CapVolatility, 'Strike', CapStrike); PaymentDates = cellstr(datestr(CapletPaymentDates)); format; table(PaymentDates, CapletVols, CapStrikes)```
```ans=9x3 table null PaymentDates CapletVols CapStrikes _____________ __________ __________ '19-Feb-2016' 0.44 0.013 '19-Aug-2016' 0.44495 0.013 '21-Feb-2017' 0.45256 0.013 '21-Aug-2017' 0.43835 0.013 '20-Feb-2018' 0.42887 0.013 '20-Aug-2018' 0.38157 0.013 '19-Feb-2019' 0.35237 0.013 '19-Aug-2019' 0.3525 0.013 '19-Feb-2020' 0.33136 0.013 ```

Compute the zero curve for discounting and projecting forward rates.

```ValuationDate = datenum('06-Mar-2015'); ZeroRates = [0.01 0.08 0.27 0.73 1.16 1.70]/100; CurveDates = datemnth(ValuationDate, [0.25 0.5 1 2 3 5]*12); ZeroCurve = IRDataCurve('Zero',ValuationDate,CurveDates,ZeroRates)```
```ZeroCurve = Type: Zero Settle: 736029 (06-Mar-2015) Compounding: 2 Basis: 0 (actual/actual) InterpMethod: linear Dates: [6x1 double] Data: [6x1 double] ```

Define the cap volatility data.

```CapSettle = datenum('06-Mar-2015'); CapMaturity = datenum({'07-Mar-2016';'06-Mar-2017';'06-Mar-2018'; ... '06-Mar-2019';'06-Mar-2020'}); CapVolatility = [0.43;0.44;0.44;0.43;0.41]; CapStrike = 0.011;```

Specify quarterly and semiannual dates.

```CapletDates = [cfdates(CapSettle, '06-Mar-2016', 4) ... cfdates('06-Mar-2016', '06-Mar-2020', 2)]'; CapletDates(~isbusday(CapletDates)) = ... busdate(CapletDates(~isbusday(CapletDates)), 'modifiedfollow');```

Strip caplet volatilities using specified `CapletDates`.

```[CapletVols, CapletPaymentDates, CapStrikes] = capvolstrip(ZeroCurve, ... CapSettle, CapMaturity, CapVolatility, 'Strike', CapStrike, ... 'CapletDates', CapletDates); PaymentDates = cellstr(datestr(CapletPaymentDates)); format; table(PaymentDates, CapletVols, CapStrikes)```
```ans=11x3 table null PaymentDates CapletVols CapStrikes _____________ __________ __________ '08-Sep-2015' 0.43 0.011 '07-Dec-2015' 0.42999 0.011 '07-Mar-2016' 0.43 0.011 '06-Sep-2016' 0.43538 0.011 '06-Mar-2017' 0.44396 0.011 '06-Sep-2017' 0.43999 0.011 '06-Mar-2018' 0.44001 0.011 '06-Sep-2018' 0.41934 0.011 '06-Mar-2019' 0.40985 0.011 '06-Sep-2019' 0.36818 0.011 '06-Mar-2020' 0.34657 0.011 ```

Compute the zero curve for discounting and projecting forward rates.

```ValuationDate = datenum('1-Mar-2016'); ZeroRates = [-0.38 -0.25 -0.21 -0.12 0.01 0.2]/100; CurveDates = datemnth(ValuationDate, [0.25 0.5 1 2 3 5]*12); ZeroCurve = IRDataCurve('Zero',ValuationDate,CurveDates,ZeroRates) ```
```ZeroCurve = Type: Zero Settle: 736390 (01-Mar-2016) Compounding: 2 Basis: 0 (actual/actual) InterpMethod: linear Dates: [6x1 double] Data: [6x1 double] ```

Define the cap volatility (Shifted Black) data.

```CapSettle = datenum('1-Mar-2016'); CapMaturity = datenum({'1-Mar-2017';'1-Mar-2018';'1-Mar-2019'; ... '2-Mar-2020';'1-Mar-2021'}); CapVolatility = [0.35;0.40;0.37;0.34;0.32]; % Shifted Black volatilities Shift = 0.01; % 1 percent shift. CapStrike = -0.001; % -0.1 percent strike. ```

Strip caplet volatilities from caps using the Shifted Black Model.

```[CapletVols, CapletPaymentDates, CapStrikes] = capvolstrip(ZeroCurve, ... CapSettle,CapMaturity,CapVolatility,'Strike',CapStrike,'Shift',Shift); PaymentDates = string(datestr(CapletPaymentDates)); format; table(PaymentDates,CapletVols,CapStrikes) ```
```ans = 9x3 table PaymentDates CapletVols CapStrikes _____________ __________ __________ "01-Mar-2017" 0.35 -0.001 "01-Sep-2017" 0.39129 -0.001 "01-Mar-2018" 0.4335 -0.001 "04-Sep-2018" 0.35284 -0.001 "01-Mar-2019" 0.3255 -0.001 "03-Sep-2019" 0.3011 -0.001 "02-Mar-2020" 0.27266 -0.001 "01-Sep-2020" 0.27698 -0.001 "01-Mar-2021" 0.25697 -0.001 ```

## Input Arguments

collapse all

Zero rate curve, specified using a `RateSpec` or `IRDataCurve` object containing the zero rate curve for discounting according to its day count convention. `ZeroCurve` is also used for computing the underlying forward rates if the optional argument `ProjectionCurve` is not specified. Its observation date specifies the valuation date. For more information on creating a `RateSpec`, see `intenvset`. For more information on creating an `IRDataCurve` object, see `IRDataCurve`.

Data Types: `struct`

Common cap settle date, specified using serial date numbers or date character vectors. The `CapSettle` date cannot be earlier than the `ZeroCurve` valuation date.

Data Types: `double` | `char`

Cap maturity dates, specified using serial date numbers or date character vectors as a `NCap`-by-`1` vector.

Data Types: `double` | `char`

Flat cap volatilities, specified using positive decimals as a `NCap`-by-`1` vector.

Data Types: `double`

### Name-Value Pair Arguments

Specify optional comma-separated pairs of `Name,Value` arguments. `Name` is the argument name and `Value` is the corresponding value. `Name` must appear inside single quotes (`' '`). You can specify several name and value pair arguments in any order as `Name1,Value1,...,NameN,ValueN`.

Example: ```[CapletVols,CapletPaymentDates,CapStrikes] = capvolstrip(ZeroCurve,CapSettle,CapMaturity,CapVolatility,'Strike',.2)```

collapse all

Cap strike rate, specified as decimals. Use `Strike` to specify a single strike that is equally applied to all caps.

Data Types: `double`

Caplet reset and payment dates, specified as serial date numbers or date character vectors using a `NCapletDates`-by-`1` vector.

Use `CapletDates` to manually specify all caplet reset and payment dates. For example, some date intervals may be quarterly, while others may be semiannual. All dates must be later than `CapSettle` and cannot be later than the last `CapMaturity` date. Dates are adjusted according to the `BusDayConvention` and `Holidays` inputs.

If `CapletDates` is not specified, the default is to automatically generate periodic caplet dates after `CapSettle` based on the last `CapMaturity` date as the reference date, using the following optional inputs: `Reset`, `EndMonthRule`, `BusDayConvention`, and `Holidays`.

Data Types: `double` | `char`

Frequency of periodic payments per year within a cap, specified as a positive integer with values `1`,`2`, `3`, `4`, `6`, or `12`.

### Note

The input for `Reset` is ignored if `CapletDates` is specified.

Data Types: `double`

End-of-month rule flag for generating caplet dates is specified as nonnegative integer [`0`, `1`] using a `NINST`-by-`1` vector.

• `0` = Ignore rule, meaning that a payment date is always the same numerical day of the month.

• `1` = Set rule on, meaning that a payment date is always the last actual day of the month.

Data Types: `logical`

Business day conventions, specified by a character vector or `N`-by-`1` cell array of character vectors of business day conventions. The selection for business day convention determines how non-business days are treated. Non-business days are defined as weekends plus any other date that businesses are not open (e.g. statutory holidays). Values are:

• `actual` — Non-business days are effectively ignored. Cash flows that fall on non-business days are assumed to be distributed on the actual date.

• `follow` — Cash flows that fall on a non-business day are assumed to be distributed on the following business day.

• `modifiedfollow` — Cash flows that fall on a non-business day are assumed to be distributed on the following business day. However if the following business day is in a different month, the previous business day is adopted instead.

• `previous` — Cash flows that fall on a non-business day are assumed to be distributed on the previous business day.

• `modifiedprevious` — Cash flows that fall on a non-business day are assumed to be distributed on the previous business day. However if the previous business day is in a different month, the following business day is adopted instead.

Data Types: `char` | `cell`

Holidays used in computing business days, specified as MATLAB date numbers using an `NHolidays`-by-`1` vector.

Data Types: `double`

Rate curve for computing underlying forward rates, specified as a `RateSpec` or `IRDatCurve` object. For more information on creating a `RateSpec`, see `intenvset` and for more information on creating an `IRDataCurve` object, see `IRDataCurve`.

Data Types: `struct`

Method used when interpolating the cap volatilities on each caplet maturity date before stripping the caplet volatilities, specified using a character vector with values: `linear`, `nearest`, `next`, `previous`, `spline`, or `pchip`. The definitions of the methods are:

• `linear` — Linear interpolation. The interpolated value at a query point is based on linear interpolation of the values at neighboring grid points in each respective dimension. This is the default interpolation method.

• `nearest` — Nearest neighbor interpolation. The interpolated value at a query point is the value at the nearest sample grid point.

• `next` — Next neighbor interpolation. The interpolated value at a query point is the value at the next sample grid point.

• `previous` — Previous neighbor interpolation. The interpolated value at a query point is the value at the previous sample grid point.

• `spline` — Spline interpolation using not-a-knot end conditions. The interpolated value at a query point is based on a cubic interpolation of the values at neighboring grid points in each respective dimension.

• `pchip` — Shape-preserving piecewise cubic interpolation. The interpolated value at a query point is based on a shape-preserving piecewise cubic interpolation of the values at neighboring grid points.

For more information on interpolation methods, see `interp1`.

### Note

Constant extrapolation is used for volatilities falling outside the range of user-supplied data.

Data Types: `char`

Upper bound of implied volatility search interval, specified as a positive scalar decimal.

Data Types: `double`

Implied volatility search termination tolerance, specified as a positive scalar.

Data Types: `double`

Flag indicating whether to omit the first caplet payment in the caps, specified as a scalar logical. For example, the first caplet payment is omitted in spot-starting caps, while it is included in forward-starting caps. Setting this logical to `false` means to always include the first caplet.

In general, “spot lag” is the delay between the fixing date and the effective date for LIBOR-like indices. It also determines whether a cap is spot-starting or forward-starting (Corb, 2012). Caps are considered to be spot-starting if they settle within “spot lag” business days after the valuation date. Those that settle later are considered to be forward-starting. The first caplet is omitted if caps are spot-starting, while it is included if they are forward-starting (Tuckman, 2012).

Data Types: `logical`

Shift in decimals for the shifted SABR model (to be used with the Shifted Black model), specified using a scalar positive decimal value. Set this parameter to a positive shift in decimals to add a positive shift to the forward rate and strike, which effectively sets a negative lower bound for the forward rate and strike. For example, a `Shift` value of 0.01 is equal to a 1% shift.

Data Types: `double`

## Output Arguments

collapse all

Stripped caplet volatilities, returned as a `NCapletVols`-by-`1` vector in decimals.

### Note

`capvolstrip` may output `NaN`s for some caplet volatilities. This could be the case if no volatility matches the caplet price implied by the user-supplied cap data.

Payment dates (in date numbers), returned as a `NCapletVols`-by-`1` vector corresponding to `CapletVols`.

Cap strikes, returned as a `NCapletVols`-by-`1` vector of strikes in decimals for caps maturing on corresponding `CapletPaymentDates`. `CapStrikes` are the same as the strikes of the corresponding caplets that have been stripped.

## Limitations

When bootstrapping the caplet volatilities from ATM caps, the caplet volatilities stripped from the shorter maturity caps are reused in the longer maturity caps without adjusting for the difference in strike. `capvolstrip` follows the simplified approach described in Gatarek, 2006.

collapse all

### ATM

A cap or floor is at-the-money (ATM) if its strike is equal to the forward swap rate.

This is the fixed rate of a swap that makes the present value of the floating leg equal to that of the fixed leg. In comparison, a caplet or floorlet is ATM if its strike is equal to the forward rate (not the forward swap rate). In general (except over a single period), the forward rate is not necessarily equal to the forward swap rate. So, to be precise, the individual caplets in an ATM cap have slightly different moneyness and are actually only approximately ATM (Alexander, 2003). In addition, note that swap rate changes with swap maturity. Similarly, the ATM cap strike also changes with cap maturity, so the ATM cap strikes need to be computed for each cap maturity before stripping the caplet volatilities. As a result, when stripping the caplet volatilities from the ATM caps with increasing maturities, the ATM strikes of the consecutive caps are different.

## References

[1] Alexander, C. “Common Correlation and Calibrating the Lognormal Forward Rate Model.” Wilmott Magazine, 2003.

[2] Corb, H. “Interest Rate Swaps and Other Derivatives.” Columbia Business School Publishing, 2012.

[3] Gatarek, D.P., Bachert, and R. Maksymiuk. The LIBOR Market Model in Practice. Wiley, 2006.

[4] Tuckman, B., Serrat, A. Fixed Income Securities: Tools for Today’s Markets. Wiley Finance, 2012.