# blackvolbysabr

Calculate implied Black volatility using SABR model

## Syntax

``outVol = blackvolbysabr(Alpha,Beta,Rho,Nu,Settle,ExerciseDate,ForwardValue,Strike)``
``outVol = blackvolbysabr(___,Name,Value)``

## Description

example

````outVol = blackvolbysabr(Alpha,Beta,Rho,Nu,Settle,ExerciseDate,ForwardValue,Strike)` calculates the implied Black volatility using the SABR stochastic volatility model.```

example

````outVol = blackvolbysabr(___,Name,Value)` adds optional name-value pair arguments.```

## Examples

collapse all

Define the model parameters and option data.

```ForwardRate = 0.0357; Strike = 0.03; Alpha = 0.036; Beta = 0.5; Rho = -0.25; Nu = 0.35; Settle = datenum('15-Sep-2013'); ExerciseDate = datenum('15-Sep-2015');```

Compute the Black volatility using the SABR model.

```ComputedVols = blackvolbysabr(Alpha, Beta, Rho, Nu, Settle, ... ExerciseDate, ForwardRate, Strike)```
```ComputedVols = 0.2122 ```

Define the model parameters and option data with a negative strike.

```ForwardRate = 0.0002; Strike = -0.001; % -0.1% strike. Alpha = 0.01; Beta = 0.5; Rho = -0.1; Nu = 0.15; Shift = 0.005; % 0.5 percent shift Settle = datenum('1-Mar-2016'); ExerciseDate = datenum('1-Mar-2017');```

Compute the Shifted Black volatility using the Shifted SABR model.

```ComputedVols = blackvolbysabr(Alpha, Beta, Rho, Nu, Settle, ... ExerciseDate, ForwardRate, Strike, 'Shift', Shift)```
```ComputedVols = 0.1518 ```

## Input Arguments

collapse all

Current SABR volatility, specified as a scalar.

Data Types: `double`

SABR CEV exponent, specified as a scalar.

Data Types: `double`

Correlation between forward value and volatility, specified as a scalar.

Data Types: `double`

Volatility of volatility, specified as a scalar.

Data Types: `double`

Settlement date, specified as a scalar using a serial nonnegative date number or date character vector.

Data Types: `double` | `char`

Option exercise date, specified as a scalar using a serial nonnegative date number or date character vector.

Data Types: `double` | `char`

Current forward value of the underlying asset, specified as a scalar or vector of size `NumVols`-by-`1`.

Data Types: `double`

Option strike price values, specified as a scalar value or a vector of size `NumVols`-by-`1`.

Data Types: `double`

### Name-Value 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 quotes. You can specify several name and value pair arguments in any order as `Name1,Value1,...,NameN,ValueN`.

Example: ```outVol = blackvolbysabr(Alpha,Beta,Rho,Nu,Settle,ExerciseDate,ForwardValue,Strike,'Basis',2,'Model','Obloj2008')```

Day-count basis of the instrument, specified as the comma-separated pair consisting of `'Basis'` and a positive integer of the set `[1...13]`.

• 0 = actual/actual

• 1 = 30/360 (SIA)

• 2 = actual/360

• 3 = actual/365

• 4 = 30/360 (PSA)

• 5 = 30/360 (ISDA)

• 6 = 30/360 (European)

• 7 = actual/365 (Japanese)

• 8 = actual/actual (ICMA)

• 9 = actual/360 (ICMA)

• 10 = actual/365 (ICMA)

• 11 = 30/360E (ICMA)

• 12 = actual/365 (ISDA)

• 13 = BUS/252

Data Types: `double`

Version of SABR model, specified as the comma-separated pair consisting of `'Model'` and one of the following values:

• `'Hagan2002'` — Original version by Hagan et al. (2002)

• `'Obloj2008'` — Version by Obloj (2008)

Data Types: `char`

Shift in decimals for the shifted SABR model (to be used with the Shifted Black model), specified as the comma-separated pair consisting of `'Shift'` and a scalar positive decimal value. Set this parameter to a positive shift in decimals to add a positive shift to `ForwardValue` and `Strike`, which effectively sets a negative lower bound for `ForwardValue` and `Strike`. For example, a `Shift` value of 0.01 is equal to a 1% shift.

Data Types: `double`

## Output Arguments

collapse all

Implied Black volatility computed by SABR model, returned as a scalar or vector of size `NumVols`-by-`1`.

## Algorithms

