Swaptions Complete Doc 1695378807
Swaptions Complete Doc 1695378807
Bailey Arm
1 Interest Rates 3
1.1 What are Interest Rates? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Interest Rate Mathematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.1 Day Count Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.2 Present Value and Future Value of Cash Flows . . . . . . . . . . . . . . . . 4
1.2.3 Yield of an Investment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3 Bonds 11
3.1 An Introduction to Bonds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.1.1 Bond Pricing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.1.2 Finding the Yield on a Bond . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.1.3 Zero Coupon Bonds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.1.4 Pricing a Bond between Coupon Payments . . . . . . . . . . . . . . . . . . 12
3.2 Bond Yield Calculation under Newton-Raphson . . . . . . . . . . . . . . . . . . . 13
5 An Introduction to Swaptions 23
5.1 What is a Swaption? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.1.1 Definition of a Swaption . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.1.2 Swaption Payoffs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
7 Swaption Greeks 27
7.1 Delta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
7.1.1 Swaption Delta Derivation . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
7.1.2 Delta Structure of Payer Swaption . . . . . . . . . . . . . . . . . . . . . . 28
7.1.3 Delta Hedging a Swaption . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
7.2 Gamma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
7.2.1 Swaption Gamma Derivation . . . . . . . . . . . . . . . . . . . . . . . . . 29
7.2.2 Swaption Gamma Python Code . . . . . . . . . . . . . . . . . . . . . . . . 29
7.3 Vega . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.3.1 Swaption Vega Derivation . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.3.2 Swaption Vega Python Code . . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.4 Theta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
7.4.1 Swaption Theta Python Code . . . . . . . . . . . . . . . . . . . . . . . . . 32
8 Swaption Strategies 34
8.1 Directional Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.1.1 Outright Payers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.1.2 Payer Spread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.2 Interest Rate Volatility Trading . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.3 Modelling Swaption Trades with Python . . . . . . . . . . . . . . . . . . . . . . . 36
8.3.1 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
8.3.2 Modelling Directional Swaption Trades with Python . . . . . . . . . . . . . 36
8.3.3 Modelling Swaption Straddle Prices with Python . . . . . . . . . . . . . . 38
2
1 Interest Rates
1.1 What are Interest Rates?
Interest rates are essentially the cost of borrowing money over a fixed period of time. For example,
say you need $100 for a new coat and I am happy to lend you that $100, in exchange for you
giving me 1% interest extra back. So, you get to buy a coat and I make a $1 profit after giving
you the money. Intuitively, non-zero interest rates make sense; I am giving up the opportunity
to use my $100 over the time that you are borrowing it from me.
Interest Payable = Notional × Day Count Factor × Interest Rate Per Annum
Here is an example of day count adjusting a $1mn loan at an annual interest rate of 5%
between the days of Jan 1st 2023 to Mar 1st 2023:
We will be utilising day count conventions in later chapters, for example when evaluating the
PV of an interest rate swap, day count conventions play a significant role.
3
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
and then both 5% on the principal again and also 5% on our original 5%. To find an equivalent
semi-annual yield to an annual yield of 10%, we are essentially solving:
(1 + r)2 = 1.10
So then we find:
√
r= 1.10 − 1 = 0.0489
So then 10% compounded annually is equivalent to 4.9% compounded semi-annually.
To solve generally, one has that:
(1 + r)m = 1 + R
Where r is the period rate, m is the number of periods in a year and R is the annual rate.
F V = (1 + r)X
So say I have $1000 and that current annual interest rates are 5%, the future value of my
original principal will be F V = 1.05 × 1000 = 1050. Now, what about after two years? We can
simply multiply again by the same factor and get the answer:
1.05 × X = 1000
Simply dividing yields:
1
X=1000 = 952.38
1.05
Thus, the present value of $1000 dollars one year in the future under a 5% interest rate
environment would be $952.38 3
Now imagine a more complex but realistic situation where interest rates are not stationary. An
example of this can be seen in 1.1 This graph shows the Effective Federal Funds Rate (EFFR),
a volume-weighted median of overnight federal funds transactions reported. This is a major
3
Think of this as the fair cost to buy into this agreement to receive this cash flow. It is important to note that
we are assuming the cash flow to be certain, with zero default probability
4
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
Figure 1.1: Effective Federal Funds Rate from 4th Sep 2022 to 4th Sep 2023
benchmark in the interest rate world. We can see that the Federal Reserve (the Fed) have been
hiking (raising) interest rates in order to combat inflation, with EFFR increasing from 2.4% to
more than 5.3%.
Let us start with a simple example. Let’s say that interest rates are projected to follow
5% → 5.5% → 6% over the next two years, and say that I want to know how much my $100 will
be worth at the end of the two years.
I can simply compute this as such:
Let us further complicated this example by examining the present value of a series of cash
flows X := (Xi )ki=1 , k ≤ n. We compute the following sum in order to find the present value4 :
k
X Xi
PV = Qi
i=1 j=1 (1 + ri )
Periodic Compounding
Some interest payments are calculated semi-annually or quarterly. To deal with this in present
value calculations, we can adjust the annual rate in the following way:
4
It is essential to point out that we are assuming that the payments are in the same currency, if they were not
we could adjust using the fx rate, or use some chain of fx options to fix the conversion:
k
X Xi × fxi
P VFX CONVERTED = Qi
i=1 j=1 (1 + ri )
5
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
X
PV =
(1 + i/m)n×m
Where X is our periodic cash flow ($1000 annually may be seen as $250 quarterly), m is the
number of periods in a year and n is the number of years.
Putting this into an example, say I have invested in company X and expect $1mn in 5 years.
Furthermore, say that I am assuming that interest rates will stay static over this 5 year period
at 4% compounded semi-annually. The present value of this cash flow is:
1000000
PV = = $820, 348.30
(1 + 0.04/2)5×2
So in other words, a fair value of this cash flow, assuming static interest rates and complete
certainty in the cash flow, would be $820,348.305
5
This is technically incorrect, recall that the semi-annual rate is not exactly equal to half the annual rate
6
Here are some terms used when discussing bonds:
(i) Discount Bond: The bond is trading below par. This happens when the coupon rate is below the required
yield,
(ii) Bond is Trading at a Premium: The bond is trading above par. This is when the coupon rate is above the
required yield
6
2 Interest Rate Modelling
This chapter can probably be skipped if you aren’t interested in interest rate models or
applying stochastic processes to finance - the rest of this document is not dependent on these
models but I felt it best to include a chapter on modelling interest rates.
An assumption that I will build upon is that interest rates are mostly random1 processes. It
is perhaps better that I mention that the model that we will be building together will focus on
short term movements (intra-week even) in interest rates.
dr = dWt
Where Wt is the standard 1-Dimensional Wiener process. This model is basically saying that
at every interval, interest rates follow a normal distribution.
In Python:
1 def simpleModel ( initialRate , time , intervals ) :
2 dt = time / intervals
3 r = initialRate
4 rates = []
5 for i in range ( intervals ) :
6 r += ( np . random . standard _ normal () - np . random . standard _ normal () )
/ 100
7 rates . append ( r )
8
9 plt . figure ( figsize = (12 ,6) )
10 plt . plot ( rates )
11 plt . xlabel ( f ’ Time (1 = { dt } years ) ’)
12 plt . ylabel ( ’ Interest Rate ’)
13 plt . title ( ’ Random Interest Rate Model ’)
14 plt . show ()
Running ’simpleModel(5, 1,1000)’ for me, yields:
It is important to note that if you run this code, you will get a different graph, even when
putting in the same variables. More accurately, we should scale the movements in line with a
historical volatility of the interest rate:
dr = σdWt
1
By mostly I am referring to the fact that interest rates will probably revert after some period of time, i.e. it
is highly unlikely that the FED will continue to keep interest rates at around the 5% level
7
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
Where σ is the average historical volatility over our chosen time interval. Have a go at
modifying my code above in order to include an extra input of historical volatility, and look at
how this can affect the graph.
dr = κ(θ − r)dt
Here is some code to plot the evolution of interest rates under this assumption:
15 def meanRevertingModel ( kappa , longTermRate , initialRate , time , intervals
):
16 dt = time / intervals
17 r = initialRate
18 rates = []
19
20 for i in range ( intervals ) :
21 r0 = r
22 r += kappa * ( longTermRate - r0 ) * dt
23 rates . append ( r )
24
25 plt . figure ( figsize = (12 ,6) )
26 plt . plot ( rates )
27 plt . xlabel ( f ’ Time (1 = { dt } years ) ’)
28 plt . ylabel ( ’ Interest Rate ’)
29 plt . title ( ’ Mean - Reverting Interest Rate Model ’)
30 plt . show ()
Running this and ’meanRevertingModel(0.5,2,3, 1,1000)’ shows why this model is not very
realistic:
8
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
9
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
√
Figure 2.3: Synthesis Model, dr = κ(θ − r)dt + σ rdWt
reversion. I have deliberately picked a large reversion number κ in order to demonstrate how
interest rates behave under this model (note that as κ → 0, we get a scaled version of our original
model2 )
The paper ’Mean Reversion in Interest Rates: New Evidence from a Panel of OECD Coun-
tries’ by Wu and Zhang could suggest that there are no statistically significant reversion charac-
teristics in the interest rates of multiple different countries.
This chapter was just to show how one can build up from relatively simple assumptions and
produce a model that exhibits interesting and hopefully useful results.
2
Studies have found κ to be relatively low, close to 0 but skewed postively very slightly
10
3 Bonds
3.1 An Introduction to Bonds
Possibly the best example of using what we have learnt previously is in pricing bonds. Simply
put, issuing a bond is an agreement to pay some coupon with some frequency until maturity
and then a final coupon plus a ’par’ at maturity. It can be thought of as a series of coupon
payments at regular intervals (semi-annual for typical Government bonds and quarterly for some
other bonds), plus some ’par’ value at maturity.
For example, a 10 year 5% Government bond on a par of $1000 has the following cash flows:
11
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
$1000
= $376.89
1.0520
7 1
$25 $25 X 1 $1000 1 − 1.0247 $1000
PV = 0.8444
+ 0.8444 i
+ 0.8444+7
= $25 0.8444
+
1.024 1.024 i=1
1.024 1.024 0.024 × 1.024 1.0247.8444
12
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
a − f (xn )
xn+1 = xn + df
dx
(xn )
Writing the dirty price of a bond in terms of its yield, with w = DCF :
c 1 − (1+y)1 n−1 P
Pd (y) = (w + ) +
(1 + y)w y (1 + y)n−1+w
We can follow my derivation:
This gives a formula that will iterate to find the semi-annual yield of a dirty bond expressed
as a decimal.
13
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
14
4 Interest Rate Swaps
4.1 What is an Interest Rate Swap?
An interest rate swap is simply an agreement (or a contract) between two parties to exchange
cash flows on certain dates over a specified maturity. More specifically, one party agrees to
pay some fixed percentage (say 5%) of some agreed amount called the notional ($1, 000, 000 for
example) in order to receive a variable, or floating, percentage that is bench marked by some
index.
The image above is useful when understanding one payment during an IRS, however to think
about the entirety of an IRS, imagine a sequence of these diagrams pasted above on another.
For future ease, when I am referring to the payer of an IRS, I am simply referring to the payer
of the fixed leg/receiver of the floating leg.
Perhaps putting this into an example could be useful. Say I am currently paying off my $1mn
mortgage which is on a floating rate (let’s call it the MB rate). Because of economic uncertainty
and issues in the housing market, I believe that the floating rate will skyrocket from 6% to 20%
15
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
within a year. In order to do this, I will be the payer of a semi-IRS1 on a notional of $1mn, with
a 1 year maturity receiving the MB rate and paying a fixed rate of 6%.
What I have essentially done here is cancelled the floating rate I pay on my mortgage, and
will instead pay the fixed rate which is 6%. Now say that interest rates stay at 3% and the MB
rate is expected to go from 6% → 11% → 15% (every 6 months). Then, the PV of the interest
rate swap is:
11% − 6% 15% − 6%
$1mn × ( + ) = $133, 377
1.03 1.032
However say that the MB rate falls 6% → 5% → 2%. The PV of this would be −$47, 412.
Typically when trading IRS, traders like to find the fixed rate at which the IRS has 0 value. In
essence, we are solving:
n
X (ri − f )
N Qi =0
i=1 j=1 (1 + kj )
We have that:
n n
X f X 1
Qi =f Qi
i=1 j=1 (1 + kj ) i=1 j=1 (1 + kj )
Yielding
Pn ri
n n
1 ri
Qi
i=1
j=1 (1+kj )
X X
f Qi = Qi =⇒ f = Pn 1
j=1 (1 + kj ) j=1 (1 + kj )
Qi
i=1
i=1 i=1 j=1 (1+kj )
This is called the swap rate, or the mid-market rate. For example, say that we know for
certain that the discounting interest rates ki will remain at 4.5% for the next 3 years, and the
market is pricing for the floating rate to go from 3% → 5% → 4%. We can now find the swap
rate of a 3y IRS:
0.03 0.05 0.04
1.045
+ 1.0452
+ 1.0453
f= 1 1 1 = 0.0399 = 4%
1.045
+ 1.0452
+ 1.0453
1
The ’semi’ prefix refers to the frequency of payments, i.e. every 6 months
16
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
In short, the swap rate contains useful information about the rate of return on an interest rate
swap.
It is important to note that I have assumed that the interests given are quoted and scaled
by their appropriate day count convention. Technically, the actual pricing formula, from the
perspective of the payer is:
N1
X dcf(fixed)i
N2
X rj dcf(floating)j
P V = N (−f Qi + Qj )
i=1 k=1 (1 + αk ) j=1 k=1 (1 + βk )
Where N1 , N2 are the number of payments on the fixed and floating leg, respectively, dcf(...)i
is the day count factor for the ith payment of the ... leg, rj is the floating rate on the j th payment
and αk , βk are the discounting rates for the fixed and floating leg respectively. Although this is
a rather daunting formula, an example illustrates the utility of explicitly stating each involved
factor.
For example, say I’m the payer of a $100mn 1Y semi-quarterly IRS, with fixed rate of 2%.
Furthermore, let’s say that the fixed leg payments happen on the 1st every 3 months and the
floating is on the 1st every 6 months, with our calculations happening under the 30/360 day
count convention, and assuming that the discount rate is 5% per annum, we can value this swap
as follows.
Fixed Leg
The fixed leg pricing formula is simply:
N1
X dcf(fixed)i
P VFixed Leg = N ∗ f Qi
i=1 k=1 (1 + αk )
17
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
Now to calculate the PV of the floating leg, under the assumption that the floating rate will
rise to 3% and then 5%:
18
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
Where pi is the rate to pay at time i. Pricing the receiving leg is identical apart from the
rate, dcf and discounting:
N2
X rj dcfj
P VReceiving Leg = N Qj
j=1 k=1 (1 + βk )
Note that typically a spread adjustment is made to the shorter tenor rate such that the total
PV is 0. Adding a spread onto the paying leg, we have that the PV of a basis swap is:
N1 N2
X (pi + S)dcfi X rj dcfj
P V = N (− Qi + Qj )
i=1 k=1 (1 + α i ) j=1 k=1 (1 + β k )
It is a simple exercise to find the spread necessary for a zero PV:
N1 N2
X (pi + S)dcfi X rj dcfj
P V = 0 =⇒ Qi = Qj
i=1 k=1 (1 + αi ) j=1 k=1 (1 + βk )
Going back to my example, let’s say that the market is expecting the 1mo $LIBOR rate to
follow: 3%,4%,3.5%, 3.1%, 3%,3% and the 3mo $LIBOR rate to follow: 3.7%, 3.6%. To keep
2
It is important to note that I have placed assumptions of stability in the discounting rates, these can and do
change and will affect the prices
19
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
this example nice and simple we will just assume that we can discount by an annual rate of 2%,
and that we can use the 30/365 day count convention, along with every payment date falling on
the 1st of its month.
To find the PV of the paying leg, we use the formula:
N1
X pi dcfi
P VPaying Leg = N Qi
i=1 k=1 (1 + αk )
With N = $1mn, αk = 1.021/12 − 1 = 0.00165 and dcfi = 30/365 = 0.0822. Our PV is then:
6
X pi
P VPaying Leg = $1mn ∗ 0.0822 = $16, 020.85
i=1
1.00165i
In a similar fashion, we find the PV of our receiving leg to be $35,472.12. So then, the PV of
this basis swap would be $35,472.12 - $16,020.85 = $19,451.27.
Plugging our values in to the spread formula would yield a spread adjustment of 4bps3
3
Given the PV, it is relatively simple to find the spread adjustment:
PN2 rj dcfj PN1
− i=1 Qi pi dcfi
j=1 Qj
k=1 (1+β k ) k=1 (1+αk ) P V /N
S= PN1 dcf
= PN1
Qi i Qi dcfi
i=1 k=1 (1+αk )
i=1 k=1 (1+αk )
20
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
Let us start pricing these models through an example - that of a €1mn EUR/USD 1y semi-
semi non-MTM with a fixing rate of 1.3, i.e. €1 = $1.3. We have the following cash flows:
N1
X N2
X
P V = (F0 N k0 − N l0 ) + N F0 (xi + Z)dcf($)i ki − N yj dcf(€)j lj + f0 N lN2 − N F0 kN1
i=1 j=1
21
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
It is important to note that this is from the perspective of the payer of the spread. We can
find the mid-market spread value such that the swap has 0 PV:
j=1 yj dcf(€)j lj − F0
F 0 k0 − N l 0 + N i=1 xi dcf($)i ki + f0 lN2 − F0 kN1
P 2 PN1
Z=
F0 i=1 dcf($)i ki
PN1
I will not be looking at these in much detail but there is another important type of swap -
the mark-to-market XCBS. Pricing these is very similar to above, however we use that currencies
change in value respective to one another, for example today $1 might be £0.95 and could be
£0.9 tomorrow.
P V = N F0 k0 − N l0
N1
X N2
X
+ N fj−1 (xi + Z)dcf($)i ki − N F0 yj dcf(€)j lj
i=1 j=1
N1
X
+N (fj−1 − fj )dcf($)i ki
i=1
+ N fN1 kN1 − N F0 lN2
As an exercise, send me the formula for the mid market rate of this swap!
22
5 An Introduction to Swaptions
5.1 What is a Swaption?
5.1.1 Definition of a Swaption
A swaption is an option to enter a determined leg of an IRS at a specified rate (called the strike
rate) at expiry.
An example of a swaption is a ’GBP $1mn 6m 2y receiver 4%’, i.e the option to receive fixed
and pay floating on a 2y GB rate swap if, in 6 months, the rate is below 4% (think of this as
receiver is a put and payer is a call).
Receiver Swaption
A receiver swaption is the right to enter into the receiver side of a swap at a strike rate. The
option can be exercised if the strike rate is greater than the swap rate, with payoff increasing
linearly as swap rate decreases towards 0 when strike rate equals swap rate.
Straddle
Akin to vanilla equity options, a swaption straddle is simply a combination of a receiver and a
payer swaption with the same strike rate and maturity. Similar to vanilla options, our payoff is
0 when swap rate equals strike rate, but increases with deviation from strike rate.
23
6 Swaption Pricing Theory
During the rest of this document, I will be using ideas from vanilla equity option pricing the-
ory to help gain intuition behind how different factors affect the price of a swaption. Arguably,
the biggest factor in option pricing is volatility. Volatility is simply a measure of how much an
underlying asset moves over a period of time; it is a quantification of uncertainty. In swaption
pricing, this is no different. As volatility increases, so too does the probability that our swap
rate is where we want it to be.
A common mistake is thinking that an increase in volatility also increases the chance that our
swap rate is not where we want it to be and thus the swaption should be cheaper. This is false
thinking; options have a one-sided payoff structure and thus we do not care about how far the
swap rate goes away from us.
To put it further into context, imagine I have bought a 100 strike call on company XYZ, maturing
in 1 year, and XYZ is currently trading at 110. At the time of purchase, implied volatility was
at 20%, meaning that typically XYZ moves up or down 20% over a year. If by the end of the
year, XYZ does fall 20% to 88, my payoff from the option will be 0. If instead it fell to 20, my
payoff is still 0.
To intuit what the delta of an extremely deep ITM vanilla call option is, we start off with
the payoff. Deeply ITM tells us that our strike is significantly below the underlying, i.e our pay-
off is max (S − K, 0), K << S where S is the underlying price and K is the strike. Clearly, if
we are super deep ITM, our payoff will approach the underlying S. The delta is then simply the
rate of change of our payoff with respect to the underlying1 . It is hopefully clear that ∂S∂
S=1
and therefore the delta of a deep ITM call is 1.
Now to intuit the delta of an ATM call option, we can do a similar trick. The payoff of an
ATM call is max(S − S0 , 0) where S0 is the strike when the option is bought. If the underlying
moves up by 1, our payoff is 1 and if it moves down by 1, our payoff is 0. As a rough assumption,
let us further assume that the probability a stock moves up equals the probability it moves down.
1
It is important to note that delta is actually the rate of change of the price with respect to the underlying,
but we can use payoff as a proxy
24
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
Then, our expected change in payoff will be 12 × 1 + 12 × 0 = 21 . Then we have found that the
delta of an ATM vanilla call is 0.5.
I will leave it up to you to find and intuit the delta of a far OTM option (when K >> S).
(could be a day, hour, month), there is a 50% chance that the rate moves up by 10bps and the
same chance it moves down 10bps. I won’t be using this model much, but it is certainly a useful
model to look at.
2
Try to think as to why this is!
25
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
26
7 Swaption Greeks
7.1 Delta
7.1.1 Swaption Delta Derivation
This derivation can definitely be skipped, it does not give any intuition behind delta but instead
focuses on deriving the formula. The delta of a swaption is the change in price with respect to
a 1bps change in the floating rate. Formalising, it is:
1 1 1 S
N e−rτ (Φ(d1 )+ √ Sϕ(d1 )− √ Kϕ(d2 )) = N e−rτ (Φ(d1 )+ √ (Sϕ(d1 )−K ϕ(d1 )) = N e−rτ Φ(d1 )
Sσ τ Sσ τ Sσ τ K
27
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
This is probably recognisable from the delta of a vanilla equity option is Φ(d1 ).
The delta of a receiver swaption is simply N e−rτ (Φ(d1 ) − 1)
∆ = N e−rτ Φ(d1 )
66 import numpy as np
67 import matplotlib . pyplot as plt
68 from scipy . stats import norm
69
70 def payerDelta ( notional , swapRate , strike , volatility , maturity ,
discountingRate ) :
71 d1 = (1 / ( volatility * np . sqrt ( maturity ) ) ) * ( np . log ( swapRate / strike ) +
0.5 * volatility * * 2 * maturity )
72 n1 = norm . cdf ( d1 , 0 , 1)
73 delta = notional * n1 * np . exp ( - discountingRate * maturity )
74 return delta
75
76 def plot _ deltaVSstrike ( notional , swapRate , strike , volatility , maturity ,
discountingRate ) :
77 k = np . linspace (0.8 * strike , 1.2 * strike , 1000)
78 plt . figure ( figsize = (12 ,6) )
79 plt . plot (k , payerDelta ( notional , swapRate , k , volatility , maturity ,
discountingRate ) )
80 plt . title ( ’ Delta - Strike Relationship ’)
81 plt . xlabel ( ’ Strike Rate ’)
82 plt . ylabel ( ’ Swaption Delta ’)
83 plt . show ()
84
85 plot _ deltaVSstrike (1 , 0.05 , 0.05 , 0.02 , 1 , 0.05)
Running this yields the following output:
So we can see that in 7.1 the delta is 1 for a deep ITM payer swaption, 0.5 for an ATM payer
swaption and 0 for a far OTM payer swaption (exactly the same as an equity option).
28
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
7.2 Gamma
7.2.1 Swaption Gamma Derivation
Recall the delta of a payer swaption:
∆ = N e−rτ Φ(d1 )
Gamma, or Γ is the rate of change of delta with respect to the swap rate. So, we want to
compute:
N e−rτ ϕ(d1 )
Γ= √
Sσ τ
Now let us theorise about what the gamma-strike relationship looks like. I can (very very
roughly) guess, by looking at the delta-strike graph and knowing that gamma is going to be the
gradient of the curve, that gamma is 0 when we are far away from the current swap rate, and
high when close to the swap rate.
29
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
92 n1 = norm . pdf ( d1 )
93 gamma = notional * np . exp ( - discountingRate * maturity ) * n1 / ( swapRate *
volatility * np . sqrt ( maturity ) )
94 return 0.0001 * gamma
95
96 def plot _ gammaVSstrike ( notional , swapRate , strike , volatility , maturity ,
discountingRate ) :
97 k = np . linspace (0.8 * strike , 1.2 * strike , 1000)
98 plt . figure ( figsize = (12 ,6) )
99 plt . plot (k , payerGamma ( notional , swapRate , k , volatility , maturity ,
discountingRate ) )
100 plt . title ( ’ Gamma - Strike Relationship ’)
101 plt . xlabel ( ’ Strike Rate ’)
102 plt . ylabel ( ’ Swaption Gamma ’)
103 plt . show ()
104
105 plot _ gammaVSstrike (1 , 0.05 , 0.05 , 0.02 , 1 , 0.05)
Running the above code yields the following graph:
So now we can see that our hypothesis generated from the delta graph was correct. Although
it might not seem it due to its second order nature, gamma is one of the most vital greeks,
especially when trading volatility through dynamic swaption hedging.
7.3 Vega
7.3.1 Swaption Vega Derivation
Vega is the rate of change of the swaption price with respect to a change in volatility. Mathe-
matically, we are finding:
30
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
S
ln( K ) + σ 2 τ /2
∂σ Φ(d1 ) = ϕ(d1 )∂σ d1 = ϕ(d1 )∂σ ( √ )
σ τ
Using the quotient rule yields:
√ S √ S
σ τ στ − (ln( K ) + σ 2 τ /2) τ σ 2 τ − (ln( K ) + σ 2 τ /2)
∂σ Φ(d1 ) = ϕ(d1 ) = ϕ(d 1 ) √
σ2τ σ2 τ
Which is then
S
σ 2 τ /2 − ln( K )
∂σ Φ(d1 ) = ϕ(d1 ) √
σ2 τ
Now we should probably find ∂σ Φ(d2 ) in terms of its d1 -analogue.
√
∂σ Φ(d2 ) = ϕ(d2 )∂σ d2 = ϕ(d2 )∂σ (d1 − σ τ )
√ √
ϕ(d2 )∂σ (d1 − σ τ ) = ϕ(d2 )∂σ d1 − τ ϕ(d2 )
So plugging this in,
√
ϑ = N e−rτ (Sϕ(d1 )∂σ d1 − Kϕ(d2 )∂σ d1 + K τ ϕ(d2 ))
Recall ϕ(d2 ) = S
K
ϕ(d1 ), we end up with the following formula for vega:
√ √
ϑ = N e−rτ ϕ(d1 )(S∂σ d1 − S∂σ d2 + τ S) = N e−rτ Sϕ(d1 ) τ
31
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
7.4 Theta
Theta is a measure of how much my swaption decreases in value as I get closer to maturity. It
is:
e−rT Sσ
Θ = −N √ ϕ(d1 ) + rN e−rt (SΦ(d1 ) − KΦ(d2 ))
2 t
Here is the Python code for theta:
32
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
33
8 Swaption Strategies
8.1 Directional Strategies
8.1.1 Outright Payers
Now all of this is good to know, but it is even better to actually be able to use it. Say that I
have a high conviction that the Fed have no idea as to how bad rates are and that there will be
a severe inflation surprise with the Fed needing to increase rates to 10% in the next 6 months,
and then rapidly cutting them back down to 2%. What I can do is buy a payer swaption on
FFOIS (the Federal Funds Overnight Index Swap Rate), more specifically the $100mn FFOIS
6mo 2y Payer struck ATM + some spread (say 200 bps). This would cost almost $11,000. If,
after 3mo, FFOIS increases to 8.5%, the swaption is worth $2,468,944. However, if the FFOIS
remains relatively stable, I will lose all $11,000.
34
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
√
(iv) Vega: N e−rτ S τ ϕ(d1 )
−rτ Sσϕ(d )
(v) Theta: − e √
2 τ
1
+ rPrice
In order to price our straddle, it is as simple as pricing the swaptions separately and then adding
them.
140 def swaptionPayerPrice ( notional , swapRate , strike , volatility , maturity
, discountingRate ) :
141 d1 = (1 / ( volatility * np . sqrt ( maturity ) ) ) * ( np . log ( swapRate / strike ) +
0.5 * volatility * * 2 * maturity )
142 N1 = norm . cdf ( d1 )
143 N2 = norm . cdf ( d1 - volatility * np . sqrt ( maturity ) )
144
145 price = notional * np . exp ( - discountingRate * maturity ) * ( swapRate * N1 -
strike * N2 )
146
147 return price
148
149 def swaptionReceiverPrice ( notional , swapRate , strike , volatility ,
maturity , discountingRate ) :
150 d1 = (1 / ( volatility * np . sqrt ( maturity ) ) ) * ( np . log ( swapRate / strike ) +
0.5 * volatility * * 2 * maturity )
151 N1 = norm . cdf ( - d1 )
152 N2 = norm . cdf ( - d1 + volatility * np . sqrt ( maturity ) )
153
154 price = notional * np . exp ( - discountingRate * maturity ) * ( - swapRate * N1 +
strike * N2 )
155
156 return price
157
158 def swaptionStraddlePrice ( notional , swapRate , strike , volatility ,
maturity , discountingRate ) :
159 payerPrice = swaptionPayerPrice ( notional , swapRate , strike ,
volatility , maturity , discountingRate )
160 receiverPrice = swaptionReceiverPrice ( notional , swapRate , strike ,
volatility , maturity , discountingRate )
161 price = payerPrice + receiverPrice
162
163 return price
Running ’swaptionStraddlePrice(1000000, 0.07, 0.07, 0.05, 0.5, 0.05)’ tells us the net price of
buying:
Costing around $2656. We will be selling these swaptions so we will receive a premium of
$2656. Remember, we aren’t trading the price, and that we want to trade volatility and thus we
have to delta hedge this position.
35
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
Our delta will be the sum of each swaption delta. For the sake of being concise, here is a
function that will calculate the price of a swaption straddle and the associated greeks. Running
’swaptionStraddleInfo(1000000, 0.07, 0.07, 0.05, 1, 0.05)’ gives an output of:
Delta: 18972.31
Gamma: 21678.12
Vega: 531.11
Theta: -8.88
Using the greeks to delta hedge, we can calculate our expected profit from cooling volatility
with:
(iii) Verify that the code has given the correct answer
36
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
171
172 dt = time / intervals
173 r = initialRate
174 rates = []
Next, we simulate the swap rate under the synthesis model:
175 for i in range ( intervals ) :
176 r0 = r
177 r += kappa * ( longTermRate - r0 ) * dt + volatility * np . sqrt ( r0 ) * ( np .
random . standard _ normal () - np . random . standard _ normal () ) / 100
178 rates . append ( r )
Then with this sample path, we simulate the price of the payer swaption:
179 strike = 0.055
180 prices = []
181
182 for i in range ( intervals ) :
183 price = swaptionPayerPrice (1000000 , rates [ i ] , strike , volatility ,
time - i * dt , discountingRate )
184 prices . append ( price )
And then finally we plot:
185 plt . figure ( figsize = (12 ,6) )
186 plt . plot ( prices )
187 plt . xlabel ( f ’ Time (1 = { dt } years ) ’)
188 plt . ylabel ( ’ Swaption Price ’)
189 plt . show ()
190
191 plt . figure ( figsize = (12 ,6) )
192 plt . plot ( rates , label = ’ Simulated Swap Rates ’)
193 plt . axhline ( strike , color = ’r ’ , label = ’ Strike ’)
194 plt . xlabel ( f ’ Time (1 = { dt } years ) ’)
195 plt . ylabel ( ’ Interest Rate ’)
196 plt . legend ()
197 plt . show ()
Running this as an example:
We can see that at expiry, our strike is far above the current swap rate and thus the swaptions
expire worthless.
I have included the code necessary for the next part in the attached Jupyter Notebook -
please let me know if there are any issues with it!
37
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
38
Introduction to Interest Rates, Bonds, Swaps and Swaptions Bailey Arm
39