Community RSS Feed
http://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions in tag Economics sorted by activeConsistent foreign exchange options
http://community.wolfram.com/groups/-/m/t/1278848
Consistency in foreign exchange derivatives is being discussed in the below note where we look at the problem from the probability measure perspective. We review option valuation from both sides of the FX contract and conclude that investors' preferences are subject to different probability measures when the FX rate inverts. Following this we prove the validity of Siegel's paradox.
![enter image description here][1]
**Introduction**
------------
Foreign exchange options are the oldest options in the market with a long history of trading. As such, they have been deeply-researched and are well-understood. Nevertheless, we return to this topic to look at the product consistency, since this may still not be entirely clear. We review this consistency from both - domestic and foreign perspectives and show what adjustments are required to ensure the options are arbitrage-free when the investor's position changes
**Foreign exchange options - 1st currency measure**
-----------------------------------------------
Foreign e change options are financial contracts on FX rate -i.e. rate of exchange of currency 1 fro currency 2. GBP/USD or EUR/USD are examples of such currency pairs. Options are essentially contracts on the future spot FX rate. We will demonstrate the exposition to this subject using EUR/USD exchange rate. This is the rate that sets the exchange equation of $X = \[Euro]1
A reader familiar with the equity derivatives market will immediately spot the similarity between these two products. If the equity growth rate under the risk-neutral measure is the risk-free rate r, the equity pays a continuous dividend yield q and the price process is assumed log-normal, this is identical to the FX when we express r and the USD risk-free rate and q as the equivalent EUR risk-free rate.
Looking at his from the USD-perspective, we can express the EUR/USD FX process as:
$$dF = F (r-q) dt + σ F dW$$
This is a well-known log-normal process for the exchange rate where F represents the EUR/USD rate, \[Sigma] is the FX rate volatility and W represents a Wiener process under the USD-measure.
Pricing option on this future rate is trivial - this is an option buy \[Euro] 1 for K USD and time T. Therefore from the USD-perspective, the option pays: Max[0,F-K] where K is the strike exchange rate. Pricing this option in Mathematica is easy - we build the standard Ito Process for initial value F0.
ipUSD = Refine[
ItoProcess[{(r - q)*F, \[Sigma]*F}, {F, F0}, t], {\[Sigma] > 0,
F[t] > 0, t > 0}];
{Mean[ipUSD[t]], Variance[ipUSD[t]]}
{E^((-q + r) t) F0, E^(-2 q t + 2 r t) (-1 + E^(t $[Sigma]^2)) F0^2}
The option premium from the USD-perspective is an expectation of the above Ito Process.
usdOpt = Exp[-r*t]*
Expectation[Max[F[t] - K, 0], F \[Distributed] ipUSD,
Assumptions ->
F0 > 0 && K > 0 && \[Sigma] > 0 && t > 0 && r > 0 && q > 0] //
Simplify
-(1/2) E^(-r t) (-2 E^((-q + r) t) F0 +
E^((-q + r) t)
F0 Erfc[(t (-2 q + 2 r + \[Sigma]^2) + 2 Log[F0] - 2 Log[K])/(
2 Sqrt[2] Sqrt[t] \[Sigma])] +
K Erfc[(t (2 q - 2 r + \[Sigma]^2) - 2 Log[F0] + 2 Log[K])/(
2 Sqrt[2] Sqrt[t] \[Sigma])])
**Foreign exchange options - 2nd currency measure**
-----------------------------------------------
Now we touch upon a part that is less clear - what if the option buyer (seller) thinks from the the EUR-perspective? This is quite legitimate as option buyers or sellers can have different preferences when entering into the option contract. How do we ensure that the option contract is consistent from each side-perspective?
Let's spell out the EUR investor position by replicating the USD investor side
- EUR riskless process is dP = P q dt and not dB = B r dt representing USD process
- The exchange-rate is now 1/F and not F
- When SDE for the exchange rate from the USD-point of view is the one above, then for the process 1/F this becomes - using Ito lemma:
f = 1/F;
ip02 = Refine[
ItoProcess[{(r - q)*F, \[Sigma]*F, f}, {F, F0}, t], {\[Sigma] > 0,
F[t] > 0, t > 0, r > 0, q > 0}];
ipEUR = ItoProcess[ip02] // Simplify
ItoProcess[{{(-q + r) F[t], (q - r + \[Sigma]^2)/
F[t]}, {{\[Sigma] F[t]}, {-(\[Sigma]/F[t])}}, \[FormalX]1[
t]}, {{F, \[FormalX]1}, {F0, 1/F0}}, {t, 0}]
The inverted FX rate (USD/EUR) produces different Ito Process than the one observed on the USD-side. This is clear from the definition below:
$$d(1/F) = (1/F) (q-r+σ^2) dt -σ (1/F) d W$$
Our objective is to find probability measure under which the FX option priced in the first section from the USD-perspective will be identical to the one priced from the EUR-perspective. Let's take all tradable components of the trade: (i) USD risk-free discount factor B , (ii) FX rate EUR/USD F and (iii) EUR discount factor P. Based on this we define:
- USD-risk-free process converted to EUR: B/F
- Discounted value of the above : B/ (F P)
So, we need a multi-dimensional Ito process to model B/(F P)
ip03 = Refine[
ItoProcess[{{0, r B, q P}, {F \[Sigma], 0, 0},
B/(P F)}, {{F, B, P}, {F0, B0, P0}}, t], {\[Sigma] > 0, r > 0,
q > 0, t > 0}] // Simplify;
ipEUR2 = ItoProcess[ip03]
ItoProcess[{{0, r B[t], q P[t], (-q B[t] + r B[t] + \[Sigma]^2 B[t])/(
F[t] P[t])}, {{\[Sigma] F[t]}, {0}, {0}, {-((\[Sigma] B[t])/(
F[t] P[t]))}}, \[FormalX]1[t]}, {{F, B, P, \[FormalX]1}, {F0, B0,
P0, B0/(F0 P0)}}, {t, 0}]
From the above Ito Formula, we extract two coefficients - drift and volatility of B/(F P) and create new ItoProcess that reflects the changes when FX inversion occurs.
Flatten[ipEUR2[[1]]];
dr = %[[4]] /. {F[t] -> 1, B[t] -> 1, P[t] -> 1}
vl = %%[[8]] /. {F[t] -> 1, B[t] -> 1, P[t] -> 1}
ItoProcess[{dr F, vl F}, {F, F0}, t];
ipEUR3 = ItoProcess[%]
-q + r + \[Sigma]^2
-Sigma
ItoProcess[{{(-q + r + \[Sigma]^2) F[t]}, {{-\[Sigma] F[t]}},
F[t]}, {{F}, {F0}}, {t, 0}]
It is quite clear that the inverted FX rate process USD/EUR is indeed different to the one observed in the EUR/USD case.
In order to prove this consistency, we need to show that FX call option on EUR/USD from EUR point of view is identical to the one priced from the USD-perspective. So, we need to prove that:
E^(-r t) Subscript[E, USD] ( Max[ Subscript[F, t]-K,0]) = E^(-q t) Subscript[F, 0] Subscript[E, EUR] ( (1/Subscript[F, t]) Max[1/Subscript[F, t]-K,0] )
This is because the expectation of the option payoff has to be converted back into EUR. All we need to price this option is use the following expectation:
eurOpt = F0 Exp[-q t] Expectation[Max[F[t] - k, 0]/F[t],
F \[Distributed] ipEUR3,
Assumptions ->
F0 > 0 && k > 0 && \[Sigma] > 0 && t > 0 && r > 0 && q > 0] //
Simplify
1/2 E^(-(q + r) t) (E^(r t) F0 - E^(q t) k +
E^(r t) F0 Erf[(
t (-2 q + 2 r + \[Sigma]^2) + 2 Log[F0] - 2 Log[k])/(
2 Sqrt[2] Sqrt[t] \[Sigma])] +
E^(q t) k Erf[(t (2 q - 2 r + \[Sigma]^2) - 2 Log[F0] + 2 Log[k])/(
2 Sqrt[2] Sqrt[t] \[Sigma])])
To finalise this exercise, we compute both option premiums:
usdNum = usdOpt /. {F0 -> 1.35, t -> 0.5, K -> 1.36, \[Sigma] -> 0.2,
r -> 0.01, q -> 0.012}
eurNum = eurOpt /. {F0 -> 1.35, t -> 0.5, k -> 1.36, \[Sigma] -> 0.2,
r -> 0.01, q -> 0.012}
usdNum - eurNum // Chop
0.070452
0.070452
0
Both option premium are the same. This proves they are ***consistent***.
**Siegel's paradox**
----------------
In the context of the above discussion, it is worth mentioning ***Siegel's paradox*** as it directly links the FX processes to probability measures. Let's start again with the definition of FX evolution from the USD-perspective . Under the USD probability measure (USD risk-neutral process) we showed earlier that this was:
$$dF = F (r-q) dt + σ F dW$$
The expected future FX rate - the ***FX Forward*** at time t is an expectation of Subscript[F, t] under the USD measure:
usdExp = Expectation[F[t], F \[Distributed] ipUSD,
Assumptions -> F0 > 0 && \[Sigma] > 0 && t > 0 && r > 0 && q > 0] //
Simplify
E^((-q + r) t) F0
Let's look now at EUR-investor point of view. (S)he can do similar calculation and under her/his neutral measure the USD/EUR process follows:
$$d(1/F) = (1/F) (q-r) dt + (1/F) σ dW$$
So, the forward rate of 1/F (EUR per USD) is:
eurExp2 =
Expectation[1/F[t], F \[Distributed] ipEUR3,
Assumptions -> F0 > 0 && \[Sigma] > 0 && t > 0 && r > 0 && q > 0] //
Simplify
E^((q - r) t)/F0
This seems logical, since inverted FX is simply :1/F. Here lies the problem: since 1/F is essentially a convex function, by Jensen's inequality:
(E[F])^-1 < E [F^-1]
when both expectations are taken w.r.t to same probability measure = i.e. calculated with the same distribution and F is non-constant. This runs contrary to our assertion above where we outlined the conditions for consistency - i.e. different probability measure.
Siegel's paradox is simply a statement confirming that the spot rate inversion does not extrapolate to the forward space and the forward FX rate in general ***cannot*** be an unbiased estimate of future spot FX rate. At least not *simultaneously* for both sides of the contract due to *'convexity'* effect in the inverted FX function. This is due to the Jensen's inequality statement above. If the property holds for the USD-investor, it cannot be true for the EUR investor and vice-versa since their forward expectation are subject to ***different probability measures***.
We prove this on the simple case - define standard Ito process and then take the expectations for for F and 1/F
ip05 = Refine[
ItoProcess[{(r - q)*F, \[Sigma]*F}, {F, F0}, t], {\[Sigma] > 0,
F[t] > 0, t > 0, r > 0, q > 0}];
usdFwrd =
Expectation[F[t], F \[Distributed] ip05,
Assumptions -> F0 > 0 && \[Sigma] > 0 && t > 0 && r > 0 && q > 0] //
Simplify
eurFwrd =
Expectation[1/F[t], F \[Distributed] ip05,
Assumptions -> F0 > 0 && \[Sigma] > 0 && t > 0 && r > 0 && q > 0] //
Simplify
E^((-q + r) t) F0
E^(t (q - r + \[Sigma]^2))/F0
We see that the FX forwards are different as their are taken from different probabilities (with different mean and variance). The forward of 1/F depends also on volatility whereas F does not. Let's show the validity of Jensen's inequality: 1/ Subscript[F, USD] and Subscript[F, EUR]
fxMeanDiff = 1/usdFwrd - eurFwrd // Simplify
-((E^((q - r) t) (-1 + E^(t \[Sigma]^2)))/F0)
Since the above quantity is negative, this shows that indeed
(E[Subscript[F, t]])^-1 < E[Subsuperscript[F, t, -1]]
Plot[fxMeanDiff /. {F0 -> 1.35, r -> 0.01, q -> 0.0045,
t -> 0.5}, {\[Sigma], 0.1, 0.3},
PlotLabel ->
Style["Jensen's inequality and FX forward rates", {15, Bold}, Blue],
PlotStyle -> {Thick, Red}]
![enter image description here][2]
Jensen's inequality effects increases with volatility. On the other hand, the only instance when both forwards will be consistent w.r.t the same probability occurs when \[Sigma]=0. Since this is never the case, we conclude that Siegel's paradox holds.
**Conclusion**
----------
The objective of this note was to present the FX derivatives - forwards and options from different perspective. Whilst the FX spot market is reasonably simple, derivatives are more complicated, especially when we start looking at them from each contractual perspective. Change of probability measure, and hence different probabilities are required to ensure consistency. Existence of Siegel's paradox proves this.
Change of probability measure is handled implicitly by Mathematica once the FX process is correctly defined. The same applies to proving of Siegel's paradox.
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Jensinequality.png&userId=387433
[2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Jensinequality.png&userId=387433Igor Hlivka2018-02-04T20:12:16ZInterest rates derivatives in multi-curves framework
http://community.wolfram.com/groups/-/m/t/1273892
We discuss the changes to the interest rates processes when we move from mono-curve setting to multi-curve framework. This is characterised by presence of several curves – a dedicated discount curve and set of estimation curves – each for specific Libor rate. The first is generally assumed to be the OIS curve, whilst the rest are ‘tenor’ curves for given Libor tenor.
The changes in the forward Libor estimation are due to the ‘loss’ of martingale property when mono-curve world is replaced by multiple curve framework. We show how multiplicative adjustment works in this new setting and how interest rate derivatives are affected. Various modelling assumptions are used to show derivatives pricing in this new setting.
![enter image description here][23]
#Introduction#
We review the setting of Interest rate derivatives in post-crisis era characterised by multi-curve environment where dedicated yield curves are defined for forward rate estimation and cashflow discounting. The multi-curve framework is a direct consequence of financial crisis of 2007-2008 when the so-called 'Libor market' - represented by single yield curve stopped being seen as risk-free, and new curves started to emerge to better reflect the counterparty risk in the financial markets.
The current interest rate framework exists in the simplest form in the dual curve setting - (i) discounting curve - usually built with OIS instruments and (ii) estimation curve - generally used to build the 'main' estimation curve in a given currency. This is 3 month Libor curve for USD or 6 months Euribor curve for EUR.
Existence of dual curve environment does change the interest rate mathematics. Martingales defined in the single curve framework do not hold and the process has to be adapted to account for curves duality. We demonstrate how this process work and show how interest rate derivatives - both linear and optional work when we move from the singe to dual framework.
#Interest rate derivatives in a single curve framework#
We firs look at the single-curve homework in the pre-2007 era. When only one yield curve exists, the derivatives pricing is simple and tidy. Forward rate defined on the singe curve using two deposits coincides the forward rate agreement rate = FRA rate
Subscript[F, S] = 1/(Subscript[T, 2] - Subscript[T, 1]) * P[0, Subscript[T, 1]]/P[0, Subscript[T, 2]] - 1;
where Subscript[F, S] is the forward rate in a single-curve setting, Subscript[T, 1], Subscript[T, 2] and tow maturity dates with Subscript[T, 2]>Subscript[T, 1] and P[0, Subscript[T, 1]] , P[0,Subscript[T, 2]] are two discount factors at time 0 with maturities Subscript[T, 1] and Subscript[T, 2].
The FRA rate is then defined as Subscript[F, FRA] = K such that the payoff of the contract at time 0 has value = 0 L[Subscript[T, 1], Subscript[T, 2]] - K = 0 with L[Subscript[T, 1], Subscript[T, 2]] defined as forward term-rate.
## Interest rate swaps in single-curve setting ##
Interest rate swap together with FRA are one the simplest linear interest rate derivatives. It usually involves exchange of fixed rate for a series of floating forward rates up to final maturity:
fixedLeg = S Sum[\[Delta][i] P[0, i], {i, 1, m}]
floatLeg = Sum[\[Delta][i] P[0, i] Subscript[L, S][i], {i, 1, n}]
![enter image description here][2]
where $L_S$ is the forward Libor rate in a single curve framework. This is identical to the FRA rate defined above:
Subscript[L, S][i] = 1/\[Delta][i]*(P[i - 1]/P[i]-1)
floatLeg =
Sum[\[Delta][i]*
P[0, i]*(1/\[Delta][i])*(P[0, i - 1]/P[0, i] - 1), {i, 1, n}]
> P[0, 0] - P[0, n]
Then swap rate *S* is simply a solution to the equation:
Solve[fixedLeg == floatLeg, S]
![enter image description here][3]
This shows that in a single-curve framework the swap rate is simply a difference in two discount factors normalised by $annuity= \sum_{i = 1}^n\delta[i]\ P[0, i]$. The same curve is used to produce discount factors that are used for (i) discounting and (ii) forward Libor estimation.
#Multi-curve framework for Interest rate derivatives#
When we move to multi-curve setting, we assume:
- Separate discounting curve - generally OIS curve
- Separate estimation curve for 'main index - 3M or 6M
- Separate estimation curves for 'minor indices - say 1M, 12M or 6M (in 3M setting)
When the discounting curve is set to the OIS curve, we define the OIS forward rate with tenor h similarly to the forward in the mono-currency setting:
![enter image description here][4]
for i = 1...n where $\delta[i]$ is a year fraction for interval $T_{i-1} -T_i$ and $P_{OIS}[t,T_i]$ is a discount factor from the OIS curve at time t maturing at time $T_i$
In the multi-curve framework, the Libor definition in the single curve environment does not hold L[Subscript[T, 1],Subscript[T, 2]]] != Subscript[F, S][t;Subscript[T, 1],Subscript[T, 2]] != Subscript[F, OIS][t,Subscript[T, 1],Subscript[T, 2]] since the discount factors in definition of Libor when only one curve is used is not the same as in dual curve case. Libor is dual curve setting is calculated from the estimation curve with unique set of discount factors.
The expectation of forward Libor in the dual curve setting can be expressed as
\!\(
\*SubsuperscriptBox[\(E\), \(t\),
SubsuperscriptBox[\(Q\), \(OIS\), \(T2\)]]\([\)\)Subscript[F, D][Subscript[T, 1];Subscript[T, 1],Subscript[T, 2]]] = Subsuperscript[E, t, Subsuperscript[Q, OIS, T2]][E^Subsuperscript[Q, OIS, T2][L[Subscript[T, 1],Subscript[T, 2]|Subscript[\[ScriptCapitalF], t]]. The valuation of forward rate agreement with Libor forward rate is therefore defined as: FRA[t,Subscript[T, 1],Subscript[T, 2]] =Subscript[P, OIS][t,Subscript[T, 2]] \[Delta][Subscript[T, 1],Subscript[T, 2]] \!\(
\*SubsuperscriptBox[\(E\), \(t\),
SubscriptBox[\(Q\), \(OIS\)]]\([\)\)L[t,Subscript[T, 1],Subscript[T, 2]]-K].
Current market practice takes a shortcut and simply values the FRA as FRA[t,Subscript[T, 1],Subscript[T, 2]] =Subscript[P, OIS][t,Subscript[T, 2]] \[Delta][Subscript[T, 1],Subscript[T, 2]] (L[t,Subscript[T, 1],Subscript[T, 2]]-K]) where discount factor Subscript[P, OIS][t,Subscript[T, 2]] comes from the OIS curve and the forward Libor L[t,Subscript[T, 1],Subscript[T, 2]] is taken from the estimation curve. This is clearly inconsistent since forward Libor is NOT martingale under the OIS forward measure.
##Libor adjustment in multi-curve framework##
To restore the non-arbitrage relationship, forward Libor rate has to be adjusted. We refer to this as Forward basis that restores the equilibrium between Subscript[F, OIS] and Subscript[F, E]. Assuming multiplicative basis Aj, we get:
Fd = (1/\[Delta]) (Pd[T1]/Pd[T2] - 1);
Fe = (1/\[Gamma]) (Pe[T1]/Pe[T2] - 1);
Solve[Fe \[Gamma] == Fd \[Delta] Aj, Aj]
![enter image description here][5]
where Subscript[F, d] represents forward rate from the OIS curve, Subscript[F, e] is the forward Libor from the estimation curve, Subscript[P, d] is a discount factor f from the OIS curve and Subscript[P, e] is a discount factor from the estimation curve.
The forward basis is therefore a ratio of discount factors from both curves and can be recovered ex-post once both curve have been calibrated to the market data.
From modelling perspective, however it is desirable to express the forward rate in terms of single curve. We introduce new discount factor adjustment Subscript[B, j] and re-calculate the forward adjustment spread:
Fd = (1/\[Delta]) (PdT1/PdT2 - 1);
Fe = (1/\[Gamma]) (PeT1/PeT2 - 1);
PeT1 = BjT1 PdT1;
PeT2 = BjT2 PdT2;
Solve[Fd == Fe Aj, Aj] // Simplify
![enter image description here][6]
and get the forward Libor $F_e$
Fe
![enter image description here][7]
This shows that the Libor is a function of (i) OIS curve and (ii) discount factor adjuster. To proceed, we assume that the forward rate follows LogNormal martingale dynamics under forward measure Subscript[Q, e]
Fe = GeometricBrownianMotionProcess[0, \[Sigma], x0];
Fe[t]
![enter image description here][8]
We apply to similar process to the forward adjuster defined under forward measure $Q_d$
Bj = GeometricBrownianMotionProcess[0, \[Eta], y0];
Bj[t]
![enter image description here][9]
To change the measure from Subscript[Q, e]==> Subscript[Q, d], we use the change-of-measure technique that says:
Subscript[E, OIS][Fe] = Subscript[E, e][Fd Bj]. To change the measure, we need joint expectation of OIS forward and the forward adjuster. We apply the **Binormal Copula** with LogNormal marginals
cDist = CopulaDistribution[{"Binormal", ρ}, {Fe[t], Bj[t]}];
cdrift = Expectation[x*y, {x, y} \[Distributed] cDist,
Assumptions ->
t > 0 && η > 0 && σ > 0 && -1 <= ρ <= 1]
![enter image description here][10]
The joint expectation of forward OIS and forward adjuster on relative basis provides the adjustment for the process where the change of measure occurs. Since the martingale process for forward Libor has to be drift less, we adjust the forward rate by its negative quantity;
Aj = cdrift/(x0 y0) /. t -> -t
![enter image description here][11]
Returning back to our original Libor adjustment formula, we observe:
![enter image description here][12]
Fe_Adj = Expectation[x, x \[Distributed] Fe[t],
Assumptions -> t > 0 && σ > 0 && x0 > 0]*Aj /. x0 -> L[0]
![enter image description here][13]
This is the forward Libor rate under the OIS forward discounting measure. The adjustment is a function (i) time, (ii) volatility of Libor and (iii) volatility of OIS rate. A reader familiar with the exposition above, an recognise here the parallelism to process drift adjustment in the foreign currency market know as **'quanto adjustment'**. The similarity is obvious - we work with two curves, two sources and randomness and switch the measure similarly to what we do in foreign currency markets.
##Forward rate agreement - FRA##
This is the simple contract that pays the difference between forward Libor and fixed rate
![enter image description here][14]
where \[DoubleStruckCapitalC] is nominal and $\delta[\tau]$ is a year fraction on day count convention between the Libor tenor $T_1$ and $T_2$.
Ho much does the adjustment affects the FRA valuation? We look first at **market volatilities** - (i) for the Libor rate and (ii) Adjuster:
Assume: $\delta=0.25$, C=1 mil, $P_{OIS}[t,T_2] = 0.98$, t=1, L=0.0125,K=0.0125
fra = C*Pois*δ*(L*E^(-t*ρ*σ*η) - K) /. {C ->
1000000, L -> 0.0125, K -> 0.0125, t -> 1, δ -> 0.25,
Pois -> 0.98, ρ -> 0.75}
Plot3D[fra, {σ, 0.1, 0.3}, {η, 0.1, 0.3},
AxesLabel -> Automatic, PlotTheme -> "Marketing",
PlotLabel ->
Style["FRA valuation impact by market volatilities", Blue, 15]]
![enter image description here][15]
![enter image description here][16]
As we can see from the graph above, higher volatilities will push the value of forward rate lower and therefore making the value of long forward contract more negative. The opposite applies to a short FRA contract.
We can now look at correlation impact:
fra2 = C*Pois*δ*(L*E^(-t*ρ*σ*η) - K) /. {C ->
1000000, L -> 0.0125, K -> 0.0125, t -> 1, δ -> 0.25,
Pois -> 0.98, σ -> 0.2, η -> 0.2};
Plot[fra2, {ρ, -0.75, 0.75}, PlotStyle -> Red,
PlotLabel -> Style["Correlation impact on FRA valuation", Blue, 15]]
![enter image description here][17]
Negative correlation will increase the long FRA value since the adjusted Libor will be higher. Positive correlation will drive the valuation i into negative territory.
##Interest rate swap - IRS##
The payer IRS formula is determined from the same equation: fixed leg = float leg
fixedLeg = K Sum[δ[i] Subscript[P, OIS][i], {i, 1, m}];
floatLeg =
Sum[δ[i] Subscript[P, OIS][i] L[
i] Exp[-Subscript[t, i] ρ σ η], {i, 1, n}];
swapR = Solve[fixedLeg == floatLeg, K] // Simplify
![enter image description here][18]
This is the equilibrium swap rate that will make present value at inception zero. The new formula differs from the swap rate formula in the single curve framework in two instances:
- Discount factor P comes from a special discounting curve - the OIS
curve and becomes Subscript[P, OIS][t,Subscript[T, i]]
- Numerator does not reduce to a simple difference of two discount
factors since adjusted Libor rate L[t, Subscript[T, 1],Subscript[T,
2]] E^(-t \[Rho] \[Eta] \[Sigma]) is now estimated on a different
curve, the so-called estimation curve
##Caps and Floors##
Consider first a Caplet paying out at time Subscript[T, k]. Caplet is essentially a call option on forward Libor rate L[t;Subscript[T, k-1],Subscript[T, k]]: \[Delta][\[Tau]] *(L[t;Subscript[T, k-1],Subscript[T, k]]-K)^+ where \[Delta][\[Tau]] is a year fraction between Subscript[T, 1] and Subscript[T, 2] and K is a fixed strike rate. The pricing formula is simply a discounted conditioned expectation of the payoff positivity under certain distributional assumptions. So, to price a Caplet in multi-curve framework, we proceed as in mono-currency case, with replacement: Libor mono-curve -> Libor multi-curve:
![enter image description here][19]
Pricing formula will differ depending on the choice distributional assumptions for the forward Libor rate. For calculation purposes, we set the adjusted Libor rate -Subscript[L, e][t;Subscript[T, 1],Subscript[T, 2]] E^(-t \[Rho] \[Eta] \[Sigma]) = x0. We choose the three processes that become the most common in the market - i.e. (i) Normal process, (ii) LogNormal process and (iii) Mean-reverting Normal process.
- **Normal process:**
nProc = OrnsteinUhlenbeckProcess[0, σ, 0, x0];
nCplt = Subscript[P, OIS][t, i] δ[i] Expectation[Max[x - k, 0],
x \[Distributed] nProc[t],
Assumptions -> σ > 0 && t > 0] // FullSimplify
![enter image description here][20]
We can now investigate the behaviour of the Caplet w..r.t Libor volatility and strike
Plot3D[nCplt /. {Subscript[P, OIS][t, i] -> 0.98, δ[i] -> 0.25,
x0 -> 0.0125, t -> 1}, {σ, 0.005, 0.015}, {k, 0.01,
0.0135}, PlotLabel ->
Style["Caplet Normal premium", Blue, {15, Bold}],
PlotLegends -> Automatic, AxesLabel -> Automatic,
ColorFunction -> "Rainbow"]
![enter image description here][21]
Premium increases as volatility goes up and strike declines. However, volatility is more dominant factor.
- **Lognormal process**
lProc = GeometricBrownianMotionProcess[0, σ, x0];
lCplt = Subscript[P, OIS][t, i] δ[i] Expectation[Max[x - k, 0],
x \[Distributed] lProc[t],
Assumptions -> σ > 0 && t > 0 && k > 0 && x0 > 0] //
FullSimplify
![enter image description here][22]
A similar pattern is observed for other processes, such as LogNormal
Plot3D[lCplt /. {Subscript[P, OIS][t, i] -> 0.98, δ[i] -> 0.25,
x0 -> 0.0125, t -> 1}, {σ, 0.15, 0.5}, {k, 0.01, 0.0135},
PlotLabel -> Style["Caplet LogNormal premium", Blue, {15, Bold}],
PlotLegends -> Automatic, AxesLabel -> Automatic,
ColorFunction -> "TemperatureMap"]
![enter image description here][23]
- **Mean-reverting normal process**
mProc = OrnsteinUhlenbeckProcess[μ, σ, θ, x0];
mCplt = Subscript[P, OIS][t, i] δ[i] Expectation[Max[x - k, 0],
x \[Distributed] NormalDistribution[a, b],
Assumptions -> b > 0 && t > 0];
mCplt = % /. {a -> mProc[t][[1]], b -> mProc[t][[2]]} // FullSimplify
![enter image description here][24]
###Floors###
Interest rate floors are are essentially put options on forward Libor rate with payoff function:
![enter image description here][25]
- **Normal process**
nProc = OrnsteinUhlenbeckProcess[0, σ, 0, x0];
nFlrt = Subscript[P, OIS][t, i] δ[i] Expectation[Max[k - x, 0],
x \[Distributed] nProc[t],
Assumptions -> σ > 0 && t > 0] // FullSimplify
![enter image description here][26]
- **LogNormal process**
lFlrt = Subscript[P, OIS][t, i] δ[i] Expectation[Max[k - x, 0],
x \[Distributed] lProc[t],
Assumptions -> σ > 0 && t > 0 && k > 0 && x0 > 0] //
FullSimplify
![enter image description here][27]
Plot3D[lFlrt /. {Subscript[P, OIS][t, i] -> 0.98, δ[i] -> 0.25,
x0 -> 0.0125, t -> 1}, {σ, 0.15, 0.5}, {k, 0.01, 0.0135},
PlotLabel -> Style["Floorlet LogNormal premium", Blue, {15, Bold}],
PlotLegends -> Automatic, AxesLabel -> Automatic,
ColorFunction -> "Pastel"]
![enter image description here][28]
##Swaptions##
Swaptions are options on the swap rate defined above. They exist in tow formats: (i) Payer swaption = put option on the swap rate and (ii) Receiver swaption = call option on the swap rate. When we operate in the multi-curve framework, we deal with the same problem as in Libor case - i.e. swap rate adjustment.
We develop the swap adjustment in the same way as Libor. When LogNormal dynamics for the swap rate is envisaged, we arrive at the adjustment quantity though a joint expectation process:
![enter image description here][29]
The volatilities in the exponent are now swaption volatilities and correlation coefficient $\rho$ is the correlation between the swap rate and the adjuster.
###Receiver swaption###
This is the call option on the swap rate with the payoff ; Rec_OSWP = Subscript[AF, OIS] (Subscript[S, ADJ][t; Subscript[T, 0],Subscript[T, n]] -K)^+ where:
Subscript[AF, OIS] = Sum[γ[i] Subscript[P, OIS][i], {i, 1, n}]
![enter image description here][30]
The option premium will depend on the modelling choice for the underlying swap rate. We look again at (i) Normal process, (ii) LogNormal process and (iii) Mean-reverting Normal process:
- **Normal process**
nSwpn = Subscript[AF, OIS]
Expectation[Max[x - k, 0], x \[Distributed] nProc[t],
Assumptions -> σ > 0 && t > 0] // FullSimplify
![enter image description here][31]
- **LogNormal process**
lSwpn = Subscript[AF, OIS]
Expectation[Max[x - k, 0], x \[Distributed] lProc[t],
Assumptions -> σ > 0 && t > 0 && k > 0 && x0 > 0] //
FullSimplify
![enter image description here][32]
- **Normal mean-reverting process**
mCplt = Subscript[AF, OIS]
Expectation[Max[x - k, 0],
x \[Distributed] NormalDistribution[a, b],
Assumptions -> b > 0 && t > 0];
mCplt = % /. {a -> mProc[t][[1]], b -> mProc[t][[2]]} // FullSimplify
![enter image description here][33]
###Payer swaption###
These are *put opinions* on the swap rate which in case of multi-curve environment is drift-adjusted. For example, if we assume normal distribution for the swap rate, we get
- **Normal process**
nSwpn2 = Subscript[AF, OIS]
Expectation[Max[k - x, 0], x \[Distributed] nProc[t],
Assumptions -> σ > 0 && t > 0] // FullSimplify
![enter image description here][34]
#Conclusion#
Multi-curve framework in case of interest rate derivatives brings new paradigm that requires certain adjustment to the underlying rates. This is due to a measure change when the expectation of the rates stops being martingale. Introduction of separate discounting curve - OIS requires adjustment to the forward rate drift in order to preserve non-arbitrage condition. Quarto-style adjustment known in foreign currency market is being used to derive neat formula.
Pricing and valuation adjustment with Mathematica, as the above demonstration shows, is easy. Availability of stochastic routines and probabilistic functions leads to quick and elegant solution.
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Caplet.jpg&userId=387433
[2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-29at11.02.28.png&userId=20103
[3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-29at11.18.04.png&userId=20103
[4]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-29at11.23.08.png&userId=20103
[5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-29at11.27.49.png&userId=20103
[6]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-29at11.29.20.png&userId=20103
[7]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-29at11.30.27.png&userId=20103
[8]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-29at11.31.55.png&userId=20103
[9]: http://community.wolfram.com//c/portal/getImageAttachment?filename=15141.png&userId=20103
[10]: http://community.wolfram.com//c/portal/getImageAttachment?filename=36372.png&userId=20103
[11]: http://community.wolfram.com//c/portal/getImageAttachment?filename=57483.png&userId=20103
[12]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-29at11.38.59.png&userId=20103
[13]: http://community.wolfram.com//c/portal/getImageAttachment?filename=10334.png&userId=20103
[14]: http://community.wolfram.com//c/portal/getImageAttachment?filename=52615.png&userId=20103
[15]: http://community.wolfram.com//c/portal/getImageAttachment?filename=64676.png&userId=20103
[16]: http://community.wolfram.com//c/portal/getImageAttachment?filename=71507.png&userId=20103
[17]: http://community.wolfram.com//c/portal/getImageAttachment?filename=103448.png&userId=20103
[18]: http://community.wolfram.com//c/portal/getImageAttachment?filename=31589.png&userId=20103
[19]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-29at12.05.36.png&userId=20103
[20]: http://community.wolfram.com//c/portal/getImageAttachment?filename=1092710.png&userId=20103
[21]: http://community.wolfram.com//c/portal/getImageAttachment?filename=291011.png&userId=20103
[22]: http://community.wolfram.com//c/portal/getImageAttachment?filename=446612.png&userId=20103
[23]: http://community.wolfram.com//c/portal/getImageAttachment?filename=732913.png&userId=20103
[24]: http://community.wolfram.com//c/portal/getImageAttachment?filename=570614.png&userId=20103
[25]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-29at12.14.26.png&userId=20103
[26]: http://community.wolfram.com//c/portal/getImageAttachment?filename=329415.png&userId=20103
[27]: http://community.wolfram.com//c/portal/getImageAttachment?filename=259916.png&userId=20103
[28]: http://community.wolfram.com//c/portal/getImageAttachment?filename=810317.png&userId=20103
[29]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-29at12.19.37.png&userId=20103
[30]: http://community.wolfram.com//c/portal/getImageAttachment?filename=240818.png&userId=20103
[31]: http://community.wolfram.com//c/portal/getImageAttachment?filename=934319.png&userId=20103
[32]: http://community.wolfram.com//c/portal/getImageAttachment?filename=797420.png&userId=20103
[33]: http://community.wolfram.com//c/portal/getImageAttachment?filename=881621.png&userId=20103
[34]: http://community.wolfram.com//c/portal/getImageAttachment?filename=498322.png&userId=20103Igor Hlivka2018-01-29T12:58:41Z