The SABR stochastic volatility model treats the underlying forward $\stackrel{^}{F}$ and volatility $\stackrel{^}{\alpha }$ as separate random processes, which are related with correlation $\rho$:

`$\begin{array}{l}d\stackrel{^}{F}=\stackrel{^}{\alpha }{\stackrel{^}{F}}^{\beta }d{W}_{1}\\ d\stackrel{^}{\alpha }=v\stackrel{^}{\alpha }d{W}_{2}\\ d{W}_{1}d{W}_{2}=\rho dt\\ \stackrel{^}{F}\left(0\right)=F\\ \stackrel{^}{\alpha }\left(0\right)=\alpha \end{array}$`

where

• $\stackrel{^}{F}$ is the underlying forward (a variable).

• $F$ is the current underlying forward (a constant).

• $\stackrel{^}{\alpha }$ is the SABR volatility (a variable).

• $\alpha$ is the current SABR volatility (a constant).

• $\beta$ is the SABR constant elasticity of variance (CEV) exponent.

• $\upsilon$ is the volatility of volatility.

• $d{W}_{1}$ is Brownian motion.

• $d{W}_{2}$ is Brownian motion.

• $\rho$ is the correlation between forward value and volatility.

In contrast, Black's lognormal model assumes a constant volatility, ${\sigma }_{B}$.

`$d\stackrel{^}{F}={\sigma }_{B}\stackrel{^}{F}dW$`

Hagan et al. (2002) derived the following closed-form approximation of implied Black lognormal volatility (${\sigma }_{B}$) for the SABR model

`$\begin{array}{l}{\sigma }_{B}\left(F,K\right)=\frac{\alpha \left\{1+\left[\frac{{\left(1-\beta \right)}^{2}}{24}\frac{{\alpha }^{2}}{{\left(FK\right)}^{1-\beta }}+\frac{1}{4}\frac{\rho \beta \upsilon \alpha }{{\left(FK\right)}^{\left(1-\beta \right)/2}}+\frac{2-3{\rho }^{2}}{24}{\upsilon }^{2}\right]T+...\right\}}{{\left(FK\right)}^{\left(1-\beta \right)/2}\left\{1+\frac{{\left(1-\beta \right)}^{2}}{24}{\mathrm{log}}^{2}\left(F/K\right)+\frac{{\left(1-\beta \right)}^{4}}{1920}{\mathrm{log}}^{4}\left(F/K\right)+...\right\}}\left(\frac{z}{x\left(z\right)}\right)\\ z=\frac{\upsilon }{\alpha }{\left(}^{F}\mathrm{log}\left(F/K\right)\\ x\left(z\right)=\mathrm{log}\left\{\frac{\sqrt{1-2\rho z+{z}^{2}}+z-\rho }{1-\rho }\right\}\end{array}$`

where

• $F$ is the current forward value of the underlying.

• $\alpha$ is the current SABR volatility.

• $K$ is the strike value.

• $T$ is the time to option maturity.

Obloj (2008) advocated the following closed-form approximation of implied Black lognormal volatility for the SABR model (for $\beta <1$)

`$\begin{array}{l}{\sigma }_{B}\left(F,K\right)=\frac{\upsilon \mathrm{log}\left(F/K\right)}{x\left(z\right)}\left\{1+\left[\frac{{\left(1-\beta \right)}^{2}}{24}\frac{{\alpha }^{2}}{{\left(FK\right)}^{1-\beta }}+\frac{1}{4}\frac{\rho \beta \upsilon \alpha }{{\left(FK\right)}^{\left(1-\beta \right)/2}}+\frac{2-3{\rho }^{2}}{24}{\upsilon }^{2}\right]T+...\right\}\\ z=\frac{\upsilon }{\alpha }\frac{{F}^{\left(1-\beta \right)}-{K}^{\left(1-\beta \right)}}{1-\beta }\\ x\left(z\right)=\mathrm{log}\left\{\frac{\sqrt{1-2\rho z+{z}^{2}}+z-\rho }{1-\rho }\right\}\end{array}$`

These expressions can be simplified in special situations, such as the at-the-money ($F=K$ ) and stochastic lognormal ($\beta$ = 1) cases [1,2].

## References

[1] Hagan, P. S., D. Kumar, A.S. Lesniewski, and D.E. Woodward. “Managing Smile Risk.” Wilmott Magazine, September, pp. 84–108, 2002.

[2] Obloj, J. “Fine-tune your smile: Correction to Hagan et. al.” Wilmott Magazine, 2008.