Bloom Berg) Volatility Cube
Bloom Berg) Volatility Cube
Bloom Berg) Volatility Cube
And Use.
Pat Hagan, Michael Konikov
20th July 2004
1 Introduction.
This document describes how to create a volatility cube object. The volatility
cube object is an object that takes as input a yield curve, cap volatility
matrix, swaption volatility matrix, and, possibly, eurodollar future option
(EDFO) prices, and is able to compute a swaption volatility for any given
triplet of option tenor, swap tenor, and strike. This object will be used in all
the nonstandard vanilla deal pricing and all the exotic deal pricing.
Figure 1 explains the inputs and the geometry of the volatility cube.
Caplet volatilities that will be stripped from the given cap volatilities fill one
face of the cube, since caplets are a special case of swaptions with swap tenor
equal typically three months (at least for USD). Swaption volatility matrix,
on the other hand, is given for all the swaption tenors both in option and swap
directions, but only at-the-money, i.e, only for a strike equal corresponding
swap rate. From this inputs, possibly using EDFO prices instead of short
term caplets, we need to fill the whole cube of swaption volatilities for all
option terms, swap terms and strikes.
The construction of the volatility cube object consists of the following
steps. If we include eurodollar future option prices in our construction (ED-
FOs for short), we first calculate implied Black volatilities from EDFOs
prices. Then we interpolate those along the strike direction on the set of
cap strikes, since volatilities obtained from EDFOs will be used for short
maturities in the cap stripping procedure. Lastly, for each strike we fit a
1
Figure 1: Interest Rate Volatility Cube
2
corresponding functional form that would be used in the cap stripping pro-
cedure. These functional forms will be used as the first function for each
corresponding maturity interpolator.
Next, for each cap strike, we strip constant caplet volatilities from given
cap volatilities inverting numerically Black’s pricing formula. If the specified
stripping method is the constant caplet volatility one, we are done with
stripping. Otherwise, we further find volatility values for cap terms and use
them as initial guess in optimizational stripping with piece-wise linear or
quadratic stripping method. At the same time as we do stripping, we build
a collection of maturity interpolators that will be used in the next step.
Next, for each swaption option tenor, we find interpolated volatilities
for each of the cap strikes using maturity interpolators. Then we fit these
vector of volatilities to a given type of smile (strike) interpolator, building,
therefore, a collection of strike interpolators for each swaption option tenor.
Lastly, we fill out the whole volatility cube by assigning to swaption volatility
grid node (optionT enor, swapT enor) a strike interpolator by taking a cap
strike interpolator for a corresponding option tenor, and adjusting one of
its parameters to match the at-the-money (ATM) swaption volatility at the
node.
2 Interpolation Spaces.
There are two types of interpolation spaces in which we work. They are
related to maturity and strike interpolation methods. In general, one needs
to distinguish between functional form of interpolation, in which just a simple
deterministic function is used, such as piece-wise polynomial interpolation,
for instance, and stochastic interpolation, in which a stochastic model is used,
such as CEV or SABR, for instance, as different rules may apply, as we will
see, depending on which type given interpolation belongs to.
The two types of spaces in which we work are the strike type spaces and
the volatility type spaces, and each volatility cube construction is specified
by the pair of such spaces. The strike type applies only to functional form
of smile interpolation, since stripping is done per strike, and stochastic in-
terpolators do not care about strike space as well. If strike type is absolute
strike, we use strikes as they are, and if it is relative strike, we use money-
ness, i.e., ln(K/F ), where F is the corresponding at-the-money rate, and K
is given strike. To illustrate how it works, lets take a linear interpolation as
3
an example. In absolute space we would have
Vi (Ki+1 − K) + Vi+1 (K − Ki )
V = , (1)
Ki+1 − Ki
where as in relative space we would have
Vi (ln(Ki+1 /F ) − ln(K/F )) + Vi+1 (ln(K/F ) − ln(Ki /F ))
V = , (2)
ln(Ki+1 /F ) − ln(Ki /F )
The second type of spaces is the volatility type. We consider three types
of volatility: normal, CIR, and Black. They represent volatility for the CEV
model:
dFt = σFtβ dWt , (3)
corresponding to the 0, 12 , and 1 values of β respectively. In practice, we do
not convert volatility between these types exactly, since we only interested
in nature of volatility here and not the exact model, so, since the original
volatilities are always the Black ones (β = 1), what we do is the following.
1
VCIR ≈ VBlack (F K) 4
√
VN ormal ≈ VBlack F K
(4)
So, we use the approximation on the right hand side of the equations above
to go from Black space into normal and CIR ones. Again, this only applies to
the functional types of smile interpolation. But here we also need to use the
same space in stripping as we use in the smile interpolation, since stripping is
a functional type of interpolator. To give an example, if we are in the relative
strike space and normal vol space doing a piece-wise linear interpolation, we
would use the following formula
√ √
Vi F Ki (ln(Ki+1 /F ) − ln(K/F )) + Vi+1 F Ki+1 (ln(K/F ) − ln(Ki /F ))
V = √ .
F K (ln(Ki+1 /F ) − ln(Ki /F ))
(5)
4
Figure 2: Stripping Methods.
5
to interpolate in between cap terms in a smooth and consistent with cap
volatilities fashion. This process is called stripping cap volatilities. We tested
four types of such stripping:
1. Constant caplet volatilities,
2. Piece-wise linear ameliorated caplet volatilities,
3. Piece-wise quadratic inexact ameliorated caplet volatilities,
4. Piece-wise quadratic exact ameliorated caplet volatilities.
The result of stripping is a collection of maturity interpolators (one per
strike), where each interpolator consists of term grid and a collection of func-
tions defined on each of the intervals between the neighboring grid points.
where {tj }N n
j=1 are the caplet terms and {Ni }i=1 are such that tNi = Ti . For
K
convenience, let Cap[0,T0 ] (K, Σi ) = 0. Cap terms are usually spaced one year
6
apart, when as caplet terms are spaced typically three months apart (for
USD), although this may depend on currency. To compute caplet prices, we
use Black’s formula
CapletK
[tj−1 ,tj ] (σ) = B(0, tj )∆(tj−1 , tj ) (F N (d1 ) − KN (d2 )) , (7)
where F = F (0, tj−1 , tj ) is forward Libor rate’s value, B(0, tj ) is zero bond’s
value (both can be obtained from today’s yield curve), ∆(tj−1 , tj ) denotes
year fraction between tj−1 and tj , and
√
ln(F/K) σ tj−1
d1,2 = √ ± . (8)
σ tj−1 2
F orwardCapK K K
[Ti−1 ,Ti ] (K, Σi ) = Cap[0,Ti ] (K, Σi ) − Cap[0,Ti−1 ] (K, Σi ). (9)
It is important to remember that for first cap we don’t take into account first
caplet interval, since it has volatility zero. Now, to find caplet piece-wise
constant volatilities, we need to solve the following equation of one variable
Ni
X
F orwardCapK
[Ti−1 ,Ti ] (K, Σi ) = CapletK
[tj−1 ,tj ] (σi ). (10)
j=Ni−1 +1
Solving these equations for σi completes the caplet volatility stripping pro-
cedure. In order to get a volatility now for the same strike K and some term
T , we find i such that Ti−1 < T ≤ Ti , and return σi . If there is no such i,
i.e., T > Tn , we return σn .
7
fit, where N is the number of intervals. This gives us only one free parameter
if we want an exact fit, say f (0) - left end value. From our experience, such
a fit results in a very unstable functional form, in a sense that it depends
largely on the value of the free parameter, and produces rather rough shape
for caplet volatilities. What we decided to do instead is to do an inexact fit
with an extra penalty term responsible for smoothness, or amelioration, of
the resulting caplet surface. The minimization function has the form
N
X 2
F (f0 , . . . , fN ) = wi F orwardCapK
[Ti−1 ,Ti ] (K, Σi ) − F orwardCap K
[Ti−1 ,Ti ] (K, f )
i=1
N
X −1
+ λ (βi−1 − βi )2 , (11)
i=2
where F orwardCapK [Ti−1 ,Ti ] (K, f ) is the forward caplet price calculated with
interpolated volatilities, βi is the i-th slope, i.e., βi = Tfii −T−fi−1
i−1
, and wi was
1
taken to be Ti , although we do realize that it is neither optimal nor unique
way to choose weights for this problem. It seems to work fine though in
the spot tests that we have performed so far. λ is a parameter controlling
how much precision we are willing to trade for additional smoothness of a
resulting caplet volatility surface. It is constant during the calibration. In
practice, we set it equal to about 10−4 − 10−3 , since we do not want to loose
too much precision.
8
penalty term in our nonlinear least squares optimization. Since
fi = fi−1 + C1 (Ti − Ti−1 ) + C2 (Ti − Ti−1 )2
1 1
fm = fi−1 + C1 (Ti − Ti−1 ) + C2 (Ti − Ti−1 )2 , (12)
2 4
we can derive that
(fi − fi−1 ) − 2(fm − fi−1 )
C2 = 2
(Ti − Ti−1 )2
fi − fi−1
C1 = − C2 (Ti − Ti−1 ). (13)
Ti − Ti−1
Thus, the parameters of the minimization are (f0 , f1m , f1 , f2m , . . . , fN −1 , fN m , fN ),
and the function we are minimizing is
N
X 2
F (f ) = wi F orwardCapK
[Ti−1 ,Ti ] (K, Σi ) − F orwardCap K
[Ti−1 ,Ti ] (K, f )
i=1
2N
X −1
+ λ (βi−1 − βi )2 , (14)
i=1
(f
km −fk−1
Tkm −Tk−1
, i = 2k
βi = fk −fkm
Tk −Tkm
, i = 2k + 1,
Tk−1 +Tk
where Tkm = 2
.
9
but on each parameter change we fit fkm ’s to the forward cap prices on each
interval. This method has the advantage of being exact and smooth at the
same time, but it is computationally very expansive, since besides the global
optimization problem, we have to perform one-dimensional root solving every
time parameters change, for every interval.
4 Incorporation Of EDFOs.
Currently, we are not using EDFOs in the volatility cube construction, since
the data is unavailable, but since this will change in the future, we have a
flag that indicates wether we are incorporating EDFOs or not. If EDFO
prices are used, we go through the following procedure. First, we convert
prices into volatilities inverting Black’s formula. Then for each maturity we
interpolate these volatilities onto cap strikes using the same smile interpolator
as will be used in the rest of the volatility cube construction for consistency.
This step is potentially dangerous, since for very short maturities we may
10
have only volatilities concentrated around the ATM, and when we will try to
extrapolate those on the cap strikes, which is a much wider set, we may get
some pretty large errors at the wings. One way to deal with this problem is
to resort to the constant or linear extrapolation for far out- or in-the-money
volatilities.
Next, for each cap strike we fit a functional form to the volatilities using
simple linear regression. For consistency functional form should be the same
as would be used in the stripping procedure, i.e., constant, linear or quadratic
function. We use the obtained functions as the first interval functions for the
corresponding maturity interpolators (interval [0, 1]). Also, in the stripping
procedure, we consider the first interval to be fixed (to have fixed parame-
ters). Thus, we do not perturb these parameters in the optimization, and for
constant caplet volatility stripping, we use the values from the first interval
instead of the first cap volatility.
2. V-shaped,
3. Hyperbolic,
4. CEV,
5. SABR.
11
40
1
35
Volatility
30
25
20
7
9
15
1 2 3 4 5 6
Strikes
Figure 3: Piece-wise linear method. Blue lines are fitted vols and green lines
are the original ones.
12
the value of i using binary search algorithm described in [5]. To see how ex-
trapolation is handled, please, refer to [4].
This method has no restrictions on the number of strikes needed for its
fit.
13
40
1
35
Volatility
30
25
20
7
9
15
1 2 3 4 5 6
Strikes
Figure 4: V-shaped method. Blue lines are fitted vols and green lines are the
original ones.
14
40
1
35
Volatility
30
25
20
7
9
15
1 2 3 4 5 6
Strikes
Figure 5: Hyperbolic method. Blue lines are fitted vols and green lines are
the original ones.
15
between x and y is assumed to be
with exactly the same equations as V-shaped function with the same param-
eters. Thus, we can think of the hyperbolic method as a smoothed version
of the V-shaped method. In order to derive y(x), we just need to solve a
quadratic equation, and get:
1 p
y(x) = (β1 + β2 )(x − x∗ ) ± (β1 + β2 )2 (x − x∗ )2 − 4(β1 β2 (x − x∗ )2 − y ∗2 )
2
1 p
= (β1 + β2 )(x − x∗ ) ± (β1 − β2 )2 (x − x∗ )2 + 4y ∗2 )
2
1 p
= (β1 + β2 )(x − x∗ ) + (β1 − β2 )2 (x − x∗ )2 + 4y ∗2 ) (21)
2
We choose plus sign, since only this sign makes sense. If we set x = x∗ , we
get back y ∗ , and if (x − x∗ )2 ≫ y ∗ , we get
1
y(x) ≈ ((β1 + β2 )(x − x∗ ) + (β2 − β1 ) | x − x∗ |) , (22)
2
where the right hand side is exactly the V-shaped formula. The function
being minimized in this procedure is the same as in the previous method
n
X
wi (y(xi ) − yi )2 (23)
i=1
16
40
1
35
Volatility
30
25
20
7
9
15
1 2 3 4 5 6
Strikes
Figure 6: CEV method. Blue lines are fitted vols and green lines are the
original ones.
17
5.4 CEV Method.
CEV method is a stochastic interpolation method using CEV model to model
Libor forward rates as described in [3]. The way the model was used though
is through asymptotic approximation formulas as described in [1]. We refer
an interested reader to these papers for exact formulas. We assume we are
given a vector of strikes {Ki }ni=1 and a vector of Black volatilities {σi }ni=1 .
The fit is done again in the sense of the nonlinear least squares. The model
is described by the SDE
dFt = αFtβ dWt , (24)
and, hence, has two parameters (α, β). The function being minimized in this
procedure is
n
X
wi (blackT oN ormal(σi , Ki ) − cevT oN ormal(α, β, Ki ))2 (25)
i=1
where blackT oN ormal and cevT oN ormal are conversion functions from [1],
and the weight function is wi = √ 1 2
. CEV model can be viewed as a
1+(Ki −F )
special case of the SABR model discussed next.
This method requires at least two strikes per maturity, since we are fitting
two parameters. If fewer strikes are given we recommend using other methods
instead.
= σt Ftβ dWt1 ,
dFt
= νσt dWt2 ,
dσ
t
< dWt1 , dWt2 > = ρdt,
σ0 =α
18
40
1
35
Volatility
30
25
20
7
9
15
1 2 3 4 5 6
Strikes
Figure 7: SABR method. Blue lines are fitted vols and green lines are the
original ones.
19
and, hence, has four parameters (α, β, ρ, ν). The function being minimized
in this procedure is
n
X
wi (blackT oN ormal(σi , Ki ) − sabrT oN ormal(α, β, ρ, ν, Ki ))2 (26)
i=1
where blackT oN ormal and sabrT oN ormal are conversion functions from [1],
and the weight function is wi = √ 1 2
. The calibration is done in two
1+(Ki −F )
stages. First, we fit CEV, which can be viewed as SABR with ν = 0. Then
we fit SABR using β parameter obtained in the previous stage as SABR’s
initial guess.
This method requires at least three strikes per maturity, since we are
fitting three parameters. If fewer strikes are given we recommend using other
methods instead.
20
• For V-shaped and hyperbolic interpolators, we change y ∗ to match the
right swaption ATM volatility.
The third one involves a one dimensional root solving. Lastly, we allow a
user to provide his parameter changes and adjust our parameters according
to these changes. Now, we have all the components to interpolate in the
cube.
21
8 getVol Function.
The signature of the getVol method of the volatility cube class is
double getVol(double optionTerm, double swapTerm, double strike).
We will use the following notations: Tio for the i-th option term, where
i = 1, . . . , N o , Tis for the i-th swap term, where i = 1, . . . , N s , and Ki for the
i-th strike, where i = 1, . . . , N k .
The algorithm consists of several steps. First, using binary search algo-
rithm, we find the corners of the cell in the swaption volatility grid containing
given point (T o , T s ). Denote them TLo , TRo , TLs , and TRs respectively.
If T o ≤ T1o then TLo = TRo = T1o .
If T o > TNo o then TLo = TRo = TNo o .
If T1o < T o ≤ TNo o then TLo = TIoo and TRo = TIoo +1 such that TLo < T o ≤ TRo .
Similarly,
If T s ≤ T1s then TLs = TRs = T1s .
If T s > TNs s then TLs = TRs = TNs s .
If T1s < T s ≤ TNs s then TLs = TIss and TRs = TIss +1 such that TLs < T s ≤ TRs .
Next, we get interpolated volatility along the strike direction for each
corner of the rectangle with vertices, and do a bilinear (or linear, if TLo = TRo
or TLs = TRs ) interpolation with option direction first.
The function that interpolates along the strike direction has the following
signature
double clippedInter(int optionIndex, int swapIndex, double strike).
First, we clip the strike, i.e., if K > upperI o ,I s we set K = upperI o ,I s . Sim-
ilarly, if K < lowerI o ,I s we set K = lowerI o ,I s . Here upper and lower are
two dimensional arrays of upper and lower boundaries respectively of the
strike range on which we do smile interpolation/extrapolation. On the rest
of the strike values we just perform flat extrapolation. Now, we simply in-
voke StrikeInterpolators(I o , I s )’s interpolation method with the argument
K. Lastly, we use the four volatilities we just obtained (or 2 or 1, depending
on the position of (T o , T s ) on the swaption volatility grid) to perform linear
interpolation and return the resulting value. Formula for linear interpolation
is
(xi+1 − x)yi + (x − xi )yi+1
y= , (27)
xi+1 − xi
where xi < x ≤ xi+1 .
22
9 Test Results.
We have tested our methodology for four major currencies: USD, GBP, EUR,
and JPY. For each date the data consisted of a yield curve, a cap volatility
matrix, a swaption volatility matrix, and EDFO prices or volatilities.
• A yield curve consisted of terms starting at one day and ending at 30
years. It was stripped from cash rates under 2 years, and swap rates
from 2 years on provided by Bloomberg function SWDF.
• A cap volatility matrix was a matrix of volatilities for given pairs of
absolute strikes and cap maturities. The number of maturities was
usually ranging from 10 to 20 with maturities ranging from 1 year up
to 10 or 20 years. The number of strikes ranged from six to twelve.
The ATM volatilities were not included at the current stage. The
provider we used was ICAP, and the Bloomberg commands to get the
corresponding volatility matrices for the currencies above are ICAU,
ICAB, ICAE, and ICAJ respectively.
• A swaption volatility matrix was a matrix of the ATM European swap-
tion volatilities for given pairs of option and swap terms. The swap
terms ranged from 1 to 30 years, and the option terms ranged from 1
month to 10 years. The volatility taken was the average of bid and ask
volatilities. The provider we used was Tullet & Tokyo. The way to
obtain these matrices is to start with Bloomberg command MRKT,
and then follow the instructions.
• EDFOs come in two different forms. The historical data is stored in
terms of prices, when the current data is the implied volatilities. The
ticker consists of four or five characters: first two identify the EDFO’s
code for particular country(ED for USD, ER for EUR, YE for JPY
and L for GBP), the third character identifies the month (H for
March, M for June, U for September, and Z for December), and
the rest identify the year (last digit for current and future ones and last
two digits for the years in the past).
Table 1 provides timings of volatility cube construction in milliseconds
for different stripping methods and different smile interpolation methods.
Since the construction consists of stripping and filling the cube with smile
interpolators, these parts can be timed separately.
23
Table 1: Volatility cube construction timings
Construction Part Method Time
Stripping Piece-wise Constant 13
Stripping Piece-wise Linear 400
Stripping Piece-wise Quadratic 1410
Smile Interpolation Piece-wise Linear 15
Smile Interpolation V-Shaped 63
Smile Interpolation Hyperbolic 196
Smile Interpolation CEV 277
Smile Interpolation SABR 387
11 Future Work.
One of the possible things to do in the future is to use different interpola-
tion types in getV ol function across the swaption volatility grid. Instead
of bilinear, we can use a biquadratic spline with amelioration, for instance.
Another direction for future development can be incorporation of the relative
strike space into getV ol function. We can do it the following way. First, for
each caplet node, say (t, K), we find cap maturities Ti−1 and Ti such that
KFT
Ti−1 < t ≤ Ti , use smile interpolators to get volatility for (Ti−1 , Fti−1 ) and
KF
(Ti , FtTi ), and interpolate between them linearly in time to get the volatility
at (t, K). Then we compute the resulting forward cap values, and corre-
sponding implied cap volatilities. Next, we perform a few (possibly just one,
for speed considerations) iteration consisting of stripping the cap volatilities
again, fitting the smile interpolators, and performing the relative strike pro-
cedure we described above. After we are satisfied with the error between
24
reconstructed cap volatilities and the original ones, we can interpolate in the
described way on any given relative strike and maturity.
12 C++ Classes.
• VolCube - Volatility cube class encapsulating cap/floor volatility ob-
ject and swaption volatility object, and providing an access function
getVol as described above.
• Conventions - a header file with usual cap and swap date frequencies.
25
class for data encapsulation, and RootFinderBrent class for 1D root
solving.
• Exception - an exception class. All the error handling was done using
C++ exception mechanism.
26
• Cap - Cap class. Encapsulates cap instrument and performs its pricing.
27
• PWLinearInter - Piece-wise linear smile interpolator.
• ValFactory - an interface to all the value factories that take flat for-
ward values and return node values. It is used in both yield curve
construction and initial guess for linear and quadratic stripping. There
are three class derived from this interface ValFactory1, ValFactory2,
and ValFactory3 respectively. The first and the third are different fla-
vors of linear values factory, and the second one is used for the quadratic
ones.
28
Figure 8: Piece-wise constant stripping with piece-wise linear smile.
29
Figure 9: Piece-wise linear stripping with V-shaped smile.
30
Figure 10: Piece-wise quadratic stripping with SABR smile.
31
References
[1] Pat Hagan, “Equivalent Volatilites For Determinstic Vol Formulas“,
Bloomberg Technical Report.
[6] Graeme West, “The SABR Model For Equity Derivative Smiles“, Fi-
nancial Modelling Agency
32
Press the <HELP>
key twice for instant
Help x2 live assistance.
bloomberg.com
BLOOMBERG, BLOOMBERG PROFESSIONAL, BLOOMBERG MARKETS, BLOOMBERG NEWS, BLOOMBERG ANYWHERE, BLOOMBERG TRADEBOOK, BLOOMBERG BONDTRADER, BLOOMBERG TELEVISION,
BLOOMBERG RADIO, BLOOMBERG PRESS and BLOOMBERG.COM are trademarks and service marks of Bloomberg Finance L.P., a Delaware limited partnership, or its subsidiaries. The BLOOMBERG PROFESSIONAL service
(the “BPS”) is owned and distributed locally by Bloomberg Finance L.P. (BFLP) and its subsidiaries in all jurisdictions other than Argentina, Bermuda, China, India, Japan and Korea (the “BLP Countries”). BFLP is a wholly-owned
subsidiary of Bloomberg L.P. (“BLP”). BLP provides BFLP with all global marketing and operational support and service for these products and distributes the BPS either directly or through a non-BFLP subsidiary in the BLP Countries.