Professional Documents
Culture Documents
Financial Risk Management Companion
Financial Risk Management Companion
net/publication/340873353
CITATIONS READS
18 20,020
1 author:
Thierry Roncalli
Université Paris-Saclay
161 PUBLICATIONS 3,444 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Thierry Roncalli on 30 June 2020.
This companion book contains the solutions of the tutorial exercises which are found at the
end of each chapter. Additional materials (datasets, codes, figures and slides) concerning
the Handbook of Risk Management are available at the following internet web page:
http://www.thierry-roncalli.com/RiskManagementBook.html
i
Contents
3 Credit Risk 43
3.4.1 Single and multi-name credit default swaps . . . . . . . . . . . . . . 43
3.4.2 Risk contribution in the Basel II model . . . . . . . . . . . . . . . . 45
3.4.3 Calibration of the piecewise exponential model . . . . . . . . . . . . 50
3.4.4 Modeling loss given default . . . . . . . . . . . . . . . . . . . . . . . 53
3.4.5 Modeling default times with a Markov chain . . . . . . . . . . . . . 55
3.4.6 Continuous-time modeling of default risk . . . . . . . . . . . . . . . 57
3.4.7 Derivation of the original Basel granularity adjustment . . . . . . . 60
3.4.8 Variance of the conditional portfolio loss . . . . . . . . . . . . . . . 67
5 Operational Risk 97
5.4.1 Estimation of the severity distribution . . . . . . . . . . . . . . . . . 97
5.4.2 Estimation of the frequency distribution . . . . . . . . . . . . . . . 102
5.4.3 Using the method of moments in operational risk models . . . . . . 104
5.4.4 Calculation of the Basel II required capital . . . . . . . . . . . . . . 106
5.4.5 Parametric estimation of the loss severity distribution . . . . . . . . 110
5.4.6 Mixed Poisson processes . . . . . . . . . . . . . . . . . . . . . . . . 113
iii
iv
These risk weights apply to the net exposure on each time band. For reflecting
basis and gap risks, the bank must also include a 10% capital charge to the
smallest exposure of the matched positions. This adjustment is called the ‘vertical
disallowance’. The Basel Committee considers a second adjustment for horizontal
offsetting (the ‘horizontal disallowance’). For that, it defines 3 zones (less than
1 year, one year to four years and more than four years). The offsetting can
be done within and between the zones. The adjustment coefficients are 30%
within the zones 2 and 3, 40% within the zone 1, between the zones 1 and
2, and between the zones 2 and 3, and 100% between the zones 1 and 3. To
compute mathematically the required capital, we note L? (t) and S ? (t) the long
and short nominal positions for the time band t. t = 1 corresponds to the first
time band [0, 1M], t = 2 corresponds to the second time band ]1M, 3M[, etc. The
risk weighted positions for the time band t are defined as L (t) = K (t) × L? (t)
and S (t) = K (t) × S ? (t). The required capital for the overall net open position
is then equal to:
15 15
X X
KOP = L (t) − S (t)
t=1 t=1
The matched position M (t) for the time band t is equal to min (L (t) , S (t)). We
deduce that the additional capital for the vertical disallowance is:
13
X
KVD = 10% × M (t)
t=1
1 Coupons 3% or more are called big coupons (or BC) and coupons less than 3% are called small coupons
(SC). When the maturity is greater than 20Y, K (t) is equal to 6.00% for big coupons and 12.50% for small
coupons.
3
4 Handbook of Financial Risk Management
N (t) = L (t) − S (t) is the net exposure for the time band t. We then define the
net long and net short exposures for the three zones as follows:
X
Li = max (N (t) , 0)
t∈∆i
X
Si = − min (N (t) , 0)
t∈∆i
where ∆1 = [0, 1Y], ∆2 = ]1Y, 4Y] and ∆3 = ]4Y, +∞]. We define CF i,j as
the exposure of the zone i that can be carried forward to the zone j. We then
compute the additional capital for the horizontal disallowance:
KHD = 0.4 × min (L1 , S1 ) + 0.3 × min (L2 , S2 ) + 0.3 × min (L3 , S3 ) +
0.4 × CF 1,2 + 0.4 × CF 2,3 + CF 1,3
The regulatory capital for the general market risk is the sum of the three com-
ponents:
K = KOP + KVD + KHD
(b) For each time band, we report the long, short, matched and net exposures:
Time band L? (t) S ? (t) K (t) L (t) S (t) M (t) N (t)
3M-6M 100 50 0.40% 0.40 0.20 0.20 0.20
7Y-10Y 10 50 3.75% 0.45 2.25 0.45 −1.80
The capital charge for the overall open position is:
We now compute the net long and net short exposures for the three zones:
zone 1 2 3
Li 0.20 0.00 0.00
Si 0.00 0.00 1.80
It follows that there is no horizontal offsetting within the zones. Moreover, we
notice that we can only carry forward the long exposure L1 to the zone 3 meaning
that:
2. (a) We have:
Stock 3M Exxon IBM Pfizer AT&T Cisco Oracle
Li 100 100 10 50 60 90
Si 50 80
Ni 100 50 10 50 60 90 −80
We deduce that the capital charge for the specific risk is equal to $35.20 mn:
7
X
KSpecific = 8% × |Ni | = 8% × 440 = 35.20
i=1
P7
(b) The total net exposure i=1 Ni is equal to $280 mn, meaning that the capital
charge for the general market risk is equal to $22.40 mn:
KGeneral = 8% × 280 = 22.40
(c) To hedge the market risk of the portfolio, the investor can sell $280 mn of S&P
500 futures contracts2 . In this case, the capital charge for the general market risk
is equal to zero. However, this new exposure implies an additional capital charge
for the specific risk:
KSpecific = 35.20 + 4% × 280 = 35.20 + 11.20 = 46.40
Let S be the short exposure on S&P 500 futures contracts. We have:
K = KSpecific + KGeneral
= (35.20 + 4% × S) + 8% × |280 − S|
We notice that there is a trade-off between the capital charge for the specific
risk which is an increasing function of S and the capital charge for the general
market risk which is a decreasing function of S for S ≤ 280. Another expression
of K (total) is:
57.60 − 4% × S if S ≤ 280
K=
12.80 + 12% × S otherwise
We verify that the minimum is reached when S is exactly equal to 280 (see Figure
2.1).
3. (a) Under SMM, we have:
KSMM = 8% × Nw
(b) The 10-day Gaussian value-at-risk is equal to:
Nw × σ (w) √
VaR99% (w; ten days) = 2.33 × √ × 10
260
= 0.457 × Nw × σ (w)
We deduce that the required capital is approximately equal to:
KIMA ≈ (3 + ξ) × VaR99% (w; ten days)
= (3 + ξ) × 0.457 × Nw × σ (w)
Because ξ ≤ 1, it follows that:
KIMM ≤ 1.828 × Nw × σ (w)
2 We assume that the beta of the portfolio with respect to the S&P 500 index is equal to one.
6 Handbook of Financial Risk Management
1.828 × Nw × σ (w) ≤ 8% × Nw
8%
⇔ σ (w) ≤
1.828
⇔ σ (w) ≤ 4.37%
(d) The annualized volatility of the portfolio must be lower than 4.37%. This im-
plies that long equity exposures induce more required capital under IMM than
under SMM. Indeed, the volatility of directional equity portfolios is generally
higher than 12%. In order to obtain equity portfolios with such lower volatil-
ity, the portfolio must be long/short, meaning that the directional risk must be
(partially) hedged.
4. (a) The bank is exposed to foreign exchange and commodity risks with spot and
forward positions. Contrary to stocks or many equity products, these exposures
include a maturity pattern. For instance, the $100 mn EUR long position has
not the same maturity than the $100 mn EUR short position, implying that the
bank cannot match the two positions.
(b) We first consider the FX risk. We have NEUR = 100−100 = 0, NJPY = 50−100 =
−50, NCAD = 0 − 50 = −50 and NGold = 50 − 0 = 50. We deduce that the
aggregated long and short positions are LFX = 0 and SFX = 100. It follows that
the required capital is:
For the commodity risk, we exclude the Gold position, because it is treated as a
foreign exchange risk. We have:
7
X 7
X
KCommodity = 15% × |Li − Si | + 3% × (Li + Si )
i=5 i=5
= 15% × (50 + 20 + 20) + 3% × 390
= 13.50 + 11.70
= $25.20 mn
We finally obtain:
K = KFX + KCommodity
= $33.20 mn
5. (a) Under the maturity ladder approach, the bank should spread long and short ex-
posures of each currency to seven time bands: 0-1M, 1M-3M, 3M-6M, 6M-1Y,
1Y-2Y, 2Y-3Y, 3Y+. For each time band, the capital charge for the basis risk
is equal to 1.5% of the matched positions (long and short). Nevertheless, the
residual net position of previous time bands may be carried forward to offset
exposures in next time bands. In this case, a surcharge of 0.6% of the residual
net position is added at each time band to cover the time spread risk. Finally,
a capital charge of 15% is applied to the global net exposure (or the resid-
ual unmatched position) for directional risk. To compute mathematically the
required capital, we note Li (t) and Si (t) the long and short positions of the
commodity i for the time band t. t = 1 corresponds to the first time band
[0, 1M] and t = 7 corresponds to the last time band ]3Y, +∞[. The cumulative
long and short exposures are L+ + +
i (t) = Li (t − 1) + Li (t) with Li (0) = 0 and
+ + +
Si (t) = Si (t − 1) + Si (t) with
Si (0) = 0. The cumulative matched position is
M+ + +
i (t) = min Li (t) , Si (t) . We deduce that the matched exposition for the
time band t is equal to Mi (t) = M+ + +
i (t) − Mi (t − 1) with Mi (0) = 0. The
value of the carried forward CF i (t) can be obtained recursively by reporting the
unmatched positions at time t which can be offset in the times bands τ with
τ > t. The residual unmatched position is Ni = max L+ + +
i (7) , Si (7) − Mi (t).
We finally deduce that the required capital is the sum of the individual capital
charges:
7
! 6
!
X X
Ki = 1.5% × 2 × Mi (t) + 0.6% × CF i (t) + 15% × Ni
t=1 t=1
The sum of matched positions is equal to 2 200. This means that the residual
unmatched position is 400 (2 600 − 2 200). At time band t = 1, we can carry
forward 200 of long position in the next time band. At time band t = 2, we can
carry forward 700 of short position in the times band t = 4. This implies that
CF i (3) = 700 and CF i (4) = 700. At time band t = 4, the residual unmatched
position is equal to 1 000 (1 800 − 100 − 700). However, we can only carry 600
of this long position in the next time bands (300 for t = 5, 100 for t = 6 and
200 for t = 1). At the end, we verify that the residual position is 400, that is the
part of the long position at time band t = 4 which can not be carried forward
(1 000 − 600). We also deduce that the sum of carried forward positions is 2 700.
It follows that the required capital is3 :
We obtain:
100.00%
ρ = 67.08% 100.00%
40.82% −18.26% 100.00%
and σ (w) = 7.21%. This long/short portfolio has a lower volatility than the
previous long-only portfolio, because part of the risk is hedged by the positive
correlation between stocks A and B.
3 The total matched position is equal to 2 × 2 200 = 4 400 (long + short).
Market Risk 9
(d) We have:
2
σ 2 (w) = 1502 × 1% + 5002 × 4% + (−200) × 9% +
2 × 150 × 500 × 1% +
2 × 150 × (−200) × 0.75% +
2 × 500 × (−200) × 0%
= 14 875
The volatility is equal to $121.96 and is measured in USD contrary to the two
previous results which were expressed in %.
3. (a) We have:
E [R] = βE [F] + E [ε]
and:
R − E [R] = β (F−E [F]) + ε − E [ε]
It follows that:
h i
>
cov (R) = E (R − E [R]) (R − E [R])
E β (F−E [F]) (F−E [F]) β > +
=
h i
>
2 × E β (F−E [F]) (ε − E [ε]) +
h i
>
E (ε − E [ε]) (ε − E [ε])
2
= σF ββ > + D
We deduce that:
q
σ (Ri ) = 2 β 2 + σ̃ 2
σF i i
2
σF βi βj
ρ (Ri , Rj ) =
σ (Ri ) σ (Rj )
We obtain:
100.00%
ρ = 94.62% 100.00%
12.73% 12.98% 100.00%
4. (a) We have:
µ (Zi ) = E [Xi Yi ]
= E [Xi ] E [Yi ]
= µi (X) µi (Y )
10 Handbook of Financial Risk Management
To obtain this formula, we use the fact that Xi Xj and Yi Yj are independent. In
a matrix form, we find that:
µ (Z) = µ (X) ◦ µ (Y )
Σ (Z) = Σ (X) ◦ Σ (Y ) +
>
Σ (X) ◦ µ (Y ) ◦ µ (Y ) +
>
Σ (Y ) ◦ µ (X) ◦ µ (X)
We find that µ (Π) = 0 and σ (Π) = 69.79. We deduce that the Gaussian VaR
with a 99% confidence level is equal to $162.36. For the Monte Carlo method,
we use the following steps: (i) we first simulate the random variate X with the
Cholesky algorithm; (ii) we then simulate Y with a uniform random generator;
(iii) we calculate the components Zi = Xi Yi ; (iv) we finally deduce the P&L.
With one million of simulations, we find that the Monte Carlo VaR is equal to
$182.34. We explain this result because the distribution of Π (w) is far to be
normal as illustrated in Figure 2.2.
(b) We assume that F is continuous. It follows that VaRα (L) = F−1 (α). We deduce
that:
E L | L ≥ F−1 (α)
ESα (L) =
Z ∞
f (x)
= x dx
−1
F (α) 1 − F (F−1 (α))
Z ∞
1
= xf (x) dx
1 − α F−1 (α)
Z 1
1
ESα (L) = F−1 (t) dt
1−α α
(c) We have:
x−(θ+1)
f (x) = θ
x−θ
−
We also obtain:
Z 1
1 −θ −1
ESα (L) = x− (1 − t) dt
1−α α
1
x− 1 1−θ −1
= − (1 − t)
1−α 1 − θ−1 α
θ −θ −1
= x− (1 − α)
θ−1
θ
= VaRα
θ−1
θ
Because θ > 1, we have θ−1 > 1 and:
(d) We have:
∞ 2 !
x−µ
Z
1 1 1
ESα (L) = x √ exp − dx
1−α −1
µ+σΦ (α) σ 2π 2 σ
(e) For the Gaussian distribution, the expected shortfall and the value-at-risk coin-
cide for high confidence level α. It is not the case with the Pareto distribution,
which has a fat tail. The use of the Pareto distribution can then produce risk
measures which may be much higher than those based on the Gaussian distribu-
tion.
Market Risk 15
2. (a) We have:
We notice that: Z ∞ Z 1
E [L] = x dF (x) = F−1 (t) dt
−∞ 0
We have:
and:
R (L + m) = E [L − m] + σ (L − m)
= E [L] − m + σ (L)
= R (L) − m
3. We have:
`i 0 1 2 3 4 5 6 7 8
Pr {L = `i } 0.2 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1
Pr {L ≤ `i } 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
16 Handbook of Financial Risk Management
To this end, we may use the Makarov inequalities. For instance, we may consider
an ordinal sum of the copula C+ for (u1 , u2 ) ≤ (α, α) and another copula Cα
for (u1 , u2 ) > (α, α) to produce a bivariate distribution which does not satisfy
the subadditivity property. By taking for example α = 70% and Cα = C− , we
obtain the following bivariate distribution6 :
`i 0 1 2 3 4 5 6 7 8 p2,i
0 0.2 0.2
1 0.1 0.1
2 0.1 0.1
3 0.1 0.1
4 0.1 0.1
5 0.1 0.1
6 0.1 0.1
7 0.1 0.1
8 0.1 0.1
p1,i 0.2 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1
We then have:
`i 0 2 4 6 8 10 14
Pr {L1 + L2 = `i } 0.2 0.1 0.1 0.1 0.1 0.1 0.3
Pr {L1 + L2 ≤ `i } 0.2 0.3 0.4 0.5 0.6 0.7 1.0
Because F−1 −1 −1
1 (80%) = F2 (80%) = 6 and F1+2 (80%) = 14, we obtain:
F−1 −1 −1
1 (80%) + F2 (80%) < F1+2 (80%)
where RA,t+1 and RB,t+1 are the asset returns of A and B between t and t + 1, and WA,t
and WB,t are the nominal wealth invested in stocks A and B at time t.
1. We have WA,t = +2 and WB,t = −1. The P&L (expressed in USD million) has the
following expression:
Π (w) = 2RA,t+1 − RB,t+1
We have Π (w) ∼ N 0, σ 2 (Π) with:
q
2 2
σ (Π) = (2σA ) + (−σB ) + 2ρA,B × (2σA ) × (−σB )
q
2
= 4 × 0.202 + (−0.20) − 4 × 0.5 × 0.202
√
= 3 × 20%
' 34.64%
The annual volatility of the long/short portfolio is then equal to $346 400. We consider
the square-root-of-time rule to calculate the daily value-at-risk:
1 √
VaR99% (w; one day) = √ × Φ−1 (0.99) × 3 × 20%
260
= 5.01%
The probability to lose $55 560 per day is equal to 1%. We notice that the difference
between the historical VaR and the Gaussian VaR is equal to 11%.
3. If we assume that the average of the last 60 VaRs is equal to the current VaR, we
obtain: √
KIMA = mc × 10 × VaR99% (w; one day)
KIMA is respectively equal to $474 877 and $527 088 for the Gaussian and historical
VaRs. In the case of the standardized measurement method, we have:
KSpecific = 2 × 8% + 1 × 8%
= $240 000
and:
KGeneral = |2 − 1| × 8%
= $80 000
We deduce that:
The internal model-based approach does not achieve a reduction of the required capital
with respect to the standardized measurement method. Moreover, we have to add the
stressed VaR under Basel 2.5 and the IMA regulatory capital is at least multiplied by
a factor of 2.
4. If ρA,B = −0.50, the volatility of the P&L becomes:
q
2
σ (Π) = 4 × 0.202 + (−0.20) − 4 × (−0.5) × 0.202
√
= 7 × 20%
We deduce that:
r
VaRα (ρA,B = −50%) σ (Π; ρA,B = −50%) 7
= = = 1.53
VaRα (ρA,B = +50%) σ (Π; ρA,B = +50%) 3
The value-at-risk increases because the hedging effect of the positive correlation van-
ishes. With a negative correlation, a long/short portfolio becomes more risky than a
long-only portfolio.
5. The P&L formula becomes:
where ∆t is the delta of the option. If the nominal of the option is USD 2 million, we
obtain:
and:
q
2
σ (Π) = 0.202 + (−0.20) − 2 × 0.5 × 0.202
= 20%
The value-at-risk of the long/short portfolio (2.1) is then equal to the value-at-risk of
the short portfolio (2.2) because of two effects: the absolute exposure of the long/short
portfolio is higher than the absolute exposure of the short portfolio, but a part of the
risk of the long/short portfolio is hedged by the positive correlation between the two
stocks.
Market Risk 19
6. We have:
Π (w) = WA,t RA,t+1 − (CB,t+1 − CB,t )
and:
CB,t+1 − CB,t ' ∆t (SB,t+1 − SB,t )
where ∆t is the delta of the option. We note x the nominal of the option expressed
in USD million. We obtain:
Π (w) = 2RA − x × ∆t × RB
x
= 2RA − RB
2
We have7 :
x2 σB
2 x
σ 2 (Π) = 2
4σA + + 2ρA,B × (2σA ) × − σB
4 2
2
σA
x2 − 8ρA,B x + 16
=
4
Minimizing the Gaussian value-at-risk is equivalent to minimizing the variance of the
P&L. We deduce that the first-order condition is:
∂ σ 2 (Π) σ2
= A (2x − 8ρA,B ) = 0
∂x 4
We deduce that the minimum VaR is reached when the nominal of the option is
x = 4ρA,B . We finally obtain:
σA q
σ (Π) = 16ρ2 − 32ρ2A,B + 16
2 q A,B
= 2σA 1 − ρ2A,B
and:
1 q
VaR99% (w; one day) = √ × 2.33 × 2 × 20% × 1 − ρ2A,B
260
q
' 5.78% × 1 − ρ2A,B
If ρA,B is negative (resp. positive), the exposure x is negative meaning that we have
to buy (resp. to sell) a call option on stock B in order to hedge a part of the risk
related to stock A. If ρA,B is equal to zero, the exposure x is equal to zero because a
position on stock B adds systematically a supplementary risk to the portfolio.
(b) To find the correlation between the stocks and the index, we can proceed in two
different ways.
i. We consider the random vector R = (RA , RB , RI ). The formula cov (R) =
σ 2 (RI ) ββ > + D is still valid with β3 = βI = 1 and D3,3 = σ̃I2 = 0%. We
obtain:
σ 2 (RI ) βA βI 4% × 0.5 × 1
ρ (RA , RI ) = = = 50%
σ (RA ) σ (RI ) 20% × 20%
and:
σ 2 (RI ) βB βI 4% × 1.5 × 1
ρ (RB , RI ) = = = 75%
σ (RB ) σ (RI ) 40% × 20%
ii. The definition of beta βj is:
cov (Rj , RI ) ρ (Rj , RI ) σ (Rj ) σ (RI )
βj = =
σ 2 (RI ) σ 2 (RI )
It follows that:
σ (RI )
ρ (Rj , RI ) = βj
σ (Rj )
We retrieve the previous formula.
(c) The correlation matrix is then equal to:
100.0%
ρ = 37.5% 100.0%
50.0% 75.0% 100.0%
We deduce that the covariance matrix Σ is:
4%
Σ = 3% 16%
2% 6% 4%
2. Let w = (wA , wB , wI ) be the composition of the portfolio. The expression of the P&L
between t and t + h is:
Π (w) = wA (SA,t+h − SA,t ) + wB (SB,t+h − SB,t ) + wA (SI,t+h − SI,t )
= wA SA,t RA,t+h + wB SB,t RB,t+h + wI SI,t RI,t+h
= WA RA,t+h + WB RB,t+h + WI RI,t+h
= W > Rt+h
where Wj is the current wealth invested in asset j, W = (WA , WB , WI ) is the vector
of dollar notionals and Rt+h = (RA,t+h , RB,t+h , RI,t+h ) is the random vector of asset
returns.
Market Risk 21
σ 2 (Π) = W > ΣW
= 4002 × 4% + 5002 × 16% + 2502 × 4% +
2 × 400 × 500 × 3% + 2 × 400 × 250 × 2% +
2 × 500 × 250 × 6%
We find that σ (Π) is equal to $282 67. Using the square-root-of-time rule9 , it
follows that:
r
−1 2
VaR99% (w; ten days) = Φ (99%) × 282.67 ×
52
= $128.96
(b) The 99% quantile corresponds to the 2.6th order statistic of the sample. The
historical value-at-risk is then the interpolated value between the second and
third largest losses:
(c) If we assume that the average of the last 60 VaRs is equal to the current VaR,
we obtain:
KIMA = mc × VaR99% (w; ten days)
KIMA is respectively equal to $387 and $506 for the Gaussian and historical
VaRs. In the case of the standardized measurement method, we have10 :
KSpecific = (WA + WB ) × 8% + WI × 4%
= 900 × 8% + 250 × 4%
= $82
and:
KGeneral = |WA + WB + WI | × 8%
= $92
We deduce that:
weeks.
10 We assume that the specific capital charge for an equity index is 4%.
22 Handbook of Financial Risk Management
3. Let x be the number of put options. The expression of the P&L becomes:
where Pt is the value of the put option at time t. Under the delta approach, we have:
We deduce that:
(a) To hedge 50% of the index exposure, the number of put options must satisfy the
following equation:
250 − 12.5x = 125
The portfolio manager must purchase 10 put options. In this case, the expression
of the P&L becomes:
As the index return is not correlated with the idiosyncratic risks, minimizing the
VaR is equivalent to minimizing the beta exposure in the index:
1200
x= = 96
12.5
The purchase of 96 put options is required to remove the directional risk. In this
case, the P&L reduces to:
We deduce that the minimum 10-day VaR is equal to $68.13. In Figure 2.4, we
show the evolution of the VaR with the number of purchased options. We verify
that the minimum is reached for x = 96.
Market Risk 23
FIGURE 2.4: Value of the 10-day VaR with respect to the number of purchased options
1
Π ≈ −0.49 × 0 − × 0.02 × 02 − 0.38 × (22 − 20)
2
= −0.76
To compare this value with the true P&L, we have to calculate Ct+1 :
We deduce that:
Π = Ct+1 − Ct+2
= 5.41 − 6.17
= −0.76
3. We have:
1 2
Π ≈ −0.44 × (95 − 97) − × 0.018 × (95 − 97) −
2
0.38 × (19 − 22)
= 0.88 − 0.036 + 1.14
= 1.984
The P&L approximated by the Greek coefficients largely overestimate the true value
of the P&L.
4. We notice that the approximation using the Greek coefficients works very well when
one risk factor remains constant:
(a) Between t and t+1, the price of the underlying asset changes, but not the implied
volatility;
(b) Between t + 1 and t + 2, this is the implied volatility that changes whereas the
price of the underlying asset is constant.
Therefore, we can assume that the bad approximation between t + 2 and t + 3 is due
to the cross effect between St and Σt . In terms of model risk, the P&L is then exposed
to the vanna risk, meaning that the Black-Scholes model is not appropriate to price
and hedge this exotic option.
Market Risk 25
We have:
∂ d1 ∂ d2 1
= = √
∂ St ∂ St St Σt τ
We finally obtain:
St e(bt −rt )τ φ (d1 ) − Ke−rt τ φ (d2 )
∆t = e(bt −rt )τ Φ (d1 ) + √
St Σt τ
= e(bt −rt )τ Φ (d1 )
The expression of the gamma is therefore:
e(bt −rt )τ φ (d1 )
Γt = √
St Σt τ
To calculate the theta, we first calculate the derivative of d1 and d2 with respect to τ :
∂ d1 1 S bt Σ
= − √ ln t + √ + √t
∂τ 2Σt τ τ K 2Σt τ 4 τ
∂ d2 1 S bt Σ
= − √ ln t + √ − √t
∂τ 2Σt τ τ K 2Σt τ 4 τ
We deduce then:
∂τ Ct (St , Σt , T ) = (bt − rt ) St e(bt −rt )τ Φ (d1 ) + rt Ke−rt τ Φ (d2 ) +
∂ d1 ∂ d2
St e(bt −rt )τ φ (d1 ) − Ke−rt τ φ (d2 )
∂τ ∂τ
= (bt − rt ) St e(bt −rt )τ Φ (d1 ) + rt Ke−rt τ Φ (d2 ) +
∂ d1 ∂ d2
St e(bt −rt )τ φ (d1 ) −
∂τ ∂τ
= (bt − rt ) St e(bt −rt )τ Φ (d1 ) + rt Ke−rt τ Φ (d2 ) +
Σt Σ
St e(bt −rt )τ φ (d1 ) √ + √t
4 τ 4 τ
= (bt − rt ) St e(bt −rt )τ Φ (d1 ) + rt Ke−rt τ Φ (d2 ) +
1
√ St Σt e(bt −rt )τ φ (d1 )
2 τ
The expression of the theta coefficient is then the opposite of ∂τ Ct (St , Σt , T ). For the
vega coefficient, we obtain:
∂ d1 ∂ d2
υt = St e(bt −rt )τ φ (d1 ) − Ke−rt τ φ (d2 )
∂ Σt ∂ Σt
(bt −rt )τ ∂ d1 ∂ d2
= St e φ (d1 ) −
∂ Σt ∂ Σt
We have:
1√
∂ d1 1 St
= − 2√ ln + bt τ + τ
∂ Σt Σt τ K 2
1√
∂ d2 1 St
= − 2√ ln + bt τ − τ
∂ Σt Σt τ K 2
It follows that: √
υt = St τ e(bt −rt )τ φ (d1 )
Market Risk 27
In this case, the approximation of the P&L by the Greek sensitivities is not very
good. Indeed, the remaining maturity is now six months meaning that (1) the
theta effect is not well measured and (2) the price of the underlying asset has
changed significantly. In this situation, the delta P&L is overestimated.
and:
" 2 #
2 1 2
St2
E Π = E ∆t Rt+h St + Γt Rt+h
2
1
= E ∆2t Rt+h
2
St2 + ∆t Γt Rt+h
3
St3 + Γ2t Rt+h
4
St4
4
We have Rt+h = σX with X ∼ N (0, 1). It follows that:
3
E Π2 = ∆2t σ 2 St2 + Γ2t σ 4 St4
4
because E [X] = 0, E X 2 = 1, E X 3 = 0 and E X 4 = 3. The standard
deviation of the P&L is then:
s 2
3 1
σ (Π) = ∆2t σ 2 St2 + Γ2t σ 4 St4 − Γt σ 2 St2
4 2
r
1
= ∆2t σ 2 St2 + Γ2t σ 4 St4
2
Therefore, the Gaussian approximation of the P&L is:
1 2 2 2 2 2 1 2 4 4
Π (w) ∼ N Γt σ St , ∆t σ St + Γt σ St
2 2
We deduce that the Gaussian value-at-risk is:
r
1 1
VaRα (w; h) = − Γt σ 2 St2 + Φ−1 (α) ∆2t σ 2 St2 + Γ2t σ 4 St4
2 2
The numerical application gives VaRα (w; h) = 2.29 dollars.
(c) Let L = −Π be the loss. We recall that the Cornish-Fisher value-at-risk is equal
to (FRM, page 88):
VaRα (w; h) = µ (L) + z (α; γ1 (L) , γ2 (L)) · σ (L)
with:
1 2 1
zα3 − 3zα γ2 −
z (α; γ1 , γ2 ) = zα + zα − 1 γ1 +
6 24
1 3
2
2zα − 5zα γ1 + · · ·
36
and zα = Φ−1 (α). γ1 et γ2 are the skewness and excess kurtosis of the loss L.
We have seen that:
1
Π (w) = ∆t σSt X + Γt σ 2 St2 X 2
2
3
with X
5 ∼ N (0,
7 1). Using the
2 results in
4Question 1,
6we have E [X] 8 X =
= E
E X = E X = 0, E X = 1, E X = 3, E X = 15 and E X = 105.
We deduce that:
3
E Π3 = E ∆3t σ 3 St3 X 3 + ∆2t Γt σ 4 St4 X 4 +
2
3 1
E ∆t Γ2t σ 5 St5 X 5 + Γ3t σ 6 St6 X 6
4 8
9 2 15
= ∆ Γt σ 4 St4 + Γ3t σ 6 St6
2 t 8
30 Handbook of Financial Risk Management
and:
" 4 #
1
E Π4 = ∆t σSt X + Γt σ 2 St2 X 2
E
2
45 2 2 6 6 105 4 8 8
= 3∆4t σ 4 St4 + ∆ Γ σ St + Γ σ St
2 t t 16 t
The centered moments are then:
h i
3
= E Π3 − 3E [Π] E Π2 + 2E3 [Π]
E (Π − E [Π])
9 2 15 3
= ∆ Γt σ 4 St4 + Γ3t σ 6 St6 − ∆2t Γt σ 4 St4 −
2 t 8 2
9 3 6 6 2 3 6 6
Γ σ St + Γt σ St
8 t 8
= 3∆2t Γt σ 4 St4 + Γ3t σ 6 St6
and:
h i
4
E Π4 − 4E [Π] E Π3 + 6E2 [Π] E Π2 −
E (Π − E [Π]) =
3E4 [Π]
45 2 2 6 6 105 4 8 8
= 3∆4t σ 4 St4 + ∆ Γ σ St + Γ σ St −
2 t t 16 t
15
9∆2t Γ2t σ 6 St6 − Γ4t σ 8 St8 +
4
3 2 2 6 6 9 4 8 8 3
∆t Γt σ St + Γt σ St − Γ4t σ 8 St8
2 8 16
15
= 3∆t σ St + 15∆t Γt σ St + Γ4t σ 8 St8
4 4 4 2 2 6 6
4
It follows that the skewness is:
γ2 (L) = γ2 (Π)
h i
4
E (Π − E [Π])
= −3
σ 4 (Π)
15 4 8 8
3∆4t σ 4 St4 + 15∆2t Γ2t σ 6 St6 + 4 Γt σ St
= 2 −3
∆2t σ 2 St2 + 12 Γ2t σ 4 St4
Using the numerical values, we obtain µ (L) = −0.0400, σ (L) = 1.0016, γ1 (L) =
−0.2394, γ2 (L) = 0.0764, z (α; γ1 , γ2 ) = 2.1466 and VaRα (w; h) = 2.11 dollars.
The value-at-risk is reduced with the Cornish-Fisher approximation because the
skewness is negative whereas the excess kurtosis is very small.
3. (a) We have:
Y = X > AX
>
= Σ−1/2 X Σ1/2 AΣ1/2 Σ−1/2 X
= X̃ > ÃX̃
E [Y ] = µ̃> õ̃ + tr Ã
= µ> Aµ + tr Σ1/2 AΣ1/2
= µ> Aµ + tr (AΣ)
and:
E Y 2 − E2 [Y ]
var (Y ) =
4µ̃> Ã2 µ̃ + 2 tr Ã2
=
= 4µ> AΣAµ + 2 tr Σ1/2 AΣAΣ1/2
2
= 4µ> AΣAµ + 2 tr (AΣ)
E [Y ] = tr (AΣ)
2 2
E Y2
= (tr (AΣ)) + 2 tr (AΣ)
3 2 3
E Y3
= (tr (AΣ)) + 6 tr (AΣ) tr (AΣ) + 8 tr (AΣ)
4 3
E Y4
= (tr (AΣ)) + 32 tr (AΣ) tr (AΣ) +
2
2 2 2
12 tr (AΣ) + 12 (tr (AΣ)) tr (AΣ) +
4
48 tr (AΣ)
4. We have:
Π (w) = w> (Ct+h − Ct )
where Ct is the vector of option prices.
5. (a) Using the numerical values, we obtain µ (L) = −78.65, σ (L) = 88.04, γ1 (L) =
−2.5583 and γ2 (L) = 10.2255. The value-at-risk is then equal to 0 for the delta
approximation, 126.16 for the delta-gamma approximation and −45.85 for the
Cornish-Fisher approximation. We notice that we obtain an absurd result in the
last case, because the distribution is far from the Gaussian distribution (high
skewness and kurtosis). If we consider a smaller order expansion:
1 2 1
zα3 − 3zα γ2
z (α; γ1 , γ2 ) = zα + zα − 1 γ1 +
6 24
the value-at-risk is equal to 171.01.
(b) In this case, we obtain 126.24 for the delta approximation, 161.94 for the delta-
gamma approximation and −207.84 for the Cornish-Fisher approximation. For
the delta approximation, the risk decomposition is:
Option wi MRi RC i RC ?i
1 50.00 0.86 42.87 33.96%
2 20.00 0.77 15.38 12.19%
3 30.00 2.27 67.98 53.85%
R (w) 126.24
13 You may easily verify that we obtained this formula in the case n = 2 by developing the different
polynomials.
Market Risk 35
Option wi MRi RC i RC ?i
1 50.00 4.06 202.92 125.31%
2 20.00 1.18 23.62 14.59%
3 30.00 1.04 31.10 19.21%
R (w) 161.94
We notice that the delta-gamma approximation does not satisfy the Euler de-
composition.
We deduce that:
Z ∞ 2 !
1 x 1 x + µ (w)
ESα (w; h) = √ exp − dx
1−α x− σ (w) 2π 2 σ (w)
+∞ Φ−1 (1−α)
p 2
t + u2 − 2ρtu
µi + Σi,i t
Z Z
I= exp − dt du
2 (1 − ρ2 )
p
−∞ −∞ 2π 1 − ρ2
p
By considering the change of variables (t, u) = ϕ (t, v) such that u = ρt + 1 − ρ2 v,
we obtain15 :
Z +∞ Z g(t) p 2
t + v2
µi + Σi,i t
I = exp − dt dv
−∞ −∞ 2π 2
Z +∞ Z g(t) 2
t + v2
1
= µi exp − dt dv +
−∞ −∞ 2π 2
Z +∞ Z g(t) 2
t + v2
p t
Σi,i exp − dt dv +
−∞ −∞ 2π 2
p
= µi I1 + Σi,i I2
Φ−1 (1 − α) − ρt
g (t) = p
1 − ρ2
The computation of the second integral I2 is a little bit more tedious. Integration by
parts with the derivative function tφ (t) gives:
Z +∞ !
Φ−1 (1 − α) − ρt
I2 = Φ p tφ (t) dt
−∞ 1 − ρ2
Z +∞ !
ρ Φ−1 (1 − α) − ρt
= −p φ p φ (t) dt
1 − ρ2 −∞ 1 − ρ2
Z +∞ !
−1
ρ t − ρΦ (1 − α)
φ Φ−1 (1 − α)
= −p φ p dt
1 − ρ2 −∞ 1 − ρ2
= −ρφ Φ−1 (1 − α)
= µi (1 − α) − ρ Σi,i φ Φ−1 (1 − α)
p
I
(Σw)i
φ Φ−1 (α)
= µi (1 − α) − √
w> Σw
We finally obtain that:
where RA,t+h and RB,t+h are the stock returns for the period [t, t + h]. We deduce
that the variance of the P&L is:
2 2
σ 2 (Π) = 400 × (25%) + 600 × (20%) +
2 × 400 × 600 × (−20%) × 25% × 20%
= 19 600
We deduce that σ (Π) = $140. We know that the one-year expected shortfall is a linear
function of the volatility:
φ Φ−1 (α)
ESα (w; one year) = × σ (Π)
1−α
= 2.34 × 140
= $327.60
2. We have:
Πs = 400 × RA,s + 600 × RB,s
We deduce that the value Πs of the daily P&L for each scenario s is:
s 1 2 3 4 5 6 7 8
Πs −36 −10 −24 −26 −12 −30 −14 −16
Πs:250 −36 −30 −26 −24 −16 −14 −12 −10
Market Risk 39
The value-at-risk at the 97.5% confidence level correspond to the 6.25th order statis-
tic17 . We deduce that the historical expected shortfall for a one-day time horizon is
equal to:
By considering the square-root-of-time rule, it follows that the 10-day expected short-
fall is equal to $76.95.
where RA,t+h and RB,t+h are the stock returns for the period [t, t + h].
We have σ (Πt,t+260 ) = $30. It follows that the 10-day standard deviation is equal to:
r
10
σ (Πt,t+10 ) = × σ (Πt,t+260 )
260
= $5.883
(a) We obtain:
(b) We have:
φ Φ−1 (α)
ESα (w; ten days) = × σ (Πt,t+10 )
1−α
and:
φ Φ−1 (97.5%)
= 2.3378
1 − 97.5%
≈ 2.34
2. Given the historical scenario s, the one-day simulated P&L is equal to:
The order statistic Πs:250 of the daily P&L is given in Table 2.1.
(a) We deduce that the one-day value-at-risk at the 99% confidence level corresponds
to the 2.5nd order statistic:
−6.0 − 5.1
VaR99% (w; one day) = − = $5.55
2
It follows that:
√
VaR99% (w; ten days) = 10 × VaR99% (w, one day) = $17.55
(b) The value-at-risk at the 97.5% confidence level correspond to the 6.25th order
statistic. We deduce that the historical expected shortfall for a one-day time
horizon is equal to:
6
1X
ES97.5% (w; one day) = − Πs:250
6 s=1
1
= (6.3 + 6.0 + 5.1 + 4.8 + 4.6 + 4.5)
6
= $5.22
We deduce that:
x−xi
n Z
1X h
E [X · 1 {X ≤ x}] = xi K (u) du +
n i=1 −∞
x−xi
n Z
1X h
h uK (u) du
n i=1 −∞
2. We have:
x−xi x−xi !
n Z n Z
1X h 1X h
xi K (u) du = xi K (u) du
n i=1 −∞ n i=1 −∞
n
1X x − xi
= xi I
n i=1 h
3. Since we have:
Z x−xi x−x
h
i Z x−xi
h h
uK (u) du = uI (u) − I (u) du
−∞ −∞ −∞
we deduce that:
Z x−xi
h
x − xi x − xi
uK (u) du ≤ · I
h h
−∞
It follows that:
Z x−xi Z x−xi
h h
h uK (u) du = h uK (u) du
−∞ −∞
→ 0 when h → 0
We conclude that:
1
ES α (w; h) = E [L (w) · 1 {L (w) ≥ VaRα (w; h)}]
(1 − α)
1
= − E [Π (w) · 1 {Π (w) ≤ − VaRα (w; h)}]
(1 − α)
nS !
1 1 X − VaRα (w; h) − Πs
≈ − Πs I
(1 − α) nS s=1 h
Pr {U ≤ u} = Pr {S (τ ) ≤ u}
= Pr τ ≥ S−1 (u)
= S S−1 (u)
= u
2. (a) The premium leg is paid quarterly. The coupon payment is then equal to:
PL (tm ) = ∆tm × s × N
1
= × 150 × 10−4 × 106
4
= $3 750
In case of default, the default leg paid by protection seller is equal to:
DL = (1 − R) × N
= (1 − 40%) × 106
= $600 000
The corresponding cash flow chart is given in Figure 3.1. If the reference entity
does not default, the P&L of the protection seller is the sum of premium interests:
If the reference entity defaults in one year and two months, the P&L of the
protection buyer is1 :
X
Πbuyer = (1 − R) × N − ∆tm × s × N
tm <τ
2
= (1 − 40%) × 106 − 4 + × 3 750
3
= $582 500
43
44 Handbook of Financial Risk Management
' $
Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8
τ time
(c) We denote by s 0 the new CDS spread. The default probability becomes:
s0
PD =
1−R
450 × 10−4
=
1 − 40%
= 7.50%
The protection buyer is short credit and benefits from the increase of the default
probability. His mark-to-market is therefore equal to:
Πbuyer = N × (s 0 − s ) × RPV01
= 106 × (450 − 150) × 10−4 × 1.189
= $35 671
2 We recall that the one-year default probability is approximately equal to λ:
PD = 1 − S (1)
= 1 − e−λ
' 1 − (1 − λ)
' λ
Credit Risk 45
The offsetting mechanism is then the following: the protection buyer B transfers
the agreement to C, who becomes the new protection buyer; C continues to
pay a premium of 150 bps to the protection seller A; in return, C pays a cash
adjustment of $35 671 to B.
3. (a) For a given date t, the credit curve is the relationship between the maturity T
and the spread st (T ). The credit curve of the reference entity #1 is almost flat.
For the entity #2, the spread is very high in the short-term, meaning that there is
a significative probability that the entity defaults. However, if the entity survive,
the market anticipates that it will improve its financial position in the long-run.
This explains that the credit curve #2 is decreasing. For reference entity #3, we
obtain opposite conclusions. The company is actually very strong, but there are
some uncertainties in the future3 . The credit curve is then increasing.
(b) If we consider a standard recovery rate (40%), the implied default probability is
2.50% for #1, 10% for #2 and 1.33% for #3. We can consider a short credit posi-
tion in #2. In this case, we sell the 5Y protection on #2 because the model tells
us that the market default probability is over-estimated. In place of this direc-
tional bet, we could consider a relative value strategy: selling the 5Y protection
on #2 and buying the 5Y protection on #3.
4. (a) Let τk:n be the k th default among the basket. FtD, StD and LtD are three CDS
products, whose credit event is related to the default times τ1:n , τ2:n and τn:n .
(b) The default correlation ρ measures the dependence between two default times
τi and τj . The spread of the FtD (resp. LtD) is a decreasing (resp. increasing)
function with respect to ρ.
(c) To fully hedge the credit portfolio of the 3 entities, we can buy the 3 CDS.
Another solution is to buy the FtD plus the StD and the LtD (or the third-to-
default). Because these two hedging strategies are equivalent, we deduce that:
(d) We notice that the default correlation does not affect the value of the CDS
basket, but only the price distribution between FtD, StD and LtD. We obtain a
similar result for CDO4 . In the case of the subprime crisis, all the CDO tranches
have suffered, meaning that the price of the underlying basket has dropped. The
reasons were the underestimation of default probabilities.
We deduce that:
√
VaRα (w) = Φ−1 (α) w> Σw
3 An example is a company whose has a monopoly because of a strong technology, but faces a hard
competition because technology is evolving fast in its domain (e.g. Blackberry at the end of 2000s).
4 The junior, mezzanine and senior tranches can be viewed as FtD, StD and LtD.
46 Handbook of Financial Risk Management
(b) We have:
∂ VaRα (w) ∂ −1 1
= Φ (α) w> Σw 2
∂w ∂w
1 > − 1
= Φ−1 (α) w Σw 2 (2Σw)
2
−1 Σw
= Φ (α) √
w> Σw
The risk contribution of the ith credit is the product of the exposure by the
marginal risk:
RC i = wi × MRi
wi × (Σw)i
= Φ−1 (α) √
x> Σx
We finally obtain:
−1 −1 √
E ε | L (w) = F−1 (α) = Σw w> Σw
Φ (α) w> Σw
Σw
= Φ−1 (α) √
w> Σw
∂ VaRα (w)
=
∂w
The marginal VaR of the ith credit is then equal to the conditional mean of the
individual loss εi given that the portfolio loss is exactly equal to the value-at-risk.
2. (a) EADi is the exposure at default, LGDi is the loss given default, τi is the default
time and Ti is the maturity of the credit i. We have:
wi = EADi
εi = LGDi ×1 {τi < Ti }
The exposure at default is not random, which is not the case of the loss given
default.
(b) We have to make the following assumptions:
i. the loss given default LGDi is independent from the default time τi ;
Credit Risk 47
iii. the default times depend on a common risk factor X and the relationship is
monotonic (increasing or decreasing).
In this case, we have:
RC i = wi × MRi
EADi ×E [LGDi ] × E Di | L = F−1 (α)
=
(d) i. We have
h√ p √ p i
E [Zi Zj ] = E ρX + 1 − ρεi ρX + 1 − ρεj
= ρ
pi = Pr {τi ≤ Ti }
= Pr {Zi ≤ Bi }
= Φ (Bi )
pi (x) = Pr {Zi ≤ Bi | X = x}
n√ p o
= Pr ρX + 1 − ρεi ≤ Bi | X = x
√
Bi − ρX
= Pr εi ≤ √ X=x
1−ρ
√
Bi − ρx
= Φ √
1−ρ
−1 √
Φ (pi ) − ρx
= Φ √
1−ρ
48 Handbook of Financial Risk Management
n
X
L = EADi ×E [LGDi ] × pi (X)
i=1
n √
Φ−1 (pi ) − ρX
X
= EADi ×E [LGDi ] × Φ √
i=1
1−ρ
= g (X)
⇔ Pr X ≤ g −1 (VaRα (w)) = 1 − α
It follows that:
g Φ−1 (1 − α)
VaRα (w) =
Xn
EADi ×E [LGDi ] × pi Φ−1 (1 − α)
=
i=1
and:
f (t) = ∂t F (t) = −∂t S (t)
1
λ (t) = lim Pr {t ≤ τ ≤ t + ∆ | τ ≥ t}
∆→0+ ∆
1 Pr {t ≤ τ ≤ t + ∆}
= lim+
∆→0 ∆ Pr {τ ≥ t}
1 Pr {t ≤ τ ≤ t + ∆}
= lim+
Pr {τ ≥ t} ∆→0 ∆
f (t)
=
S (t)
λe−λt
λ (t) = =λ
e−λt
We deduce that:
λ1 e−λ1 t
if t ≤ 3
f (t) = λ2 e−3λ1 −λ2 (t−3) if 3 < t ≤ 5
λ3 e−3λ1 −2λ2 −λ3 (t−5) if t > 5
(b) Let (t?1 , t?2 , t?3 ) be the knots of the piecewise exponential model5 . We note that
? ?
t?m−1 e−λm (t−tm−1 ) and f (t) = λm S t?m−1 e−λm (t−tm−1 ) . When T ∈
?(t) = S
S
tm−1 , t?m , it follows that:
RT
(1 − R) × 0 e−rt f (t) dt
s (T ) = RT
0
e−rt S (t) dt
R ?
t RT
(1 − R) × 0 m−1 e−rt f (t) dt + t? e−rt f (t) dt
m−1
= R t? RT
m−1 −rt −rt
0 e S (t) dt + t ? e S (t) dt
m−1
t?
m−1
T
e−(r+λm )t
?
= S t?m−1 eλm tm−1
− (r + λm ) t?
m−1
−(r+λm )t?
? e m−1− e−(r+λm )T
= S t?m−1 eλm tm−1
(r + λm )
?
− e−rT e m (T −tm−1 )
?
e−rtm−1 −λ
= S t?m−1
(r + λm )
We obtain the following cases:
i. If T ≤ 3, we have:
RT
(1 − R) × 0 e−rt f (t) dt
s (T ) = RT
0
e−rt S (t) dt
(1 − R) × λ1 × I (0, T )
=
I (0, T )
= (1 − R) × λ1
ii. If 3 < T ≤ 5, we have:
R RT
3
(1 − R) × 0 e−rt f (t) dt + 3 e−rt f (t) dt
s (T ) = R
3 −rt RT
e S (t) dt + e −rt S (t) dt
0 3
λ1 I (0, 3) + λ2 I (3, T )
= (1 − R) ×
I (0, 3) + I (3, T )
iii. If T > 5, we have:
λ1 I (0, 3) + λ2 I (3, 5) + λ3 I (5, T )
s (T ) = (1 − R) ×
I (0, 3) + I (3, 5) + I (5, T )
5 We use the convention t?0 = 0.
52 Handbook of Financial Risk Management
s (3) = (1 − R) × λ1
I(0,3)+λ2 I(3,5)
s (5) = (1 − R) × λ1 I(0,3)+I(3,5) (3.1)
s (7) = (1 − R) × λ1 I(0,3)+λ2 I(3,5)+λ3 I(5,7)
I(0,3)+I(3,5)+I(5,7)
s (3)
λ̂1 =
(1 − R)
We can now solve numerically the second equation and we obtain λ̂2 . Finally,
we solve the nonlinear third equation to obtain λ̂3 . This iterative approach of
calibration is known as the bootstrapping method.
(d) When r is equal to zero and λm is small, the function I t?m−1 , T becomes:
?
1 − e−λm (T −tm−1 )
t?m−1 , T t?m−1
I = S
λm
? ?
≈ S tm−1 T − tm−1
≈ T − t?m−1
s (T )
λ (T ) =
(1 − R)
λ̂1 = λ (3)
I (0, 3) + I (3, 5) I (0, 3)
λ̂2 = λ (5) − λ̂1
I (3, 5) I (3, 5)
5λ (5) − 3λ (3)
≈
2
I (0, 3) + I (3, 5) + I (5, 7) λ̂1 I (0, 3) + λ̂2 I (3, 5)
λ̂3 = λ (7) −
I (5, 7) I (5, 7)
7λ (7) − 5λ (5)
≈
2
We notice that:
s (3) = (1 − R) × λ̂1
!
3λ̂1 + 2λ̂2
s (5) = (1 − R) ×
5
!
3λ̂1 + 2λ̂2 + 2λ̂3
s (7) = (1 − R) ×
7
The spread is then a weighted average of the different hazard rates, whose weights
are proportional to the interval time between two knots.
Credit Risk 53
(e) Using a numerical solver, we obtain λ̂1 = 166.7 bps, λ̂2 = 401.2 bps and λ̂3 =
322.4 bps6 .
(f) Since S (τ ) ∼ U[0,1] , the simulated default time t is S−1 (u) where u is a uniform
random number. If u > S (3), we have e−λ1 t = u or t = −λ−1 1 ln u. If S (5) < u ≤
S (3), it follows that S (3) e−λ2 (t−3) = u or t = 3 + λ−1 2 (ln S (3) − ln u). Finally,
we obtain t = 5 + λ−1 3 (ln S (5) − ln u) if u < S (5). Using the previous numerical
values, we find that S (3) = 0.951 and S (5) = 0.878. The simulated default times
are then:
2.449 for u = 0.96
46.54 for u = 0.23
t=
4.380 for u = 0.90
7.881 for u = 0.80
(b) We have:
n
X
` (α, β) = ln f (xi )
i=1
n
X n
X
= −n ln B (α, β) + (α − 1) ln xi + (β − 1) ln (1 − xi )
i=1 i=1
and:
n
∂ ` (α, β) ∂β B (α, β) X
= −n + ln (1 − xi ) = 0
∂β B (α, β) i=1
(c) Let µLGD and σLGD be the mean and standard deviation of the LGD parameter.
The method of moments consists in estimating α and β such that:
α
= µLGD
α+β
and:
αβ 2
2 = σLGD
(α + β) (α + β + 1)
We have:
(1 − µLGD )
β=α
µLGD
and:
2 2
(α + β) (α + β + 1) σLGD = αβ
It follows that:
2
2 (1 − µLGD )
(α + β) = α+α
µLGD
α2
=
µ2LGD
and:
α2
(1 − µLGD ) 2 (1 − µLGD )
αβ = α+α + 1 σLGD = α2
µ2LGD µLGD µLGD
We deduce that:
(1 − µLGD ) (1 − µLGD ) µLGD
α 1+ = 2 −1
µLGD σLGD
We finally obtain:
µ2LGD (1 − µLGD )
α̂MM = 2 − µLGD (3.2)
σLGD
2
µLGD (1 − µLGD )
β̂MM = 2 − (1 − µLGD ) (3.3)
σLGD
Credit Risk 55
We deduce that:
ln S t?m−1 − ln S (t?m )
λm =
t?m − t?m−1
56 Handbook of Financial Risk Management
with S (t?0 ) = S (0) = 1. Here, the knots of the piecewise function are t?1 = 2, t?2 = 4
and t?3 = 6. If we consider the risk class A, we deduce that:
ln 1 − ln (1 − 1%)
λ1 = = 50.3 bps
2−0
ln (1 − 1%) − ln (1 − 2.49%)
λ2 = = 75.8 bps
4−2
ln (1 − 2.49%) − ln (1 − 4.296%)
λ3 = = 93.5 bps
6−4
We finally obtain the following results:
Rating A B C
λ1 50.3 256.5 1115.7
λ2 75.8 275.9 856.9
λ3 93.5 277.8 650.2
3. Let P (t) be the transition matrix between 0 and t. The Markov generator of P (t) is
the matrix Λ = (λi,j ) defined by:
with:
ln Si (2m − 2) − ln Si (2m)
λm =
2
and Si (2m) = 1 − Pi,4 (2m). For the Markov generator, we have:
Si (t) = 1 − e>
i P (t) e4
= 1 − e> tΛ̂
i e e4
We deduce that:
−∂t Si (t)
λi (t) =
Si (t)
e> tΛ̂
i Λ̂e e4
=
1 − e> tΛ̂
i e e4
Credit Risk 57
In the long-run, the markov chain is stationary. This means that the default probability
of the different risk classes is the same when t tends to ∞ and we have:
In the short-run, the hazard rate are ranked with respect to the risk class:
We deduce that the function λA (t) is increasing whereas the function λC (t) is de-
creasing. For the rating B, the behavior of the hazard function is more complex. It
first increases like λA (t) and reaches a maximum at t = 4.2, because the transition
probability to risk classes C and D is very high. Then, it decreases because of the
stationarity property.
P (n) = P (n − 1) P
We deduce that:
n
Y
P (n) = P (0) P
t=1
= Pn
PV = V D
We deduce that:
P (2) V = PV D
= V DD
= V D2
By recursion, we obtain:
P (n) V = V Dn
We can then calculate P (n) as follows:
P (n) = V Dn V −1
(b) We have:
0.4670 −0.2808 −0.0264 1.0000
0.3561 0.8486 −0.2373 1.0000
V =
0.2065
0.5363 0.8609 1.0000
0.0000 0.0000 0.0000 1.0000
and
0.9717 0.0000 0.0000 0.0000
0.0000 0.8111 0.0000 0.0000
D=
0.0000 0.0000 0.5571 0.0000
0.0000 0.0000 0.0000 1.0000
We deduce that:
0.7506 0.0000 0.0000 0.0000
0.0000 0.1233 0.0000 0.0000
D10 =
0.0000
0.0000 0.0029 0.0000
0.0000 0.0000 0.0000 1.0000
We verify that:
62.60% 13.14% 5.53% 18.73%
38.42% 20.74% 6.81% 34.03%
V D10 V −1 =
21.90%
12.29% 4.35% 61.46%
0.00% 0.00% 0.00% 100.00%
= P (10)
3. Let Ri (n) be the rating of a firm at time n whose initial rating is the state i. We
have:
In the piecewise exponential model, we recall that the survival function has the fol-
lowing expression:
Si (n) = Si (n − 1) e−λi (n)
We deduce that:
λi (n) = ln Si (n − 1) − ln Si (n)
1 − e> n−1
i P e4
= ln
1 − e> n
i P e4
We verify that:
1
λi (1) = ln
1 − e> n
i P e4
− ln 1 − e> n
= i P e4
because Si (0) = 1. Numerical values of Si (n) and λi (n) are given in Table 3.1.
Credit Risk 59
4. Let P (t) be the transition matrix between 0 and t. The Markov generator of P (t) is
the matrix Λ = (λi,j ) defined by:
Λ = t−1 ln P (t)
In particular, we have:
ln P (n)
Λ̂ =
n
ln P n
=
n
= ln P
We obtain:
−6.4293 3.2282 2.4851 0.7160
11.3156 −23.5006 9.9915 2.1936 × 10−2
Λ̂ =
5.3803 21.6482 −52.3649 25.3364
0.0000 0.0000 0.0000 0.0000
P4
We verify that Λ̂ is a Markov generator because j=1 λi,j = 0 and λi,j ≥ 0 when
i 6= j.
5. We have:
P (t) = exp (tΛ)
We remind that:
M2 M3
eM = I + M + + + ...
2! 3!
We deduce that:
t2 2 t3 3 t4 4
P (t) = I4 + tΛ + Λ + Λ + Λ + ...
2 6 24
60 Handbook of Financial Risk Management
6. We have:
We know that:
fi (t) ∂t Si (t)
λi (t) = =−
Si (t) Si (t)
We deduce that:
e> tΛ
i Λe e4
λi (t) =
1 − e> tΛ
i e e4
µ (x) = E [Li | X = x]
= E [LGDi ] pi (x)
= Ei pi (1 + $i (x − 1))
and:
υ (x) = σ 2 (Li | X = x)
= Ai
= E2 [LGDi ] pi (x) (1 − pi (x)) + σ 2 (LGDi ) pi (x)
E2 [LGDi ] + σ 2 (LGDi ) pi (x) − E2 [LGDi ] p2i (x)
=
We have:
1
Ei2 + σ 2 (LGDi ) = Ei2 + Ei (1 − Ei )
4
1 3
= Ei + Ei
4 4
We conclude that:
1 3
υ (x) = Ei + Ei pi (1 + $i (x − 1))
4 4
Credit Risk 61
3. In order to maintain the coherency with the IRB formula, we must have:
−1 √
Φ (pi ) + ρΦ−1 (α)
Φ √ = pi (1 + $i (x − 1))
1−ρ
This implies that the factor weight $i is equal to:
1 Fi
$i =
(x − 1) pi
where: √
Φ−1 (pi ) + ρΦ−1 (α)
Fi = Φ √ − pi
1−ρ
Finally, we obtain the following expression for β (x):
1 1 3 αg − 1 1 pi
β (x) = + Ei − − (x − 1) + (x − 1) − 1
2 4 4 x βg Fi
1 pi
= (0.25 + 0.75Ei ) A − 1 + A
2 Fi
where:
αg − 1 1
A=− − (x − 1)
x βg
62 Handbook of Financial Risk Management
√
4. Since we have E [X] = αg βg and σ (X) = αg βg , the parameters of the Gamma
distribution are α = 0.25 and β = 4. Since the confidence level α of the value at
risk is equal to 99.5%, the quantile of the Gamma distribution G (0.25; 4) is equal to7
xα = 12.007243 and the value of A is 3.4393485. We deduce that:
1 pi
β (xα ) = (0.25 + 0.75Ei ) 2.4393485 + 3.4393485
2 Fi
pi
= (0.4 + 1.2Ei ) 0.76229640 + 1.0747964
Fi
In order to find exactly the Basel formula, we do not use the approximation p21 (x) ≈ 0
for calculating υ (x). In this case, we have:
1 3 2
υ (x) = Ei + Ei pi (1 + $i (x − 1)) − Ei2 p2i (1 + $i (x − 1))
4 4
and:
∂ υ (x) 1 3
= Ei + Ei pi $i − 2Ei2 p2i $i (1 + $i (x − 1))
∂x 4 4
We deduce that:
1 αg − 1 1
$1−1 + (x − 1) − 1 +
β (x) = (0.25 + 0.75Ei ) − −
2 x βg
1 αg − 1 1
Ei pi (1 + $i (x − 1)) 1 + $i−1 −
2 x βg
| {z }
Correction term
When the expected LGD Ei varies from 5% to 95%, the probability of default pi varies
from 10 bps to 15% and the asset correlation ρ varies from 10% to 30%, the relative
error between the exact formula and the approximation is lower than 1%.
5. We deduce that:
EAD? ×β (xα )
1
GA = 1.5 × − 0.04 × RWANR
8% n?
EAD? p?
?
= (0.6 + 1.8 × E ) 9.5 + 13.75 × ? − 0.04 × RWANR
n? F
?
EAD
= × GSF −0.04 × RWANR
n?
where:
p?
?
GSF = (0.6 + 1.8 × E ) 9.5 + 13.75 × ?
F
7 Contrary to the Vasicek model, the conditional probability of default p (X) is an increasing function
i
of X in the CreditRisk+ model. Therefore, we have xα = H−1 (α) and not xα = H−1 (1 − α).
Credit Risk 63
6. Following Wilde (2001b) and Gordy (2003), the portfolio loss is equal to:
nC X
X
L= EADi × LGDi ×Di
j=1 i∈Cj
Wilde and Gordy also propose to equalize the default rates weighted by exposures:
XnC X
E [EAD? ×D? ] = E EADi ×Di
j=1 i∈Cj
where pCj is the default probability associated to Class Cj and sCj is the corresponding
relative exposure: P
i∈C EADi
sCj = PnC P j
i0 ∈Cj EADi
0
j=1
We also have:
XnC X
E [EAD∗ × LGD∗ ×D∗ ] = E EADi × LGDi ×Di
j=1 i∈Cj
XnC X nC X
X
EADi × E ? × p? = EADi ×Ei × pCj
j=1 i∈Cj j=1 i∈Cj
nC
X X
= pCj EADi ×Ei
j=1 i∈Cj
We deduce that:
XnC X nC
X X
? ?
EADi × E × p =
pCj × ECj × EADi
j=1 i∈Cj j=1 i∈Cj
64 Handbook of Financial Risk Management
or:
nC
P
?
X pCj i∈C EADi
E = × ECj × PnC P j
j=1
p? j 0 =1 i0 ∈Cj 0 EADi0
nC
X sC × pCj
= PnC j × ECj
j=1 j 0 =1 sCj 0 × pCj 0
We remind that the conditional variance of the portfolio loss is equal to:
nC X
X
σ 2 (L | X) = EAD2i × Ei2 pi (X) (1 − pi (X)) + σ 2 (LGDi ) pi (X)
j=1 i∈Cj
σ 2 (L) = σ 2 (E [L | X]) + E σ 2 (L | X)
XnC X
= σ2 EADi Ei pi (X) +
j=1 i∈Cj
| {z }
Contribution of the systematic risk
XnC X
2
EADi Ei2 pi (X) (1 − pi (X)) + σ 2 (LGDi ) pi (X)
E
j=1 i∈Cj
| {z }
Contribution of the idiosyncratic risk
and:
XnC
σ 2 (L) = σ2 EAD? sCj ECj pCj (X) +
j=1
| {z }
Contribution of the systematic risk
nC
X X
pCj (X) 1 − pCj (X) − σ 2 EAD2i Ei2 +
pCj (X)
j=1 i∈Cj
| {z }
Contribution of the idiosyncratic default risk
nC
X X
pCj EAD2i σ 2 (LGDi )
j=1 i∈Cj
| {z }
Contribution of the idiosyncratic LGD
pi (X) = pi (1 + $i (X − 1))
Credit Risk 65
We have already used the property that E [pi (X)] = pi , which implies that E [X] = 1.
For the variance, we have:
The calibration of the systematic risk implies that the factor weight $? is equal to:
PnC
? j=1 pCj $Cj ECj sCj
$ =
p? E ?
PnC
j=1 pCj $Cj ECj sCj
= P nC
j=1 pCj ECj sCj
P 2 P !2
i∈Cj (EADi Ei ) i∈Cj EADi
= 2 PnC P
EADi
P
j 0 =1
i∈Cj Ei × EADi
i∈Cj 0
= HC s2C
where: 2
EC2 pCj 1 − pCj − pCj $Cj σ (X)
j
ΛCj =
2 2
(E ? ) p? (1 − p? ) − (p? $? σ (X))
We retrieve the expression of n? given by the Basel Committee (BCBS, 2001a, §445).
8 We do not obtained the same result than Gordy (2003), who finds that:
P
i∈Cj
EAD2i
HCj = P 2
i∈Cj
EADi
66 Handbook of Financial Risk Management
However, there is a difference between the analysis of Gordy (2003) and the formula
ΛCj proposed by the Basel Committee. In BCBS (2001a), the calibration of n? uses
both the idiosyncratic default risk and the idiosyncratic loss given default. In this
case, we have:
2
EC2 pCj 1 − pCj − pCj $Cj σ (X) + pCj σ 2 LGDCj
j
ΛCj =
2 2
(E ? ) p? (1 − p? ) − (p? $? σ (X)) + p? σ 2 (LGD? )
We remind that:
1p
σ (LGDi ) = Ei (1 − Ei )
2
Finally, we obtain the expression of the Basel Committee:
EC2 pCj 1 − pCj − 0.033 × FC2j + 0.25 × pCj ECj 1 − ECj
j
ΛCj =
2 2
(E ? ) p? (1 − p? ) − 0.033 × (F ? ) + 0.25 × p? E ? (1 − E ? )
where: √ !
Φ−1 pCj + ρΦ−1 (α)
FCj = Φ √ − pCj
1−ρ
PnC
and F ? = j=1 sCj FCj .
• In the first step, we transform the current portfolio into an equivalent homoge-
nous portfolio:
P
i∈C EADi
sCj = PnC Pj
j=1 i∈Cj EADi
nC
X
PDAG = sCj × PDCj
j=1
PnC
j=1 sCj × PDCj × LGDCj
LGDAG = PnC
j=1 sCj × PDCj
where PDCj is the default probability of Class Cj and LGDCj is the average loss
given default of Class Cj :
P
i∈Cj EADi × LGDi
LGDCj = P
i∈Cj EADi
Credit Risk 67
Then, we calculate
nC
X
FAG = sCj × FCj
j=1
where:
EAD2i
P
i∈Cj
HCj = P 2
i∈Cj EAD i
where:
Bi = PDi (1 − PDi )
• In the second step, we calculate the granularity scale factor:
PDAG
GSF = (0.6 + 1.8 × LGDAG ) × 9.5 + 13.75 ×
FAG
Finally, the granularity adjustment is equal to:
TNRE × GSF
GA = − 0.04 × RWANR
n?
where TNRE is the total non-retail exposure and RWANR is the total non-retail
risk-weighted assets.
2. We have:
n
X
L (X) = wi LGDi Di (X)
i=1
68 Handbook of Financial Risk Management
3. We have:
" n
#
X
E [L (X)] = E wi LGDi Di (X)
i=1
n
X
= wi E [LGDi ] E [Di (X)]
i=1
Xn
= wi E [LGDi ] pi (X)
i=1
4. We have:
n
!2 n
X X X
wi LGDi Di (X) = wi2 LGD2i Di2 (X) + wi wi LGDi LGDj Di (X) Dj (X)
i=1 i=1 i6=j
and:
!2
n
X
E L2 (X) =
E wi LGDi Di (X)
i=1
n
X X
wi2 E LGD2i E Di2 (X) +
= wi wi E [LGDi ] E [LGDj ] E [Di (X)] E [Dj (X)]
i=1 i6=j
We also have:
n
!2
X
2
E [L (X)] = wi E [LGDi ] pi (X)
i=1
n
X X
= wi2 E2 [LGDi ] p2i (X) + wi wj E [LGDi ] E [LGDj ] pi (X) pj (X)
i=1 i6=j
We deduce that:
Xn n
X
wi2 E LGD2i E Di2 (X) − wi2 E2 [LGDi ] p2i (X) +
=
i=1 i=1
X
wi wi E [LGDi ] E [LGDj ] E [Di (X)] E [Dj (X)] −
i6=j
X
wi wj E [LGDi ] E [LGDj ] pi (X) pj (X)
i6=j
X n n
X
wi2 E LGD2i E Di2 (X) − wi2 E2 [LGDi ] p2i (X) +
=
i=1 i=1
X
wi wj E [LGDi ] E [LGDj ] cov (Di (X) , Dj (X))
i6=j
X n
wi2 E LGD2i E Di2 (X) − E2 [LGDi ] p2i (X)
=
i=1
Credit Risk 69
and:
n
X
σ 2 (L (X)) = wi2 σ 2 (LGDi ) pi (X) + E2 [LGDi ] pi (X) (1 − pi (X))
i=1
In the case of listed products, the previous relationship is verified. In the case of
OTC products, there are no market prices, forcing the bank to use pricing models
for the valuation. The MTM value is then a mark-to-model price. Because the
two banks do not use the same model with the same parameters, we note a
discrepancy between the two mark-to-market prices:
MTMA+B (C1 ) = 10 − 11 = −1
MTMA+B (C2 ) = −5 + 6 = 1
MTMA+B (C3 ) = 6−3=3
MTMA+B (C4 ) = 17 − 12 = 5
MTMA+B (C5 ) = −5 + 9 = 4
MTMA+B (C6 ) = −5 + 5 = 0
MTMA+B (C7 ) = 1+1=2
We deduce that:
EADA = 10 + 6 + 17 + 1 = 34
EADB = 6 + 9 + 5 + 1 = 21
71
72 Handbook of Financial Risk Management
and:
It follows that:
EADA = max(10 − 5 + 6, 0) + 17 + 1 = 29
EADB = max(−11 + 6 − 3, 0) + 9 + 5 + 1 = 15
We deduce that:
Z ∞
E [e1 (t)] = max (x, 0) f (x) dx
−∞
Z ∞
= xf (x) dx
0
where f (x) is the density function of MtM1 (t). As we have MtM1 (t) ∼
N x1 , σ12 t , we deduce that:
Z ∞ 2 !
x 1 x − x1
E [e1 (t)] = √ exp − √ dx
0 σ1 2πt 2 σ1 t
√h
i∞
x1
= x1 Φ √ + σ1 t − φ (y) −x1
σ1 t σ
√
t
1
√
x1 x1
= x1 Φ √ + σ1 tφ √
σ1 t σ1 t
because φ (−x) = φ (x) and Φ (−x) = 1 − Φ (x).
Counterparty Credit Risk and Collateral Risk 73
We deduce that:
(c) In the case of a netting agreement, the potential future exposure becomes:
We deduce that:
(d) We have represented the expected exposure E [e (t)] in Figure 4.1 when x1 =
x2 = 0 and σ1 = σ2 . We note that it is an increasing function of the time t
and the volatility σ. We also observe that the netting agreement may have a big
impact, especially when the correlation is low or negative.
We define the expected positive exposure as the weighted average over time of the
expected exposure for a given holding period [0, t]:
Z t
1
EPE (0; t) = EE (s) ds
t 0
The effective expected exposure is the maximum expected exposure which occurs
before the date t:
The effective expected positive exposure is the weighted average of effective expected
exposure for a given time period [0, t]:
Z t
1
EEPE (0; t) = EEE (s) ds
t 0
2. We have:
3. We have:
n √ o
F[0,t] (x) = Pr eσ tX ≤ x
ln x
= Φ √
σ t
with x ∈ [0, ∞]. We deduce that:
√
PEα (t) = exp σΦ−1 (α) t
√
MPEα (0; T ) = exp σΦ−1 (α) T
1 2
EE (t) = exp σ t
2
1 2 1 2
EPE (0; t) = exp σ t −1 σ t
2 2
1 2
EEE (t) = exp σ t
2
1 2 1 2
EEPE (0; t) = exp σ t −1 σ t
2 2
4. We have:
x
F[0,t] (x) = 7
+ 43 T 2 t
σ t3 − 3Tt
2
3 7 2 4 2
PEα (0) = ασ t − T t + T t
3 3
MPEα (0; t) = 1 {t < t? } × PFEα (0; t) + 1 {t ≥ t? } × PFEα (0; t? )
1 3 7 2 4 2
EE (t) = σ t − T t + T t
2 3 3
3
9t − 28T t + 24T 2 t
2
EPE (0; t) = σ
72
EEE (t) = 1 {t < t? } × EE (t) + 1 {t ≥ t? } × EE (t? )
76 Handbook of Financial Risk Management
1 t
Z
EEPE (0; t) = EEE (s) ds
t 0
with: √
? 7− 13
t = T
9
This question is more difficult than the previous ones, because e (t) is not a mono-
tonically increasing function. It is increasing when t < t?1 and then decreasing1 . This
explains that MPEα (0; t) and EEE (t) depends on the parameter t? .
5. The cumulative distribution function of X is:
F (x) = Pr {X ≤ x}
Z x
ua
= du
0 a+1
= xa+1
We deduce that:
We deduce that: √
(a + 1) σ t
EEE (t) =
a+2
and: √ √
Z t
1 (a + 1) σ s 2 (a + 1) σ t
EEPE (0; t) = ds =
t 0 a+2 3 (a + 2)
1 In fact, there is a second root: √
7+ 13
t?2 = T
9
We observe that e (t) can take a negative value when t is in the neighborhood of this solution. We ignore
this problem to calculate the different measures.
Counterparty Credit Risk and Collateral Risk 77
6. In Figures 4.2 and 4.3, we have reported the functions EE (t), EPE (0; t), EEE (t)
and EEPE (0; t) for the two exposures given in Questions 3 and 5. We notice that
the second exposure has the profile of an amortizing swap where the first exposure is
more like an option profile.
√
FIGURE 4.2: Credit exposure when e (t) = exp σ tN (0, 1)
√
with x ∈ 0, N σ t . We deduce that:
2. (a) When the bank uses an internal model, the regulatory exposure at default is:
EAD = α × EEPE (0; 1)
Counterparty Credit Risk and Collateral Risk 79
(b) While the bank uses the FIRB approach, the required capital is:
−1 √
Φ (PD) + ρΦ−1 (99.9%)
K = EAD ×E [LGD] × Φ √ − PD
1−ρ
By using the approximations −1.06 ' 1 and Φ (−1) ' 0.16, we obtain:
The required capital of this OTC product for counterparty credit risk is then
equal to $39 200.
We have:
Pr e+ (t) ≤ x
F[0,t] (x) =
n √ o
= Pr max 0, N σ tX ≤ x
We notice that:
√
0 √ if X ≤ 0
max 0, N σ tX =
N σ tX otherwise
√
By assuming that x ∈ 0, N σ t , we deduce that:
where U is the standard uniform random variable. We finally obtain the following
expression:
1 x
F[0,t] (x) = + √
2 2N σ t
√
If x ≤ 0 or x ≥ N σ t, it is easy to show that F[0,t] (x) = 0 and F[0,t] (x) = 1.
2. The expected positive exposure EpE (t) is defined as follows:
EpE (t) = E e+ (t)
Using the expression of F[0,t] (x), it follows that the density function of e+ (t) is equal
to:
∂ F[0,t] (x)
f[0,t] (x) =
∂x
1
= √
2N σ t
We deduce that:
Z N σ √t
EpE (t) = xf[0,t] (x) dx
0
√
Z Nσ t
x
= √ dx
0 2N σ t
N σ√t
x2
= √
4N σ t 0
√
Nσ t
=
4
3. By definition, we have:
Z T
CVA = (1 − RB ) × −B0 (t) EpE (t) dSB (t)
0
4. The interest rates are equal to zero meaning that B0 (t) = 1. Moreover, we have
SB (t) = e−λB t . We deduce that:
Z T √
Nσ t
CVA = (1 − RB ) × λB e−λB t dt
0 4
N λB (1 − RB ) σ T √ −λB t
Z
= te dt
4 0
The definition of the incomplete gamma function is:
Z x
γ (s, x) = ts−1 e−t dt
0
By considering the change of variable y = λB t, we obtain:
Z T√ Z λB T r
y −y dy
te−λB t dt = e
0 0 λB λB
Z λB T
1
y /2−1 e−y dy
3
= 3/2
λB 0
γ 23 , λB T
= 3/2
λB
Counterparty Credit Risk and Collateral Risk 81
It follows that:
3
N (1 − RB ) σγ 2 , λB T
CVA = √
4 λB
5. The CVA is proportional to the notional N of the OTC contract, the loss given
default (1 − RB ) of the counterparty and the volatility σ of the underlying asset. It is
an increasing function of the maturity T because we have γ 32 , λB T2 > γ 32 , λB T1
when T2 > T1 . If the maturity is not very large (less than 10 years), the CVA is an
increasing function of the default intensity λB . The limit cases are2 :
N (1 − RB ) σγ 32 , λB T
lim CVA = lim √
λB →∞ λB →∞ 4 λB
= 0
and:
3
N (1 − RB ) σΓ 2
lim CVA = √
T →∞ 4 λB
When the counterparty has a high default intensity, meaning that the default is im-
minent, the CVA is equal to zero because the mark-to-market value is close to zero.
When the maturity is large, the CVA is a decreasing function of the intensity λB . In-
deed, the probability to observe a large mark-to-market in the future increases when
the default time is very far from the current date. We have illustrated these proper-
ties in Figure 4.4 with the following numerical values: N = $1 mn, RB = 40% and
σ = 30%.
FIGURE 4.4: Evolution of the CVA with respect to maturity T and intensity λB
the expected negative exposure EnE (t) is equal to the expected positive exposure
EpE (t). It follows that the DVA is equal to:
N (1 − RA ) σγ 23 , λA T
DVA = √
4 λA
−1
where y ? = σX (x? − µX ). We have:
Z ∞ Z ∞
1 1 2
A e µX +σX y
φ (y) dy = Ae µX
√ e− 2 y +σX y dy
y? y? 2π
Z ∞
1 2 1 1 2
= AeµX + 2 σX √ e− 2 (y−σX ) dy
y? 2π
Z ∞
1 2 1 1 2
= AeµX + 2 σX √ e− 2 z dz
y ? −σX 2π
1 2
= AeµX + 2 σX (1 − Φ (y ? − σX ))
2
2
µX + 21 σX µX + σX + ln A − ln B
= Ae Φ
σX
and:
Z ∞
B φ (y) dy = BΦ (−y ? )
y?
µX + ln A − ln B
= BΦ
σX
Finally, we obtain:
2
1 2 µX + σX + ln A − ln B
EpE (t) = AeµX + 2 σX Φ −
σX
µX + ln A − ln B
BΦ
σX
Counterparty Credit Risk and Collateral Risk 83
Since the instantaneous forward rate follows a geometric Brownian motion, we deduce
that:
1 2
f (0, T ) = f (0, T ) e(µ− 2 σ )t+σW (t)
and:
1 2 2
f (0, T ) ∼ LN ln f (0, T ) + µ − σ t, σ t
2
We also have:
Z T
ϕ (t, T ) = Bt (s) ds
t
Z T
= e−r(s−t) ds
t
−r(s−t) T
e
= −
r t
1 − e−r(T −t)
=
r
It follows that:
Z T
MtM (t) = N (f (t, T ) − f (0, T )) Bt (s) ds
t
1 2
= N f (0, T ) ϕ (t, T ) e(µ− 2 σ )t+σW (t) − 1
The confidence interval of MtM (t) with confidence level α is defined by:
where: √ −1 1−α
1 2
q± (t; α) = N f (0, T ) ϕ (t, T ) e(µ− 2 σ )t±σ tΦ ( 2 ) − 1
1 2
where A = N f (0, T ) ϕ (t, T )e(µ− 2 σ )t , B = N f (0, T ) ϕ (t, T ) and X ∼ N 0, σ 2 t .
Since ln A − ln B = µ − 12 σ 2 t, we obtain:
2
1 2 σ t + ln A − ln B ln A − ln B
EpE (t) = Ae 2 σ t Φ √ − BΦ √
σ t σ t
µt
√
= N f (0, T ) ϕ (t, T ) e Φ (δ (t)) − Φ δ (t) − σ t
where:
√
µ 1
δ (t) = + σ t
σ 2
4. We have:
Z T
CVA (t) = (1 − R) × −Bt (u) EpE (u) dS (u)
t
Z T
= (1 − R) × λe−(r+λ)(u−t) EpE (u) du
t
Z T
= s× e−(r+λ)(u−t) EpE (u) du
t
where:
√ √
µ u √
µ u
g (u) = e−(r+λ)(u−t) ϕ (u, T ) µΦ u + σφ u
σ σ
To calculate this approximation, we use a numerical integration method. Syrkin and
Shirazi (2015) provide a second approximation that does not require any integration,
but it seems to be less accurate.
6. All the computations are done using a Gauss-Legendre quadrature of order 128.
(a) We have reported the 90% confidence interval of MtM (t) in Figure 4.5.
(b) The time profile of EpE (t) and E [MtM (t)] is shown in Figure 4.6. We verify that
EpE (t) > E [MtM (t)] and we retrieve the bell-shaped curve of IRS counterparty
exposure.
(c) In Figure 4.7, we observe that the approximation of the CVA gives good results.
(d) When we calculate the CVA, we consider a risk-neutral probability distribution
Q. This implies that µ = 0% is a more realistic value than µ = 2%.
Let µ (t) = (µ1 (t) , . . . , µn (t)) be the mean vector of (MtM1 (t) , . . . , MtMn (t)). It
follows that the expected value µw (t) of the portfolio mark-to-market is equal to:
= w> Σ (t) w
where Σ (t) is the covariance matrix of (MtM1 (t) , . . . , MtMn (t)) such that:
It follows that:
n
X n
X
MtM (t) = wi µi (t) + wi σi (t) Xi
i=1 i=1
= µw (t) + σw (t) X
2. We have:
cov (MtMi (t) , MtM (t))
γi (t) = p
var (MtMi (t)) var (MtM (t))
h Pn i
E σi (t) Xi j=1 wj σj (t) Xj
=
σi (t) σ (t)
hP i
n
E j=1 wj σj (t) Xi Xj
=
σ (t)
n
X wj σj (t)
= ρi,j
j=1
σ (t)
It follows that: q
Xi = γi (t) X + 1 − γi2 (t) εi (4.2)
88 Handbook of Financial Risk Management
3. If we note e+ (t) = max (MtM (t) − C (t) , 0) and C (t) = max (MtM (t) − H, 0), the
expression of the counterparty exposure is equal to:
We have:
We have:
Z x? (H)
(∗) = (µw (t) + σw (t) x) φ (x) dx
x? (0)
Z x? (H) Z x? (H)
= µw (t) φ (x) dx + σw (t) xφ (x) dx
x? (0) x? (0)
x? (H)
? 1 − 1 x2
?
= µw (t) (Φ (x (H)) − Φ (x (0))) + σw (t) − √ e 2
2π x? (0)
= µw (t) (Φ (x? (H)) − Φ (x? (0))) + σw (t) (φ (x? (0)) − φ (x? (H)))
and: Z ∞
φ (x) dx = 1 − Φ (x? (H))
x? (H)
Using the fact that Φ (x) + Φ (−x) = 1, we finally obtain the following expression:
µw (t) µw (t) − H
EpE (t; w) = µw (t) Φ −Φ +
σw (t) σw (t)
µw (t) µw (t) − H
σw (t) φ −φ +
σw (t) σw (t)
µw (t) − H
HΦ (4.3)
σw (t)
Counterparty Credit Risk and Collateral Risk 89
∂ EpE (t; w)
RC i = wi ·
∂ wi
µw (t) µw (t)
= wi µi (t) Φ + γi (t) σi (t) φ (4.5)
σw (t) σw (t)
We have:
n n n
X X µw (t) X µw (t)
RC i = wi µi (t) Φ + wi γi (t) σi (t) φ
i=1 i=1
σw (t) i=1
σw (t)
n
X n
µw (t) µw (t) X
= Φ wi µi (t) + φwi γi (t) σi (t)
σw (t)
i=1
σw (t) i=1
µw (t) µw (t)
= Φ µw (t) + φ σw (t)
σw (t) σw (t)
= EpE (t; w)
because:
n n n
X X X wj σj (t)
wi γi (t) σi (t) = wi ρi,j σi (t)
i=1 i=1 j=1
σ (t)
Pn Pn
i=1 j=1 wi wj ρi,j σj (t) σi (t)
=
σ (t)
2
σ (t)
=
σ (t)
= σ (t)
We conclude that the risk measure EpE (t; w) satisfies the Euler allocation principle.
5. We can write:
EpE (t; w) = E1 (t; w) − E2 (t; w) + E3 (t; w)
where:
µw (t) µw (t)
E1 (t; w) = µw (t) Φ + σw (t) φ
σw (t) σw (t)
µw (t) − H µw (t) − H
E2 (t; w) = µw (t) Φ + σw (t) φ
σw (t) σw (t)
µw (t) − H
E3 (t; w) = HΦ
σw (t)
We have:
∂ µw (t) − H ∂ µw (t) ∂ 1
= −H
∂ wi σw (t) ∂ wi σw (t) ∂ wi σw (t)
∂ µw (t) γi (t) σi (t)
= +H 2 (t)
∂ wi σw (t) σw
Counterparty Credit Risk and Collateral Risk 91
We deduce that:
∂ µw (t) − H µw (t) − H ∂ µw (t) − H
Φ = φ
∂ wi σw (t) σw (t) ∂ wi σw (t)
µw (t) − H ∂ µw (t)
= φ +
σw (t) ∂ wi σw (t)
γi (t) σi (t) µw (t) − H
H 2
φ
σw (t) σw (t)
and:
∂ µw (t) − H µw (t) − H µw (t) − H
φ = − φ ·
∂ wi σw (t) σw (t) σw (t)
∂ µw (t) − H
∂ wi σw (t)
We have:
∂ E2 (t; w) µw (t) − H
= µi (t) Φ +
∂ wi σw (t)
µw (t) − H ∂ µw (t) − H
µw (t) φ +
σw (t) ∂ wi σw (t)
µw (t) − H
γi (t) σi (t) φ −
σw (t)
µw (t) − H ∂ µw (t) − H
(µw (t) − H) φ
σw (t) ∂ wi σw (t)
or:
∂ E2 (t; w) µw (t) − H µw (t) − H
= µi (t) Φ + γi (t) σi (t) φ +
∂ wi σw (t) σw (t)
µw (t) − H ∂ µw (t) − H
Hφ
σw (t) ∂ wi σw (t)
We have:
∂ E3 (t; w) µw (t) − H ∂ µw (t) − H
= Hφ
∂ wi σw (t) ∂ wi σw (t)
It follows that the marginal is equal to:
We have:
n n
X X µw (t) µw (t) − H
RC i = µi (t) Φ −Φ +
i=1 i=1
σw (t) σw (t)
n
X µw (t) µw (t) − H
wi γi (t) σi (t) φ −φ +
i=1
σw (t) σw (t)
µw (t) µw (t) − H
= µw (t) Φ −Φ +
σw (t) σw (t)
µw (t) µw (t) − H
σw (t) φ −φ
σw (t) σw (t)
µw (t) − H
= EpE (t; w) − HΦ
σw (t)
These risk contributions do not satisfy the Euler allocation principle, meaning that it
is not possible to allocate the CVA capital according to Equation (4.6).
and:
We have:
p
wi MtMi (t) wi µi (t) + wi σi (t) γi (t) X wi σi (t) 1 − γi2 (t)
= + εi
MtM (t) µw (t) + σw (t) X µw (t) + σw (t) X
Since εi ⊥ X, it follows that:
wi MtMi (t)
(∗) = E · 1 {MtM (t) ≥ H}
MtM (t)
wi (µi (t) + γi (t) σi (t) X)
= E · 1 {µw (t) + σw (t) X ≥ H} +
µw (t) + σw (t) X
" p #
wi σi (t) 1 − γi2 (t)
E · 1 {µw (t) + σw (t) X ≥ H} E [εi ]
µw (t) + σw (t) X
Z ∞
µi (t) + γi (t) σi (t) x
= wi φ (x) dx
x? (H) µw (t) + σw (t) x
Finally, we obtain:
µw (t) µw (t) − H
RC i = wi µi (t) Φ −Φ +
σw (t) σw (t)
µw (t) µw (t) − H
wi γi (t) σi (t) φ −φ +
σw (t) σw (t)
Z ∞
µi (t) + γi (t) σi (t) x
H wi φ (x) dx (4.8)
x? (H) µw (t) + σw (t) x
8. It follows that:
n
X
MtM (t) = wi MtMi (t)
i=1
Xn n
X
= wi µi (t) + wi σi (t) Xi
i=1 i=1
= µw (t) + σw (t) X
We deduce that: p
X = %w (t) XB + 1 − %2w (t) η (4.9)
where the idiosyncratic risk η ∼ N (0, 1) is independent from XB .
Counterparty Credit Risk and Collateral Risk 95
9. Pykhtin and Rosen (2010) notice that all previous computations involve unconditional
expectations, implying that we can derive easily the expected counterparty exposure
E [e (t)] and the corresponding risk contributions RC i by replacing all unconditional
expectations E [Y ] where Y is a random variable (MtMi (t), MtM (t) and e (t)) by
conditional expectations E [Y | τ = t] where τ is the default time of the counterparty.
Following Redon (2006), this is equivalent to calculate the conditional expectation
with respect to the random variable XB :
E [Y | τ = t] = E [Y | XB = B (t)]
where B (t) = Φ−1 (1 − S (t)) is the default barrier and S (t) is the survival function
of the counterparty. For conditional means, we have:
and:
µw (t | τ = t) = µw (t) + %w (t) σw (t) B (t)
For conditional volatilities, it follows that:
q
σi (t | τ = t) = 1 − %2i σi (t)
and: p
σw (t | τ = t) = 1 − %2w (t)σw (t)
Since the unconditional correlation γi (t) is equal to cov (Xi , X), we have:
γi (t) = E [Xi , X]
q
p
= E %i XB + 1 − %2i ηi %w (t) XB + 1 − %2w (t) η
q p
= %i %w (t) + 1 − %2i 1 − %2w (t)γi (t | τ = t)
γi (t) − %i %w (t)
γi (t | τ = t) = p p
1 − %2i 1 − %2w (t)
To compute EpE (t; w) = E [e+ (t) | τ = t] and RC i , we replace µi (t), µw (t), σi (t),
σw (t) and γi (t) by µi (t | τ = t), µw (t | τ = t), σi (t | τ = t), σw (t | τ = t) and
γi (t | τ = t) in Equations (4.3), (4.4) (4.5), (4.7) and (4.8).
Chapter 5
Operational Risk
∞ 2 !
ln x − µ
Z
m m 1 1
E [X ] = x √
exp − dx
0 xσ 2π 2 σ
We deduce that:
1 2
E [X] = eµ+ 2 σ
97
98 Handbook of Financial Risk Management
and:
E X 2 − E2 [X]
var (X) =
2 2
= e2µ+2σ − e2µ+σ
2
2
= e2µ+σ eσ − 1
We can estimate the parameters µ and σ with the generalized method of moments
by using the following empirical moments:
hi,1 (µ, σ) = xi − eµ+ 21 σ2
1 2
2 2
2
hi,2 (µ, σ) = xi − eµ+ 2 σ − e2µ+σ eσ − 1
To find the ML estimators µ̂ and σ̂, we can proceed in two different ways:
#1 X ∼ LN µ, σ 2 implies that Y = ln X ∼ N µ, σ 2 . We know that the ML
estimators µ̂ and σ̂ associated to Y are:
n
1X
µ̂ = yi
n i=1
v
u n
u1 X 2
σ̂ = t (yi − µ̂)
n i=1
We finally obtain:
n
1X
µ̂ = ln xi
n i=1
and: v
u n
u1 X 2
σ̂ = t (ln xi − µ̂)
n i=1
∂ Pr {X ≤ x}
f (x) =
∂x
x−(α+1)
= α
x−α
−
For m ≥ 1, we have:
∞
x−(α+1)
Z
m
E [X ] = xm α dx
x− x−α
−
Z ∞
α
= xm−α−1 dx
x−α
− x−
m−α ∞
α x
=
x−α
− m − α x−
α
= xm
α−m −
We deduce that:
α
E [X] = x−
α−1
and:
E X 2 − E2 [X]
var (X) =
2
α 2 α
= x − x−
α−2 − α−1
α
= 2 x2−
(α − 1) (α − 2)
The generalized method of moments can consider either the first moment hi,1 (α),
the second moment hi,2 (α) or the joint moments (hi,1 (α) , hi,2 (α)). In the first
case, the estimator is: Pn
xi
α̂ = Pn i=1
i=1 xi − nx−
100 Handbook of Financial Risk Management
We deduce that:
n
X xi
n=α ln
i=1
x−
The ML estimator is then:
n
α̂ = Pn
i=1 (ln xi − ln x− )
and:
n
α X
n − xi = 0
β i=1
The support of this probability density function is [0, +∞). The log-likelihood function
associated to the sample of individual losses {x1 , . . . , xn } is:
n
X
` (α, β) = ln f (xi )
i=1
n
X n
X
= −n ln Γ (α) + nα ln β + (α − 1) ln (ln xi ) − (β + 1) ln xi
i=1 i=1
f (x | X ≥ H) = ∂x Pr {X ≤ x | X ≥ H}
f (x)
= × 1 {x ≥ H}
1 − F (H)
For the log-normal probability distribution, we obtain:
1 1 1 ln x−µ 2
f (x | X ≥ H) = × √ e− 2 ( σ ) dx
1−Φ ln H−µ σ 2π
σ
1 1 ln x−µ 2
= ϕ × √ e− 2 ( σ ) dx
σ 2π
We note Mm (µ, σ) the conditional moment E [X m | X ≥ H]. We have:
Z ∞ m−1
x 1 ln x−µ 2
Mm (µ, σ) = ϕ × √ e− 2 ( σ ) dx
σ 2π
ZH∞
1 1 x−µ 2
= ϕ× √ e− 2 ( σ ) +mx dx
ln H σ 2π
Z ∞ 2
1 − 21
(x−(µ+mσ2 ))
mµ+ 21 m2 σ 2
= ϕ×e × √ e σ 2
dx
ln H σ 2π
2
1 − Φ ln H−µ−mσσ 1 2 2
= emµ+ 2 m σ
ln H−µ
1−Φ σ
and:
ln H−µ−2σ 2
1−Φ σ 2
M2 (µ, σ) = E X 2 | X ≥ H = e2µ+2σ
ln H−µ
1−Φ σ
102 Handbook of Financial Risk Management
(b) We have:
f (x)
f (x | X ≥ H) = × 1 {x ≥ H}
1 − F (H)
!, !
x−(α+1) H −α
= α
x−α
− x−α
−
x−(α+1)
= α
H −α
The conditional probability function is then a Pareto distribution with the same
parameter α but with a new threshold x− = H. We can then deduce that the
ML estimator α̂ is:
n
α̂ = Pn
( i=1 ln xi ) − n ln H
f (x)
f (x | X ≥ H) = × 1 {x ≥ H}
1 − F (H)
α α−1 −βx Z ∞ α α−1 −βt
β x e β t e
= dt
Γ (α) H Γ (α)
β α xα−1 e−βx
= R∞
H
β α tα−1 e−βt dt
4T
1 X n λ̂Y
λ̂Q = NQt = =
4T t=1 4T 4
3. Considering a quarterly or annual basis has no impact on the capital charge. Indeed,
the capital charge is computed with a one-year time horizon. If we use a quarterly
basis, we have to find the distribution of the annual loss number. In this case, the
annual loss number is the sum of the four quarterly loss numbers:
4. This result remains valid if we consider the first moment because the MM estimator
is exactly the ML estimator.
5. Since we have var (P (λ)) = λ, the MM estimator in the case of annual loss numbers
is:
T
1X 2 n2
λ̂Y = NY t − 2
T t=1 T
4T
!
1 1X 2 n2
λ̂Q = NQt −
4 T t=1 4T 2
λ̂Y
6=
4
There is no reason that λ̂Y = 4λ̂Q meaning that the capital charge will not be the
same.
104 Handbook of Financial Risk Management
(b) We have:
∞ Y
"m # m
Y X λn
E (N (t) − i) = (n − i) e−λ
i=0 n=0 i=0
n!
∞
X λn
= (n (n − 1) · · · (n − m)) e−λ
n=0
n!
We deduce that:
h i
2
var (N (t)) = E N (t) − E2 [N (t)]
h i
2
= E N (t) − N (t) + E [N (t)] − E2 [N (t)]
= E [N (t) (N (t) − 1)] + E [N (t)] − E2 [N (t)]
T
1X
λ̂ = Nt
T t=1
2. (a) We have:
N (t)
X
E [S] = E Xi
i=0
= E [N (t)] E [Xi ]
1
= λ exp µ + σ 2
2
Pn 2 Pn
(b) Because ( i=1 xi ) = i=1 x2i + i6=j xi xj , it follows that:
P
N (t) N (t) N (t)
2 X XX
E S = E Xi2 + Xi Xj
i=0 i6=j
Xi2
= E [N (t)] E + E [N (t) (N (t) − 1)] E [Xi Xj ]
2 h 2
i
= E [N (t)] E Xi + E N (t) − E [N (t)] E [Xi ] E [Xj ]
We have:
E [N (t)] = λ
h i
2
E N (t) = var (N (t)) + E2 [N (t)] = λ + λ2
and:
1 2 2
2
2
= e2µ+σ eσ − 1 + eµ+ 2 σ
2
= e2µ+2σ
µ+ 12 σ 2 1 2
E [Xi ] E [Xj ] = e eµ+ 2 σ
2
= e2µ+σ
We deduce that:
and:
E S 2 − E2 [S]
var (S) =
1 2 2
2 2
= λe2µ+2σ + λ2 e2µ+σ − λ2 eµ+ 2 σ
2
= λe2µ+2σ
(c) We have: ( 1 2
E [S] = λeµ+ 2 σ
2
var (S) = λe2µ+2σ
We deduce that: 2 2
var (S) λe2µ+2σ eσ
= 2 =
E2 [S] λ2 e2µ+σ λ
It follows that:
σ 2 = ln λ + ln (var (S)) − ln E2 [S]
and:
1
µ = ln E [S] − ln λ − σ 2
2
1 3 1
= ln E [S] + ln E2 [S] − ln λ − ln (var (S))
2 2 2
3. (a) We know that the duration d between two consecutive losses that are larger than
` is exponentially distributed with parameter λ (1 − F (`)). We deduce that:
−α !
`
d∼E λ
x_
(b) We can ask experts to estimate the return time dj for several scenarios `j and
then calibrate the parameters λ and α using the method of moments and the
following moment conditions:
`α
j
E [dj ] − =0
λxα−
TABLE 5.1: Stock returns RA,s and RB,s (24 first historical scenarios)
RA,s
−2.01 −0.01 −0.73 −0.71 1.79 2.27 −0.15 −0.55
−0.43 1.01 0.05 0.32 2.08 −2.37 −0.55 2.57
0.29 −2.54 −0.03 0.00 −0.90 −0.03 1.96 −0.35
RB,s
0.35 −0.84 0.85 1.40 1.35 1.36 −1.45 −1.95
2.17 1.51 −0.69 1.87 −0.06 −1.61 −1.25 2.20
−1.07 −2.85 −0.99 −0.06 −2.34 −1.31 3.79 −1.46
where Pt is the stock price at time t. We report the return values for stocks A and B
in Table 5.1. These data are used to simulate the future P&L defined as follows:
where RA,s and RB,s are the stock returns of A and B for the sth historical scenario.
Table 5.2 gives the values taken by Πs . We then calculate the order statistics Πs:250
and deduce that the value-at-risk is equal to:
1
VaR99% (w) = (323 072 + 314 695)
2
= $318 883
2. We apply the IRB formulas with the right asset class exposure. For the bank meta-
credit, we have:
1 − 1 − e−50×1%
1 − e−50×1%
ρ (PD) = 12% × + 24% ×
1 − e−50 1 − e−50
= 19.28%
108 Handbook of Financial Risk Management
Because the maturity of the meta-credit is one year, the maturity adjustment is equal
to 1. We deduce that:
−1 √
Φ (1%) + 0.1928Φ−1 (99.9%)
?
K = 75% × Φ √ − 75% × 1%
1 − 0.1928
= 9.77%
It follows that:
RW = 12.5 × 9.77% = 122.13%
and:
RWA = 80 × 122.13% = $97.70 mn
We finally obtain:
K = 8% × 97.70 = $7.82 mn
For the corporate meta-credit, we proceed in the same way, except that we have to
incorporate the maturity adjustment. We have:
2
b (PD) = (0.11852 − 0.05478 × ln (5%)) = 7.99%
and:
1 + (2 − 2.5) × 0.0799
ϕ (M ) = = 1.0908
1 − 1.5 × 0.0799
Using the IRB formula, we obtain K? = 15.35% and K = 30.69%. For the SME meta-
credit, we have to be careful when we calculate the correlation. Indeed, we have1 :
1 − 1 − e−50×2%
SME 1 − e−50×2%
ρ (PD) = 12% × + 24% × −
1 − e−50 1 − e−50
(max (30, 5) − 5)
4% × 1 −
45
For mortgage and retail exposures, we use a one-year maturity. The default correlation
is set equal to 15% for the mortgage meta-credit whereas we consider the following
formula for the retail meta-credit:
1 − 1 − e−35×4%
1 − e−35×4%
ρ (PD) = 3% × + 16% ×
1 − e−35 1 − e−35
= 6.21%
All the results are reported in Table 5.3. At the bank level, we then obtain:
and:
1 In order to simplify the calculation, we assume that the USD/EUR exchange rate is equal to 1.
Operational Risk 109
3. We calculate the capital charge for operational risk by Monte Carlo methods. The loss
is equal to:
XN
L= Li
i=1
Pr {N = 5} = 60%
Pr {N = 10} = 40%
We first simulate the yearly number of operational losses N by inverting the cumulative
density function:
Pr {N ≤ 5} = 60%
Pr {N ≤ 10} = 100%
Let us be a uniform random variate for the sth simulation. The simulated variate Ns
is defined as follows:
5 if us ≤ 0.6
Ns =
10 otherwise
(s)
Then, we have to simulate the operational losses Li using the probability integral
transform:
U = F (Li )
ln Li − 8
= Φ
2
It follows that:
Li = exp 8 + 2 × Φ−1 (U )
(s)
Let ui be a uniform random variate. We have:
(s) (s)
Li = exp 8 + 2 × Φ−1 ui
(s)
Another way to simulate Li is to notice that Φ−1 (U ) ∼ N (0, 1), meaning that:
(s) (s)
Li = exp 8 + 2 × ni
(s)
where ni is a normal random variate N (0, 1). The simulated value of the aggregated
loss is then:
Ns
(s)
X
Ls = Li
i=1
110 Handbook of Financial Risk Management
i 1 2 3 4 5
(s)
ui 0.4351 0.0387 0.2209 0.3594 0.5902
(s)
Φ−1 ui −0.1633 −1.7666 −0.7692 −0.3600 0.2282
(s)
Li 2, 150.26 8 7.09 6 40.05 1 451.02 4 704.84
The first loss experienced by the bank is $2 150.26, the second loss is equal to $87.09,
etc. We deduce that the yearly total loss is equal to $9 033.25:
For instance, if we consider one-million simulation runs, the capital charge corresponds
to the 999 000th order statistic. In our case, we estimate the capital charge with 250
millions of simulation runs and obtain:
KOR = $4.39 mn
Because the required capital is estimated using Monte Carlo methods, there is an
uncertainty on this number. For instance, we have reported the histogram of the VaR
estimator with one-million simulation runs in Figure 5.1. In this case, we obtain:
CBank
Cooke ratio =
RWA +12.5 × KMR + 12.5 × KOR
70
=
757.98 + 12.5 × 3.53 + 12.5 × 4.39
= 8.17%
∂ F (x; α, β)
f (x; α, β) =
∂x
Operational Risk 111
We deduce that:
β−1 β
(β/α) (x/α) 1 + (x/α)
f (x; α, β) = 2 −
β
1 + (x/α)
β β−1
(x/α) (β/α) (x/α)
2
β
1 + (x/α)
β−1
(β/α) (x/α)
= 2
β
1 + (x/α)
We deduce that:
n
X n
X
β
` (α, β) = n ln (β/α) + (β − 1) ln (xi /α) − 2 ln 1 + (xi /α)
i=1 i=1
n
X
= n ln β − nβ ln α + (β − 1) ln xi −
i=1
n
X
β
2 ln 1 + (xi /α)
i=1
112 Handbook of Financial Risk Management
and:
n n β
∂ ` (α, β) n X X (xi /α) ln (xi /α)
= − n ln α + ln xi − 2 β
=0
∂β β i=1 i=1 1 + (xi /α)
By assuming that β 6= 0, we deduce that:
n
X n
F (xi ; α, β) =
i=1
2
and:
n n β n β
n X X (xi /α) ln xi X (xi /α)
− n ln α + ln xi − 2 β
+ 2 ln α β
=0
β i=1 i=1 1 + (xi /α) i=1 1 + (xi /α)
We then obtain:
n n
n X X
+ ln xi − 2 F (xi ; α, β) ln xi = 0
β i=1 i=1
or equivalently:
n
X n
(2F (xi ; α, β) − 1) ln xi =
i=1
β
and:
10
X
β̂ 2F xi ; α̂, β̂ − 1 ln xi = 9.999
i=1
Because the two mathematical terms are equal to n = 10, the first-order condi-
tions of the ML optimization program are satisfied.
(e) We have:
n
X n
X
` (α, β) = ln f (xi ; α, β) − ln (1 − F (H; α, β))
i=1 i=1
n
X
= n ln β − nβ ln α + (β − 1) ln xi −
i=1
n
X
β β
2 ln 1 + (xi /α) + n ln 1 + (H/α)
i=1
Operational Risk 113
and:
h i
2
var (N (t)) = E N (t) − E2 [N (t)]
h h ii
2
= E E N (t) | Λ − E2 [E [N (t) | Λ]]
= E var (N (t) | Λ) + E2 [N (t) | Λ] − E2 [E [N (t) | Λ]]
The equality holds if and only if var (Λ) = 0. We deduce that Λ must be constant and
we obtain the Dirac distribution:
Pr {Λ = λ} = 1
p (n) = Pr {N (t) = n}
e−λ λn
=
n!
It follows that:
(n + 1) · p (n + 1)
ϕ (n) =
p (n)
e−λ λn+1 n!
= (n + 1) · ·
(n + 1)! e−λ λn
= λ
E [N (t)] = E [Λ]
= E [G (α, β)]
α
= (5.4)
β
114 Handbook of Financial Risk Management
and:
var (N (t)) = E [Λ] + var (Λ)
= E [G (α, β)] + var (G (α, β))
α α
= + 2
β β
α (β + 1)
= (5.5)
β2
(b) By definition of the compound distribution, we have:
Z ∞
p (n) = p (n | P (λ)) f (λ | G (α, β)) dλ
0
Z ∞ −λ n α α−1 −βλ
e λ β λ e
= dλ
0 n! Γ (α)
Z ∞
βα
= e−λ(β+1) λn+α−1 dλ (5.6)
n!Γ (α) 0
We know that: Z ∞
ta−1 e−t dt = Γ (a)
0
We deduce that2 :
Z ∞ Z ∞
a−1 −bt
t e dt = ta−1 e−bt dt
0 0
Z ∞ x a−1 dx
= e−x
b b
Z0 ∞
= xa−1 e−x dx
0
Γ (a)
=
ba
From Equation (5.6), we obtain:
βα Γ (n + α)
p (n) =
n!Γ (α) (β + 1)n+α
Γ (n + α) βα
= · (5.7)
n!Γ (α) (β + 1)n+α
We notice that:
Γ (n + α) (n + α − 1)!
=
n!Γ (α) n! (α − 1)!
n+α−1
=
n
and:
α n
βα
β 1
n+α =
(β + 1) β+1 β+1
α n
1 1
= 1−
β+1 β+1
2 We use the change of variable x = bt.
Operational Risk 115
(n + 1) · p (n + 1)
ϕ (n) =
p (n)
n+r
r
n+1 (1 − p) pn+1
= (n + 1)
n + r − 1 (1 − p)r pn
n
(n + r)!
= p
(n + r − 1)!
= pn + pr
4. (a) Since we have E [E (λ)] = λ−1 and var (E (λ)) = λ−2 , we obtain:
1
E [N (t)] =
λ
and:
1 1
var (N (t)) = + 2
λ λ
λ+1
=
λ2
3 An alternative approach to find the values of r and p consists in match the first two moments. Indeed,
we know that: pr
E [N B (r, p)] =
1−p
and: pr
var (N B (r, p)) =
(1 − p)2
We deduce that:
α pr α pr
= =
1−p
β β 1−p
⇔
α (β 2+ 1) = pr 2 β+1 = 1
β (1 − p) β 1−p
pr
α=β
1−p
⇔
β −1 = 1 − 1
1−p
(
α=r
⇔ 1−p
β=
p
(
r=α
⇔ 1
p=
1+β
116 Handbook of Financial Risk Management
(b) We have E (λ) = G (1, λ). We deduce that the compound Poisson distribution is
the negative binomial distribution N B (r, p) where r = 1 and p = 1/ (λ + 1). In
this case, the expression of the probability mass function becomes:
n+r−1 r
p (n) = (1 − p) pn
n
= (1 − p) pn
117
Chapter 7
Asset/Liability Management Risk
−n
1 − (1 + i)
c(n) =
i
2. Since C0 = N0 , we have:
1 A
1− n = N0
(1 + i) i
We deduce that the value of the constant annuity is equal to:
−1
1
A = 1− n iN0
(1 + i)
n
(1 + i)
= n iN0
(1 + i) − 1
i
= −n N0
1 − (1 + i)
It follows that the constant annuity rate a(n) is given by the following formula:
i 1
a(n) = −n =
1 − (1 + i) c(n)
3. At time t = 1, we pay A. The interest payment is equal to I (1) = iN0 while the
principal payment is equal to the difference between the annuity and the interest
119
120 Handbook of Financial Risk Management
payment:
P (1) = A − I (1)
= a(n) − i N0
i
= −n − i N0
1 − (1 + i)
We deduce that the amount outstanding (or remaining capital) is equal to:
N (1) = N0 − P (1)
= N0 − a(n) − i N0
i
= 1+i− −n N0
1 − (1 + i)
!
−n+1
1 − (1 + i) 1 A
= −n 1− n
1 − (1 + i) (1 + i) i
!
−n+1 n
1 − (1 + i) (1 + i) − 1 A
= −n n
1 − (1 + i) (1 + i) i
!
n −n+1
(1 + i) − 2 − i + (1 + i) A
= n
(1 + i) − 1 i
!
−n+1
(1 + i) − (1 + i) A
= 1− n
(1 + i) − 1 i
We also have:
n−1
X A
C (1) = t
t=1 (1 + i)
!
1 A
= 1− n−1
(1 + i) i
Since we have:
!
−n+1 n−1 −n+1
(1 + i) − (1 + i) (1 + i) (1 + i) − (1 + i)
n = n−1 n
(1 + i) − 1 (1 + i) (1 + i) − 1
!
n 0
1 (1 + i) − (1 + i)
= n−1 n
(1 + i) (1 + i) − 1
1
= n−1
(1 + i)
we conclude that the amount outstanding N (1) is equal to the present value of the
annuity at time t = 1:
N (1) = C (1)
4. More generally, we have:
N (t) = C (t)
= c(n−t) A
!
−(n−t)
1 − (1 + i)
= A
i
Asset/Liability Management Risk 121
It follows that:
I (t) = iN (t − 1)
!
1
= 1− n−t+1 A
(1 + i)
and:
P (t) = A − I (t)
1
= n−t+1 A
(1 + i)
S (t, u) = 1 {t ≤ u < t + m}
1 if u ∈ [t, t + m[
=
0 otherwise
This means that the survival function is equal to one when u is between the current
date t and the maturity date T = t + m. When u reaches T , the outstanding amount
is repaid, implying that S (t, T ) is equal to zero. It follows that:
Rt
? −∞
NP (s) S (s, u) ds
S (t, u) = Rt
−∞
NP (s) S (s, t) ds
Rt
−∞
NP (s) · 1 {s ≤ u < s + m} ds
= Rt
−∞
NP (s) · 1 {s ≤ t < s + m} ds
1 {s ≤ u < s + m} = 1 ⇒ u < s + m
⇔ s>u−m
and: Z t Z t
NP (s) · 1 {s ≤ u < s + m} ds = NP (s) ds
−∞ u−m
1 {s ≤ t < s + m} = 1 ⇒ t < s + m
⇔ s>t−m
and: Z t Z t
NP (s) · 1 {s ≤ t < s + m} ds = NP (s) ds
−∞ t−m
We deduce that:
Rt
NP (s) ds
S (t, u) = 1 {t ≤ u < t + m} · Ru−m
?
t
t−m
NP (s) ds
122 Handbook of Financial Risk Management
In the case where the new production is a constant, we have NP (s) = c and:
Rt
ds
S (t, u) = 1 {t ≤ u < t + m} · Ru−m
?
t
t−m
ds
t
s
= 1 {t ≤ u < t + m} · u−mt
s t−m
t−u+m
= 1 {t ≤ u < t + m} ·
t−t+m
u−t
= 1 {t ≤ u < t + m} · 1 −
m
The survival function S? (t, u) corresponds to the case of a linear amortization.
2. If the amortization is linear, we have:
u−t
S (t, u) = 1 {t ≤ u < t + m} · 1 −
m
We deduce that:
t
u−s
Z
NP (s) 1 − ds
m
S? (t, u) = 1 {t ≤ u < t + m} · Zu−m
t
t−s
NP (s) 1 − ds
t−m m
In the case where the new production is a constant, we obtain:
Z t
u−s
1− ds
m
S? (t, u) = 1 {t ≤ u < t + m} · Zu−m
t
t−s
1− ds
t−m m
For the numerator, we have:
Z t t
s2
u−s su
1− ds = s− +
u−m m m 2m u−m
t2
tu
= t− + −
m 2m
!
2
u2 − mu (u − m)
u−m− +
m 2m
t2 u2
tu m
= t− + − u− −
m 2m 2 2m
2 2 2
m + u + t + 2mt − 2mu − 2tu
=
2m
2
(m − u + t)
=
2m
For the denominator, we use the previous result and we set u = t:
Z t 2
t−s (m − t + t)
1− ds =
t−m m 2m
m
=
2
Asset/Liability Management Risk 123
We deduce that:
2
(m − u + t)
S? (t, u) = 1 {t ≤ u < t + m} · 2m
m
2
2
(m − u + t)
= 1 {t ≤ u < t + m} ·
m2
2
u−t
= 1 {t ≤ u < t + m} · 1 −
m
It follows that: Rt
NP (s) e−λ(u−s) ds
S (t, u) = R−∞
?
t
−∞
NP (s) e−λ(t−s) ds
In the case where the new production is a constant, we obtain:
Rt
e−λ(u−s) ds
S (t, u) = R−∞
?
t
−∞
e−λ(t−s) ds
−1 −λ(u−s) t
λ e −∞
= t
λ e−1 −λ(t−s)
−∞
= e−λ(u−t)
= S (t, u)
where f (t, u) is the density function associated to the survival function S (t, u). For
the stock, we have: Z ∞
D? (t) = (u − t) f ? (t, u) du
t
where f (t, u) is the density function associated to the survival function S? (t, u):
?
Rt
NP (s) f (s, u) ds
f (t, u) = R−∞
?
t
−∞
NP (s) S (s, t) ds
D (t) = m
and:
R t+m
(u − t) du
D? (t) = t
Rt
t−m
ds
h it+m
1 2
2 (u − t)
t
= t
s t−m
m
=
2
1
f (t, u) = 1 {t ≤ u < t + m} ·
m
and:
t+m
(u − t)
Z
D (t) = du
t m
t+m
1 1 2
= (u − t)
m 2 t
m
=
2
f (t, u) = λe−λ(u−t)
and1 :
Z ∞
D (t) = (u − t) λe−λ(u−t) du
Zt ∞
= vλe−λv dv
0
1
=
λ
For the stock duration, we deduce that:
R∞
? t
(u − t) e−λ(u−t) du
D (t) = Rt
−∞
e−λ(t−s) ds
R ∞ −λv
ve dv
= R0 ∞ −λv
0
e dv
1
=
λ
We verify that D (t) = D? (t) since we have demonstrated that S? (t, u) = S (t, u).
1 We use the change of variable v = u − t.
126 Handbook of Financial Risk Management
(b) We have:
1 {s ≤ t < s + m}
f (s, t) =
m
It follows that:
Z t Z t
1
NP (s) f (s, t) ds = 1 {s ≤ t < s + m} · NP (s) ds
−∞ m −∞
Z t
1
= NP (s) ds
m t−m
We deduce that:
1 t
Z
dN (t) = NP (t) − NP (s) ds dt
m t−m
(c) We have:
f (s, t) = λe−λ(t−s)
and:
Z t Z t
NP (s) f (s, t) ds = NP (s) λe−λ(t−s) ds
−∞ −∞
Z t
= λ NP (s) e−λ(t−s) ds
−∞
= λN (t)
We deduce that:
dN (t) = (NP (t) − λN (t)) dt
and:
A it A
N (t) = N0 − e +
i i
At the maturity m, we have N (m) = 0, implying that:
N0 eim
A A A
N0 − eim + =0 ⇔ = im
i i i e −1
iN0
⇔ A=
1 − e−im
We deduce that:
N0 N0
N (t) = 1 {t < m} · N0 − eit +
1 − e−im 1 − e−im
1 − e−i(m−t)
= 1 {t < m} · N0
1 − e−im
1 − e−i(t+m−u)
N (t, u) = 1 {t ≤ u < t + m} · N (t)
1 − e−im
1 − e−i(t+m−u)
S (t, u) = 1 {t ≤ u < t + m} ·
1 − e−im
and:
Rt
NP (s) 1 − e−i(s+m−u) ds
? u−m
S (t, u) = Rt
t−m
NP (s) 1 − e−i(s+m−t) ds
3. We have:
ie−i(t+m−u)
f (t, u) = 1 {t ≤ u < t + m} ·
1 − e−im
128 Handbook of Financial Risk Management
It follows that:
t+m
ie−im
Z
D (t) = (u − t) ei(u−t) du
1 − e−im t
m
ie−im
Z
= veiv dv
1 − e−im 0
ie−im meim eim − 1
= −
1 − e−im i i2
1 − e−im
1
= m−
1 − e−im i
m 1
= −
1 − e−im i
because we have:
m m m
veiv eiv
Z Z
veiv dv = −
dv
0 i0 0 i
iv m iv m
ve e
= − 2
i 0 i 0
meim eim − 1
= −
i i2
2. Since we have:
Z ∞ Z ∞
e−r(t)t (i (t) D (t) − ∂t D (t)) dt = e−r(t)t i (t) D (t) dt −
0 0
Z ∞
e−r(t)t ∂t D (t) dt
0
and:
Z ∞ ∞ Z ∞
−r(t)t −r(t)t
e ∂t D (t) dt = e D (t) + e−r(t)t r (t) D (t) dt
0 0
Z ∞ 0
= −D0 + e−r(t)t r (t) D (t) dt
0
we deduce that:
Z ∞
L0 = E e−r(t)t (i (t) D (t) − ∂t D (t)) dt
0
Z ∞
= D0 + E e−r(t)t (i (t) − r (t)) D (t) dt (7.2)
0
Asset/Liability Management Risk 129
3. The current value of deposit accounts is the difference between the current value of
deposits D0 and the current value of liabilities L0 :
V0 = D0 − L0
Z ∞
−r(t)t
= E e (r (t) − i (t)) D (t) dt
Z0 ∞
−r(t)t
= E e m (t) D (t) dt (7.3)
0
where m (t) = r (t) − i (t) is the margin of the bank. This is the equation obtained
by Jarrow and Van Deventer (1998), who notice that V0 is “the net present value of
an exotic interest rate swap paying floating at i (t) and receiving floating at r (t) on a
random principal of D (t)”.
di (t)
= α + β (r (t) − i (t))
dt
= βr (t) + (α − βi (t))
It follows that i (t) is an increasing function of r (t). Moreover, i (t) decreases (resp.
increases) if α − βi (t) ≤ 0 (resp. α − βi (t) > 0). This implies that i (t) is a mean-
reverting process, where the steady state is i∞ = β −1 α. The variation of D (t) is
explained by two components:
dD (t)
= γ (D∞ − D (t)) − δ (r (t) − i (t))
dt | {z } | {z }
C1 (t) C2 (t)
The first component C1 (t) is the traditional mean-reverting adjustment between the
deposit D (t) and its long-term value D∞ , whereas the second component C2 (t) is the
negative impact of the excess of the market rate over the savings rate. It follows that:
Z t
−βt −β(t−s) α
i (t) = e i0 + β e r (s) + ds (7.5)
0 β
and:
Z t
−γt −γt
e−γ(t−s) (r (s) − i (s)) ds
D (t) = e D0 + 1 − e D∞ − δ (7.6)
0
It follows that:
−βt −βt
α
r (t) − i (t) = r0 − e i0 + 1 − e r0 +
β
−βt α −βt
= e (r0 − i0 ) − 1−e (7.8)
β
and:
Z t
D (t) = D∞ + e−γt (D0 − D∞ ) − δ (r0 − i0 ) e−γ(t−s) e−βs ds +
0
αδ t −γ(t−s)
Z
1 − e−βs ds
e (7.9)
β 0
Since we have:
t t
e−γ(t−s)−βs
Z
−γ(t−s) −βs
e e ds =
0 γ−β 0
and:
t −γ(t−s) t
e−γ(t−s)−βs
Z
e
e−γ(t−s) 1 − e−βs ds =
−
0 γ γ−β 0
we deduce that:
δ e−βt − e−γt
−γt
D (t) = D∞ + e (D0 − D∞ ) − (r0 − i0 ) +
γ−β
αδ 1 − e−γt e−βt − e−γt
−
β γ γ−β
Asset/Liability Management Risk 131
De Jong and Wielhouwer (2003) observe that the sensitivity of the net asset value is
the sum of three components: the interest rate sensitivity of the expected discount
margins, the margin sensitivity with respect to the market rate, and the impact of
r (t) on the deposit balance D (t). Since we have:
∂ (r (t) − i (t))
= e−βt
∂ r0
and:
δ e−βt − e−γt
∂ D (t)
=−
∂ r0 γ−β
we deduce that:
Z ∞
∂ V0
= − (r0 − i0 ) te−(r0 +β)t D (t) dt +
∂ r0 0
Z ∞ Z ∞
1 − e−βt
α te−r0 t D (t) dt + e−(r0 +β)t D (t) dt −
0 β 0
δ (r0 − i0 ) ∞ −(r0 +2β)t
Z
e − e−(r0 +β+γ)t dt +
γ−β 0
Z ∞ 1 − e−βt
αδ
e−(r0 +β)t − e−(r0 +γ)t dt (7.13)
γ−β 0 β
This sensitivity can be computed analytically, but it is a complex formula with many
terms. This is why it is better to calculate it using the Gauss-Legendre numerical
integration method. The duration of deposits is then defined as:
1 ∂ V0
DD = −
V0 ∂ r0
9. In Figure 7.1, we have represented the deposit rate i (t) with respect to the time t.
We notice that:
−βt
α
lim i (t) = lim i0 + 1 − e r0 + − i0
t→∞ t→∞ β
α
= r0 +
β
Since the margin is equal to r (t) − i (t), it is natural to assume that α < 0 in order
to verify the condition4 i (t) < r (t). The dynamics of D (t) is given in Figure 7.2. It
depends on the relative position between D0 and D∞ . Another important parameter
is the mean-reverting coefficient γ. In Figure 7.3, we have represented the mark-to-
market V0 , its sensitivity with respect to r0 and the corresponding duration. We notice
that the normal case where i0 < r0 corresponds to a negative duration, because the
sensitivity is positive. We explain this result because α = 0 is not realistic, meaning
that the margin is equal to zero on average. If we assume that α is negative or the
margin is positive, we obtain a positive duration (see Figure 7.4). In particular, we
verify that the duration of deposits is higher when market rates are low.
4 This is the arbitrage condition found by Jarrow and van Deventer (1998).
Asset/Liability Management Risk 133
−ie−i(m−t)
dN (t) = 1 {t < m} · N0 dt
1 − e−im
−i(m−t) 1
= −ie 1 {t < m} · N0 dt
1 − e−im
ie−i(m−t)
= − N (t) dt
1 − e−i(m−t)
2. The prepayment rate has a negative impact on dN (t) because it reduces the out-
standing amount N (t):
ie−i(m−t)
dÑ (t) = − Ñ (t) dt − λp (t) Ñ (t) dt
1 − e−i(m−t)
3. It follows that:
ie−i(m−t)
d lnÑ (t) = − + λp (t) dt
1 − e−i(m−t)
and:
t Z t
−ie−i(m−s)
Z
lnÑ (t) − lnÑ (0) = −i(m−s)
ds − λp (s) ds
0 1−e 0
t Z t
= ln 1 − e−i(m−s) − λp (s) ds
0 0
t
1 − e−i(m−t)
Z
= ln − λp (s) ds
1 − e−im 0
and:
1 − e−i(m−t)
Rt
− λp (s) ds
Ñ (t) = N0 e 0
1 − e−im
= N (t) Sp (t)
where Sp (t) is the survival function associated to the hazard rate λp (t).
4. We have:
It follows that:
Z t+m
λp
D̃ (t) = (u − t) e−λp (u−t) du +
1 − e−im t
(i − λp ) e−im t+m
Z
(u − t) e(i−λp )(u−t) du
1 − e−im t
Z m
(i − λp ) e−im m (i−λp )v
Z
λp −λp v
= ve dv + ve dv
1 − e−im 0 1 − e−im 0
−λp m
e−λp m − 1
λp me
= − +
1 − e−im −λp λ2p
!
(i − λp ) e−im me(i−λp )m e(i−λp )m − 1
− 2
1 − e−im (i − λp ) (i − λp )
−im
− e−λp m 1 − e−λp m
1 e
= +
1 − e−im i − λp λp
because we have:
m m m
veαv eαv
Z Z
veαv dv = −dv
0 0α 0 α
αv m αv m
ve e
= −
α 0 α2 0
αm αm
me e −1
= −
α α2
Chapter 8
Systemic Risk and Shadow Banking System
137
Part II
2. We have:
It follows that:
Then, we have:
We conclude that S̃ (t) is a martingale. Since dṼ (t) = φ (t) dS̃ (t), Ṽ (t) is also a
martingale. We deduce that:
Ṽ (t) = EQ Ṽ (T ) Ft
141
142 Handbook of Financial Risk Management
and:
ert EQ e−rT V (T ) Ft
V (t) =
= e−r(T −t) EQ [ V (T )| Ft ]
4. We have:
dS (t) = µS (t) dt + σS (t) dW (t)
and:
We set:
Q µ−r
W (t) = W (t) + t
σ
Using Girsanov’s theorem, we know that W Q (t) is a Brownian motion under the
probability measure Q defined by:
dQ
= M (t)
dP !
Z t 2 Z t
1 µ−r µ−r
= exp − ds − dW (s)
2 0 σ 0 σ
5. We have:
V (T ) = 1 {S (T ) ≥ K}
and:
1 2
⇔ S0 e(r− 2 σ )T +σW (T ) ≥ K
Q
S (T ) ≥ K
1 1
⇔ W Q (T ) ≥ ln K − ln S0 − r − σ 2 T
σ 2
We deduce that:
1 √
1 S0
V (0) = e−rT Φ √ ln + rT − σ T
σ T K 2
Model Risk of Exotic Derivatives 143
It follows that:
Z T Z t
−at −at a(s−t)
Z = r0 e +b 1−e +σ e dW (s) dt
0 0
−at T T Z TZ t
e−at
e
= r0 − +b t+ +σ ea(s−t) dW (s) dt
a 0 a 0 0 0
Z TZ t
1 − e−aT
= bT + (r0 − b) +σ ea(s−t) dW (s) dt
a 0 0
R T R t a(s−t)
We note I = 0 0 e dW (s) dt. Using Fubini’s theorem for stochastic integrals,
we have:
Z TZ T
I = ea(t−s) ds dW (t)
0 t
T
1 − e−a(T −t)
Z
= dW (t)
0 a
Since I is a sum of independent Gaussian random variables, it follows that Z is also
a Gaussian random variable.
3. We have:
1 − e−aT
E [Z] = bT + (r0 − b)
a
and:
" Z #2
T
1 − e−a(T −t)
var (Z) = E σ dW (t)
0 a
σ2 T
Z 2
−a(T −t)
= 1 − e dt
a2 0
σ2 T
Z
−a(T −t) −2a(T −t)
= 1 − 2e + e dt
a2 0
σ2
2 −aT
1 −2aT
= T − 1 − e + 1 − e
a2 a 2a
Another expression is:
σ2 aβ 2
var (Z) = T −β−
a2 2
144 Handbook of Financial Risk Management
where:
1 − e−aT
β=
a
4. We have:
RT
Q − r(t) dt
B (0, r0 ) = E e 0 F0
= EQ e−Z F0
where:
λσ
b0 = b −
a
It follows that:
Q
[Z]+ 12 varQ (Z)
B (0, r0 ) = e−E
and:
σ2 aβ 2
1
−EQ [Z] + varQ (Z) = −b0 T − (r0 − b0 ) β + T − β −
2 2a2 2
2
σ σ2 β 2
= −r0 β − b0 (T − β) + 2 (T − β) −
2
2a 2 2
4a
σ σ β
= −r0 β − b0 − 2 (T − β) −
2a 4a
Finally, we obtain:
σ2 σ2 β 2
B (0, r0 ) = exp −r0 β − b0 − 2 (T − β) −
2a 4a
where:
1 F0 1 √
d = − √ ln + σ T
σ T K 2
We have:
Z ∞
φ (u) du = 1 − Φ (d)
d
= Φ (−d)
and:
Z ∞ √
Z ∞ √
1 1 2
eσ Tu
φ (u) du = √ eσ T u− 2 u du
d d 2π
Z ∞ √ 2
1 2 1
√ e− 2 (u−σ T ) du
1
= e2σ T
2π
Zd∞
1 2 1 − 1 v2
= e2σ T √ √ e 2 dv
d−σ T 2π
1 2
√
= e2σ T 1 − Φ d − σ T
1 2
√
= e 2 σ T Φ −d + σ T
where:
1 F0 1 √
d1 = √ ln + σ T
σ T K 2
and:
1 F0 1 √
d2 = √ ln − σ T
σ T K 2
We can then apply the Black formula to price an European option on F (t).
4. In this case, the PDE representation becomes:
1 2 2 2
σ F ∂F C (t, F ) + ∂t C (t, F ) − r (t) C (t, F ) = 0
2
We deduce that the discount factor e−rT is replaced by the current bond price B (0, T ).
R
T
5. If r (t) and F (t) are not independent, the stochastic discount exp − 0 r (s) ds is
not independent from the forward price F (T ) and we cannot separate the two terms
in the mathematical expectation.
6. We remind that the price of the zero-coupon bond is given by:
RT
Q − r(s) ds
B (t, T ) = E e t
Ft
∂ ln B (t, T )
f (t, T ) = −
∂T
We consider that the numéraire is the bond price B (t, T ) and we note Q? the associ-
ated forward probability measure.
(a) We have:
R
∂ B (t, T ) ∂ Q − T r(s) ds
∂T
=
∂T
E e t Ft
RT
− r(s) ds
∂ e t
= EQ Ft
∂T
RT
Q − r(s) ds
= −E e t r (T ) Ft
Q M (t)
= −E r (T ) Ft
M (T )
Model Risk of Exotic Derivatives 147
R
t
where M (t) = exp 0 r (s) ds is the spot numéraire. We consider the change
of numéraire (M (t) −→ N (t) = B (t, T )) and we obtain:
∂ B (t, T ) ? N (t)
= −EQ r (T ) Ft
∂T N (T )
?
= −N (t) EQ [ r (T )| Ft ]
∂ B (t, T ) ?
= −B (t, T ) EQ [ f (T, T )| Ft ]
∂T
(b) We have:
∂ ln B (t, T )
f (t, T ) = −
∂T
1 ∂ B (t, T )
= −
B (t, T ) ∂T
?
= EQ [ f (T, T )| Ft ]
Using the Black model, we deduce that the price of the option is1 :
and:
1 dY (t) hdY (t) , dY (t)i
d =− +
Y (t) Y 2 (t) Y 3 (t)
1 We have f (0, 0) = r0 .
148 Handbook of Financial Risk Management
X (t)
Z (t) =
Y (t)
We deduce that:
1 1 1
dZ (t) = X (t) d + dX (t) + dX (t) , d
Y (t) Y (t) Y (t)
dX (t) dY (t) hdY (t) , dY (t)i
= + X (t) − 2 + +
Y (t) Y (t) Y 3 (t)
dY (t) hdY (t) , dY (t)i
dX (t) , − 2 +
Y (t) Y 3 (t)
dX (t) X (t) hdY (t) , dY (t)i
= − 2 dY (t) + X (t) −
Y (t) Y (t) Y 3 (t)
hdX (t) , dY (t)i
Y 2 (t)
and:
dZ (t) dX (t) dY (t) hdY (t) , dY (t)i hdX (t) , dY (t)i
= − + − (9.1)
Z (t) X (t) Y (t) Y 2 (t) X (t) Y (t)
Part two
1. The Girsanov theorem states that the change of probability only affects the drift and
not the diffusion.
2. We have:
?
dS (t) = µ?S (t) S (t) dt + σS (t) S (t) dW Q (t)
= µ?S (t) S (t) dt + σS (t) S (t) dW Q (t) − g (t) dt
If follows that:
µ?S (t) − g (t) σS (t) = µS (t)
or:
µ?S (t) − µS (t)
g (t) =
σS (t)
Using Girsanov’s theorem, we deduce that the Radon-Nikodym derivative is equal to:
dQ?
Z (t) =
dQ
Z t
1 t 2
Z
= exp g (s) dW Q (s) − g (s) ds
0 2 0
dZ (t)
= g (t) dW Q (t)
Z (t)
Model Risk of Exotic Derivatives 149
3. We have:
M (0) N (t)
Z (t) =
N (0) M (t)
Using Equation (9.1), we have:
dZ (t)
= µN (t) dt + σN (t) dW Q (t) −
Z (t)
µM (t) dt + σM (t) dW Q (t) +
2
σM (t) dt − σN (t) σM (t) dt
= (µN (t) − µM (t)) dt − σM (t) (σN (t) − σM (t)) dt +
(σN (t) − σM (t)) dW Q (t)
We deduce that:
g (t) = σN (t) − σM (t)
and:
µN (t) = µM (t) + σM (t) (σN (t) − σM (t))
4. Since g (t) = σN (t) − σM (t), it follows that:
µ?S (t) = µS (t) + g (t) σS (t)
= µS (t) + σS (t) (σN (t) − σM (t)) (9.2)
5. We have:
dS (t) dN (t)
, = σS (t) σN (t) dt
S (t) N (t)
and:
dS (t) dM (t)
, = σS (t) σM (t) dt
S (t) M (t)
We conclude that Equation (9.2) is equivalent to:
? dS (t) dN (t) dS (t) dM (t)
µS (t) dt − , = µS (t) dt − ,
S (t) N (t) S (t) M (t)
We also notice that:
dS (t) N (t) dS (t) dZ (t)
, d ln = ,
S (t) M (t) S (t) Z (t)
= σS (t) (σN (t) − σM (t)) dt
and:
dS (t) N (t)
µ?S (t) dt = µS (t) dt + , d ln
S (t) M (t)
Part three
1. Using Equation (9.1), we obtain:
dS̃ (t) dS (t) dN (t) hdN (t) , dN (t)i hdS (t) , dN (t)i
= − + −
S̃ (t) S (t) N (t) N 2 (t) S (t) N (t)
= r (t) dt + σS (t) dWS (t) − r (t) dt + σN (t) dWNQ (t) +
Q
2
σN (t) dt − ρσS (t) σN (t) dt
2
= σN (t) − ρσS (t) σN (t) dt + σS (t) dWSQ (t) −
σN (t) dWNQ (t)
150 Handbook of Financial Risk Management
(a) We have:
dN (t) = r (t) N (t) dt
and: Rt
r(s) ds
N (t) = e 0
S (t)
S̃ (t) =
N (t)
Rt
− r(s) ds
= e 0 S (t)
dS̃ (t)
= σS (t) dWSQ (t)
S̃ (t)
and: ?
dW Q (t) = dW Q (t) + σN (t) dt
We deduce that:
dS̃ (t) 2
= σN (t) − σS (t) σN (t) dt + (σS (t) − σN (t)) dW Q (t)
S̃ (t)
2
= σN (t) − σS (t) σN (t) dt + (σS (t) − σN (t)) σN (t) dt
?
(σS (t) − σN (t)) dW Q (t)
?
= σ̃ (t) dW Q (t)
where:
σ̃ (t) = σS (t) − σN (t)
(c) Let us introduce the Brownian motion W̃ Q (t) such that:
We have:
σ̃ 2 (t) = σS2 (t) − 2ρσS (t) σN (t) + σN
2
(t)
We conclude that the risk-neutral dynamics of S̃ (t) is given by:
dS̃ (t) 2
= σN (t) − ρσS (t) σN (t) dt + σ̃ (t) dW̃ Q (t)
S̃ (t)
?
2 In Part two, we have shown that dW Q (t) = dW Q (t) − g (t) dt where g (t) = σ (t) − σ
N M (t). Here, we
assume that M (t) = 1, implying that σM (t) = 0.
Model Risk of Exotic Derivatives 151
dS̃ (t) 2
= σN (t) − ρσS (t) σN (t) dt +
S̃ (t)
p
(ρσS (t) − σN (t)) dWNQ (t) + σS (t) 1 − ρ2 dWS⊥ (t)
Since we have:
?
dW Q (t) = dWNQ (t) − σN (t) dt
we obtain:
dS̃ (t) ? p
= (ρσS (t) − σN (t)) dW Q (t) + σS (t) 1 − ρ2 dWS⊥ (t)
S̃ (t)
We notice that:
? ? p
σ̃ (t) dW̃ Q (t) = (ρσS (t) − σN (t)) dW Q (t) + σS (t) 1 − ρ2 dWS⊥ (t)
We deduce that:
dS̃ (t) ?
= σ̃ (t) dW̃ Q (t)
S̃ (t)
2. We have seen that the dynamics of the instantaneous spot rate is:
Z t Z t Z t
r (t) = r (0) + σ (s, t) σ (s, u) du ds + σ (s, t) dW Q (s)
0 s 0
It follows that:
Z t Z t Z t
r (t) − f (0, t) = σ (s, t) σ (s, u) du ds + σ (s, t) dW Q (s)
0 s 0
152 Handbook of Financial Risk Management
We remind that:
Z T2
a (t, T2 ) = − α (t, v) dv
t
Z T2 Z v
= − σ (t, v) σ (t, u) du dv
t t
and: Z T2
b (t, T2 ) = − σ (t, v) dv
t
We deduce that:
Z T2 Z T2 Z T2
(r (t) − f (0, t)) dt = − a (t, T2 ) dt − b (t, T2 ) dW Q (t)
0 0 0
dQ?
R T2 R T2
a(t,T2 ) dt+ b(t,T2 ) dW Q (t)
=e 0 0
dQ
is a Brownian motion under the forward probability measure Q? (T2 ). We deduce that:
Z t
?
(T2 )
WQ (t) = W Q (t) − b (s, T2 ) ds
0
Model Risk of Exotic Derivatives 153
4. We have:
?
(T2 )
dW Q (t) = dW Q (t) − b (t, T2 ) dt
It follows that:
Since we have:
Z T1
α (t, T1 ) + σ (t, T1 ) b (t, T2 ) = σ (t, T1 ) σ (t, u) du −
t
Z T2
σ (t, T1 ) σ (t, u) du
t
We conclude that:
!
Z T2
?
(T2 )
df (t, T1 ) = − σ (t, T1 ) σ (t, u) du dt + σ (t, T1 ) dW Q (t)
T1
and:
?
(T1 )
df (t, T1 ) = σ (t, T1 ) dW Q (t)
We deduce that f (t, T1 ) is a martingale under the forward probability measure
Q? (T1 ).
B (t, T )
Rt
r(u)− 12 b2 (u,T )) du+b(u,T ) dW Q (u)
= e s(
B (s, T )
and:
Rt
r(u)− 21 b2 (u,T2 )) du+b(u,T2 ) dW Q (u)
B (t, T2 ) B (s, T2 ) e s (
= Rt
B (t, T1 )
B (s, T ) e s (
r(u)− 21 b2 (u,T1 )) du+b(u,T1 ) dW Q (u)
1
B (s, T2 ) X(s,t)
= e
B (s, T1 )
where:
Z t
1
b2 (u, T2 ) − b2 (u, T1 ) du +
X (s, t) = −
2 s
Z t
(b (u, T2 ) − b (u, T1 )) dW Q (u)
s
154 Handbook of Financial Risk Management
(b) We have: ?
(T1 )
dW Q (t) = dW Q (t) − b (t, T1 ) dt
We deduce that:
Z t
1
b2 (u, T2 ) − b2 (u, T1 ) du +
X (s, t) = −
2 s
Z t
?
(T1 )
(b (u, T2 ) − b (u, T1 )) dW Q (u) +
s
Z t
(b (u, T2 ) − b (u, T1 )) b (u, T1 ) du
s
1 t
Z
2
= − (b (u, T2 ) − b (u, T1 )) du +
2 s
Z t
?
(b (u, T2 ) − b (u, T1 )) dW Q (T1 ) (u)
s
We conclude that:
B (t, T2 ) B (s, T2 ) X(s,t)
E Fs = E e Fs
B (t, T1 ) B (s, T1 )
B (s, T2 )
=
B (s, T1 )
we obtain:
B (t, Tj+1 ) 1
=
B (t, Tj ) 1 + δj Lj (t)
It follows that:
B (t, Tk+1 ) B (t, Tk+1 ) B (t, Tk ) B (t, Ti+2 )
= × × ··· ×
B (t, Ti+1 ) B (t, Tk ) B (t, Tk−1 ) B (t, Ti+1 )
k
Y B (t, Tj+1 )
=
j=i+1
B (t, Tj )
k
Y 1
=
j=i+1
1 + δ j Lj (t)
2. We remind that:
M (t) = B (t, Ti+1 )
Model Risk of Exotic Derivatives 155
and:
N (t) = B (t, Tk+1 )
We have:
dQ? (Tk+1 )
Z (t) =
dQ? (Ti+1 )
N (t) /N (0)
=
M (t) /M (0)
We deduce that:
B (0, Ti+1 ) B (t, Tk+1 )
Z (t) =
B (0, Tk+1 ) B (t, Ti+1 )
k
B (0, Ti+1 ) Y 1
=
B (0, Tk+1 ) j=i+1 1 + δj Lj (t)
3. We have:
k
B (0, Ti+1 ) Y 1
d lnZ (t) = d
B (0, Tk+1 ) j=i+1 1 + δj Lj (t)
k
X
= − d ln (1 + δj Lj (t))
j=i+1
k
X d (1 + δj Lj (t))
= −
j=i+1
1 + δj Lj (t)
k
X δj dLj (t)
= −
j=i+1
1 + δj Lj (t)
k
X γj (t) δj Lj (t) Q? (Tj+1 )
= − dWj (t)
j=i+1
1 + δj Lj (t)
4. We obtain:
dLi (t)
ζ = , d lnZ (t)
Li (t)
* k
+
? X γj (t) δj Lj (t) Q? (Tj+1 )
= γi (t) dWiQ (t) , − dWj (t)
j=i+1
1 + δ L
j j (t)
k
X γj (t) δj Lj (t) D Q? (Ti+1 ) Q? (Tj+1 )
E
= −γi (t) dWi (t) , dWj (t)
j=i+1
1 + δj Lj (t)
k
X γj (t) δj Lj (t)
= −γi (t) ρi,j dt
j=i+1
1 + δj Lj (t)
where µi (t) = 0. In Question 5, Part two, Exercise 9.4.4, we have shown that:
dLi (t) Q? (T )
= µi,k (t) dt + γi (t) dWk k+1 (t)
Li (t)
where:
dLi (t)
µi,k (t) dt = µi (t) dt + , d lnZ (t)
Li (t)
We deduce that:
k
X δj Lj (t)
µi,k (t) = µi (t) − γi (t) ρi,j γj (t)
j=i+1
1 + δj Lj (t)
k
X (Tj+1 − Tj ) L (t, Tj , Tj+1 )
= −γi (t) ρi,j γj (t)
j=i+1
1 + (Tj+1 − Tj ) L (t, Tj , Tj+1 )
We deduce that:
i
B (0, Ti+1 ) Y
Z (t) = (1 + δj Lj (t))
B (0, Tk+1 )
j=k+1
It follows that:
i
X γj (t) δj Lj (t) Q? (Tj+1 )
d lnZ (t) = dWj (t)
1 + δj Lj (t)
j=k+1
and:
i
X γj (t) δj Lj (t)
ζ = γi (t) ρi,j dt
1 + δj Lj (t)
j=k+1
We conclude that:
i
dLi (t) X ρi,j γj (t) δj Lj (t) Q? (T )
= γi (t) dt + γi (t) dWk k+1 (t)
Li (t) 1 + δj Lj (t)
j=k+1
We deduce that:
2. We have:
S (t) − α (t) S (t) − α (t)
bS (t) = ∂t α (t) + ∂t β (t) + µ (t) β (t)
β (t) β (t)
∂t β (t) ∂t β (t)
= ∂t α (t) − + µ (t) α (t) + + µ (t) S (t)
β (t) β (t)
meaning that: (
−1
∂t α (t) − β (t) ∂t β (t) + µ (t) α (t) = 0
−1
β (t) ∂t β (t) + µ (t) = b
We deduce that:
∂t α (t) − bα (t) = 0
and:
α (t) = α0 ebt
We also have:
∂t β (t)
= b − µ (t)
β (t)
and: Rt
(b−µ(s)) ds
β (t) = β0 e 0
3. We deduce that:
1−γ γ
dS (t) = bS (t) dt + β (t) σ (t) (S (t) − α (t)) dW Q (t) (9.3)
4. We have:
dX (t) = µ (t) X (t) dt + σ (t) X (t) dW Q (t)
and: Rt Rt
µ(s)− 21 σ 2 (s)) ds+
X (t) = X0 e 0 (
σ(s) dW Q (s)
0
1. Let C (T, K) be the price of the European call option, whose maturity is T and strike
is K. We remind that:
1 2
σ (T, K) K 2 ∂K
2
C (T, K) − bK∂K C (T, K) −
2
∂T C (T, K) + (b − r) C (T, K) = 0
We deduce that:
A0 (T, K)
σ 2 (T, K) =
B 0 (T, K)
where:
A0 (T, K) = 2bK∂K C (T, K) + 2∂T C (T, K) − 2 (b − r) C (T, K)
and:
B 0 (T, K) = K 2 ∂K
2
C (T, K)
2. We have:
C (T, K) = S0 e(b−r)T Φ (d1 ) − Ke−rT Φ (d2 )
where:
√
1 S0 1
d1 = √ ln + bT + Σ (T, K) T
Σ (T, K) T K 2
√
and d2 = d1 − Σ (T, K) T . We note CBS (T, K, Σ) the Black-Scholes formula. We
have:
and:
2 2
∂K C (T, K) = ∂K CBS (T, K, Σ (T, K)) +
2
2∂K Σ (T, K) ∂Σ,K CBS (T, K, Σ (T, K)) +
2
∂K Σ (T, K) ∂Σ CBS (T, K, Σ (T, K)) +
2 2
(∂K Σ (T, K)) ∂Σ CBS (T, K, Σ (T, K))
We deduce that:
√
A0 (T, K) = −2bKe−rT Φ (d2 ) + 2bK 2 e−rT T φ (d2 ) ∂K Σ (T, K) +
2 (b − r) S0 e(b−r)T Φ (d1 ) +
−rT Σ (T, K) φ (d2 )
2Ke rΦ (d2 ) + √ +
2 T
√
2Ke−rT T φ (d2 ) ∂T Σ (T, K) −
2 (b − r) S0 e(b−r)T Φ (d1 ) − Ke−rT Φ (d2 )
√
= 2bK 2 e−rT T φ (d2 ) ∂K Σ (T, K) +
Ke−rT Σ (T, K) φ (d2 ) √
√ + 2Ke−rT T φ (d2 ) ∂T Σ (T, K)
T
Kφ (d2 )
= e−rT √ A (T, K)
Σ (T, K) T
where:
We also have:
Kφ (d2 ) K 2 d1 φ (d2 )
B 0 (T, K) = e−rT √ + 2e−rT ∂K Σ (T, K) +
Σ (T, K) T Σ (T, K)
√
e−rT K 3 T φ (d2 ) ∂K
2
Σ (T, K) +
3
√
K T φ (d2 ) d1 d2 2
e−rT (∂K Σ (T, K))
Σ (T, K)
Kφ (d2 )
= e−rT √ B (T, K)
Σ (T, K) T
where:
√
B (T, K) = 1 + 2K T d1 ∂K Σ (T, K) + K 2 T Σ (T, K) ∂K
2
Σ (T, K) +
2
K 2 T d1 d2 (∂K Σ (T, K)) (9.5)
We conclude that:
A0 (T, K)
σ 2 (T, K) =
B 0 (T, K)
A (T, K)
=
B (T, K)
where A (T, K) and B (T, K) are given by Equations (9.4) and (9.5).
3. We follow the proof given by van der Kamp (2009)4 . Let f˜ denote the discounted
payoff function:
+
f˜ (T, S (T )) = e−r(T −t) (S (T ) − K)
Itô’s lemma gives:
+
df˜ (T, S) = −re−r(T −t) (S − K) dT + bSe−r(T −t) 1 {S > K} dT +
1 2
σ (T, S) S 2 e−r(T −t) δ (S − K) dT +
2
σ (T, S) Se−r(T −t) 1 {S > K} dW Q (t)
E df˜ (T, S (T )) Ft
∂T C (T, K) =
dT
= re−r(T −t) KE [ 1 {S (T ) > K}| Ft ] +
(b − r) e−r(T −t) E [ S (T ) 1 {S (T ) > K}| Ft ] +
1 −r(T −t) 2
E σ (T, S (T )) S 2 (T ) δ (S (T ) − K) Ft
e
2
4. We have:
= E f˜ (T, S (T )) Ft
C (T, K)
= e−r(T −t) E [ (S (T ) − K) 1 {S (T ) > K}| Ft ]
It follows that:
and:
2
∂K C (T, K) = e−r(T −t) E [ δ (S (T ) − K)| Ft ]
We notice that:
E df˜ (T, S (T )) Ft
∂T C (T, K) =
dT
4 van der Kamp, R. (2009), Local Volatility Modeling, Master of Science Dissertation, University of
Twente.
Model Risk of Exotic Derivatives 161
Since we have:
we obtain:
1 −r(T −t)
e Q (T, K)
2
We also have:
E σ 2 (T, S (T )) S 2 (T ) S (T ) = K · E [ δ (S (T ) − K)| Ft ]
Q (T, K) =
E σ 2 (T, S (T )) S (T ) = K K 2 er(T −t) ∂K 2
= C (T, K)
We conclude that:
x2 1
d1 d2 = 2
− Σ2 (T, K) T
Σ (T, K) T 4
1
∂K ϕ (T, K) = −
K
and:
∂T ϕ (T, K) = b
162 Handbook of Financial Risk Management
It follows that:
We also have:
2 1 1
∂K Σ (T, K) = ∂x Σ̃ (T, x) + 2 ∂x2 Σ̃ (T, x)
K2 K
(c) We deduce that: s
à (T, x)
σ̃ (T, x) =
B̃ (T, x)
where à (T, x) = A (T, K) and B̃ (T, x) = B (T, K). Using Equations (9.4) and
(9.5), we obtain:
and:
1
B̃ (T, x) = 1 − 2 xΣ̃−1 (T, x) + T Σ̃ (T, x) ∂x Σ̃ (T, x) +
2
T Σ̃ (T, x) ∂x Σ̃ (T, x) + ∂x2 Σ̃ (T, x) +
1 2
x2 Σ̃−2 (T, x) − T 2 Σ̃2 (T, x) ∂x Σ̃ (T, x)
4
−1
2
= 1 − xΣ̃ (T, x) ∂x Σ̃ (T, x) +
T Σ̃ (T, x) ∂x2 Σ̃ (T, x) −
1 2
T Σ̃ (T, x) ∂x Σ̃ (T, x)
4
(d) When T is equal to zero, we obtain:
Σ̃2 (0, x)
σ̃ 2 (0, x) = 2
1 − xΣ̃−1 (0, x) ∂x Σ̃ (0, x)
and:
x∂x Σ̃ (0, x)
Σ̃ (0, x) = 1 − σ̃ (0, x)
Σ̃ (0, x)
The explicit solution of this equation is:
Z 1 −1
Σ̃ (0, x) = σ̃ −1 (0, xy) dy
0
Model Risk of Exotic Derivatives 163
We deduce that:
R1
0
yσ̃ −2 (0, xy) ∂x σ̃ (0, xy) dy
∂x Σ̃ (0, x) = R 2
1 −1
0
σ̃ (0, xy) dy
It follows that:
R1
0
y dy
∂x Σ̃ (0, 0) = R 2 ∂x σ̃ (0, 0)
1
0
dy
1
= ∂x σ̃ (0, 0)
2
2. We have6 :
β/2 z
ΣN (T, K) = α (F0 K) ×
χ (z)
!
1+ 1
24 ln2 F0 /K + 1
1920 ln4 F0 /K
2 4 ×
1+ 1
24 (1 − β) ln2 F0 /K + 1
1920 (1 − β) ln4 F0 /K
! !
−β (2 − β) α2 ρανβ 2 − 3ρ2 2
1+ 1−β
+ (1−β)/2
+ ν T
24 (F0 K) 4 (F0 K) 24
where:
ν (1−β)/2 F0
z= (F0 K) ln
α K
and p !
1 − 2ρz + z 2 + z − ρ
χ (z) = ln
1−ρ
p
In the sequel, we introduce the notation ϕ (z) = 1 − 2ρz + z 2 .
3. When β is equal to 0, we obtain:
2 − 3ρ2 2
z
ΣN (T, K) = α 1+ ν T
χ (z) 24
where:
νp F0
z= F0 K ln
α K
and: p !
1 − 2ρz + z 2 + z − ρ
χ (z) = ln
1−ρ
5 Hagan et al. (2002), Equation (A.64) on page 101.
6 Hagan et al. (2002), Equation (A.69) on page 102.
164 Handbook of Financial Risk Management
4. Since we have:
z
lim =1
K→F0 χ (z)
we deduce the expression of the ATM volatility:
2 − 3ρ2 2
ΣN (T, F0 ) = α 1 + ν T
24
It follows that:
z (K) χ (z (K)) ∂K z (K) − z (K) ∂K χ (z (K))
∂K =
χ (z (K)) χ2 (z (K))
χ (z (K)) ϕ (z (K)) − z (K)
= ∂K z (K)
χ2 (z (K)) ϕ (z (K))
1 z (K)
= − 2 ∂K z (K)
χ (z (K)) χ (z) ϕ (z (K))
where: p
ϕ (z (K)) = 1 − 2ρz (K) + z 2 (K)
We deduce that:
2 − 3ρ2 2
z (K)
∂K ΣN (T, K) = α 1+ ν T ∂K
24 χ (z (K))
r r !
2 − 3ρ2 2
F0 F0
= ν 1+ ν T ln −1 ·
24 K K
!
1 z
− p (9.6)
χ (z) χ2 (z) 1 − 2ρz + z 2
6. We have: √
C (T, K) = (F0 − K) Φ (d) + σN T φ (d)
where:
F0 − K
d= √
σN T
Model Risk of Exotic Derivatives 165
Q (T, K) = Pr {F (T ) ≤ K}
∂ Ct (T, K)
= 1+
∂K
When σN is equal to the function ΣN (T, K), we deduce that:
We notice that:
√ √
−ΣN (T, K) T − (F0 − K) T · ∂K ΣN (T, K)
∂K d =
Σ2N (T, K) T
√
1 + d T · ∂K ΣN (T, K)
= − √
ΣN (T, K) T
It follows that:
φ (d) √ 2
q (T, K) = √ 1 + d T · ∂K ΣN (T, K) +
ΣN (T, K) T
√ 2
φ (d) T · ∂K ΣN (T, K)
and:
ν2 2 − 3ρ2 2
2
∂K ΣN (T, K) = 1+ ν T D
α 24
where:
!
2 z
D = −1 +
χ2 (z) (1 − 2ρz + z 2 )
p
χ (z) 1 − 2ρz + z 2
z (z − ρ)
3/2
χ2 (z) (1 − 2ρz + z 2 )
and:
1 2
t+νW2Q (t)
dF (t) = αe− 2 ν dW1Q (t)
It follows that: Z t
1 2
s+νW2Q (s)
F (t) = F0 + α e− 2 ν dW1Q (s)
0
where W1 (t) and W2 (t) have the same properties W1Q (t) and W2Q (t).
10. We note:
Z t
1
X (t) = e− 2 s+W2 (s) dW1 (s)
0
1
M a (t) = e− 2 at+aW2 (t)
1
M (t) = e− 2 t+W2 (t)
We have:
1
dX (t) = e− 2 t+W2 (t) dW1 (t) = M (t) dW1 (t)
and:
2
d hX (t)i = e−t+2W2 (t) dt = M (t) dt
Using Itô’s lemma, we deduce that:
n (n − 1) n−2
dX n (t) = nX n−1 (t) dX (t) + X (t) d hX (t)i
2
n (n − 1) n−2 2
= nX n−1 (t) M (t) dW1 (t) + X (t) M (t) dt
2
Since we have:
a (a − 1) a
dM a (t) = M (t) dt + aM a (t) dW2 (t)
2
we obtain:
It follows that:
E [d (X n (t) M a (t))] a (a − 1)
= E [X n (t) M a (t)] +
dt 2
n (n − 1) h n−2 2
i
E X (t) M a (t) M (t) +
2
nρaE X n−1 (t) M a (t) M (t)
2
We notice that M a (t) M (t) = M a+1 (t) and M a (t) M (t) = M a+2 (t). We conclude
that:
dΨn,a (t) a(a − 1) n,a n(n − 1) n−2,a+2
= Ψ (t) + Ψ (t) + nρaΨn−1,a+1 (t)
dt 2 2
where:
Ψn,a (t) = E [X n (t) M a (t)]
Therefore, the relationship between Ψn,a (t) and the moments of F (t) is:
α n
n
Ψn,0 ν 2 t
E [(F (t) − F0 ) ] =
ν
11. For n = 0, we have:
Ψ0,a (t) = E X 0 (t) M a (t)
h 1 i
= E e− 2 at+aW2 (t)
1 1 2
= e− 2 at e 2 a t
1
= e 2 a(a−1)t
For n = 1, we have:
dΨ1,a (t) a(a − 1) 1,a
= Ψ (t) + ρaΨ0,a+1 (t)
dt 2
a(a − 1) 1,a 1
= Ψ (t) + ρae 2 a(a+1)t
2
We deduce that7 :
Z t
1 1 1
Ψ1,a (t) = e 2 a(a−1)t e− 2 a(a−1)s ρae 2 a(a+1)s ds
0
1 t
= ρe 2 a(a−1)t [eas ]0
1
2 a(a−1)t eat − 1
= ρe
where: a(a+1)
(a+1)(a+2)
t t
h (t) = 2ρ2 ae 2 e(a+1)t − 1 + e 2
12. We have:
α2 ν 2 t
σ 2 (F (t)) = 2
e −1
ν
α2
2 1 4 2 1 6 3
' 1+ν t+ ν t + ν t −1
ν2 2 6
1 1
= α2 t + ν 2 t2 + ν 4 t3
2 6
Using the same approximation method, the skewness coefficient is:
2 2
ρ e3ν t − 3eν t + 2
γ1 (F (t)) = 3
(eν 2 t − 1) 2
√ √
' 3ρν t + 4ρν 3 t t
13. (a) Using the formula given in Question (1), we obtain the following equivalent nor-
mal volatility:
K 7% 10% 13%
ΣB (T, K) 30% 20% 30%
ΣN (T, K) 2.51389% 1.99667% 3.41753%
Remark 1 To find the distribution of F (∞), we use the following result8 of Donati-Martin
et al. (2001): Let ξ (t) = − (ct + σB (t) + N + (t) − N − (t)) where N + (t) and N − (t) are two
Rt
independent Poisson processes and B (t) is a Brownian motion. Let A (t) = 0 exp (ξ (s)) ds,
Rt
X (t) = exp (ξ (t)) 0 exp (−ξ (s)) ds and Tα denotes an exponential variable of parameter
α independent of ξ (t). The law µα of A (Tα ) satisfies µα = α−1 L? µα where L denotes
the infinitesimal generator of the Markov process X (t). Let us consider the special case
ξ (t) = σB (t) − ct. We have:
2
σ
dX (t) = σX (t) dB (t) + − c X (t) + 1 dt
2
and:
σ2
1
L= − c x + 1 ∂x + σ 2 x2 ∂x2
2 2
We deduce that the density function of A (∞) is equal to:
θk
θ
fA(∞) (u) = exp −
Γ (k) uk+1 u
where θ = 2/σ 2 and k = 2c/σ 2 . Therefore, we have:
law θ
A (∞) =
Zk
where Zk is the Gamma random variable with parameter k. In the stochastic Gaussian model
with ρ = 0, we have: β
dF (t) = α (t) F (t) dW1Q (t)
dα (t) = να (t) dW2Q (t)
where W1Q (t) and W2Q (t) are independent. It follows that:
1
α (t) = α exp − ν 2 t + ν dW2Q (t)
2
and: Z t
1
F (t) = F0 + α exp − ν 2 s + ν dW2Q (s) dW1Q (s)
0 2
law
We deduce that F (t) = F0 + αW1Q (hF (t)i) where:
Z t
hF (t)i = exp 2νW2Q (s) − ν 2 s ds
0
We have:
law θ
hF (∞)i =
Zk
2 2 law
where θ = 2/ (2ν) = 1/ 2ν 2 and k = 2ν 2 / (2ν) = 1/2. Since we have W1Q (t) =
√
N (0, 1) t, we conclude that:
s
law 1
F (∞) = F0 + αN (0, 1)
2ν 2 Z 1/2
8 Donati-Martin, C., Ghomrasni, R., and Yor, M. (2001), On Certain Markov Processes Attached to Ex-
ponential Functionals of Brownian Motion; Applications to Asian Options, Revista Matematica Iberoamer-
icana, 17(1), pp. 179-193.
172 Handbook of Financial Risk Management
or:
> >
∂t α̂ (t, T ) = − tr Σ (t) Σ (t) Γ̂ (t, T ) − β̂ (t, T ) a (t) +
1 > >
β̂ (t, T ) Σ (t) Σ (t) β̂ (t, T ) − α (t)
2
For degree 1, we obtain:
> >
2Γ̂ (t, T ) Σ (t) Σ (t) β̂ (t, T ) − B (t) β̂ (t, T ) −
2Γ̂ (t, T ) a (t) − ∂t β̂ (t, T ) − β (t) = 0
or:
> >
∂t β̂ (t, T ) = −B (t) β̂ (t, T ) + 2Γ̂ (t, T ) Σ (t) Σ (t) β̂ (t, T ) −
2Γ̂ (t, T ) a (t) − β (t)
or:
>
∂t Γ̂ (t, T ) = 2Γ̂ (t, T ) Σ (t) Σ (t) Γ̂ (t, T ) −
2Γ̂ (t, T ) B (t) − Γ (t)
3. B (t) must be a diagonal matrix in order to ensure that Γ̂ (t, T ) is a symmetric matrix.
Indeed, if we do not consider this hypothesis, we obtain:
1 >
>
>
∂t Γ̂ (t, T ) = Γ̂ (t, T ) + Γ̂ (t, T ) Σ (t) Σ (t) Γ̂ (t, T ) + Γ̂ (t, T ) −
2
>
Γ̂ (t, T ) + Γ̂ (t, T ) B (t) − Γ (t)
>
It follows that the term Γ̂ (t, T ) + Γ̂ (t, T ) B (t) is not symmetric.
4. We recall that:
?
dX (t) = ã (t) + B̃ (t) X (t) dt + Σ (t) dW Q (T ) (t)
where:
>
ã (t) = a (t) − Σ (t) Σ (t) β̂ (t, T )
and:
>
B̃ (t) = B (t) − 2Σ (t) Σ (t) Γ̂ (t, T )
174 Handbook of Financial Risk Management
It follows that:
Z t
X (t) = eB̃(t) X0 + eB̃(t) e−B̃(s) ã (s) ds +
0
Z t
?
eB̃(t) e−B̃(s) Σ (s) dW Q (T ) (s)
0
5. The Libor rate L (t, Ti−1 , Ti ) at time t between the dates Ti−1 and Ti is defined by:
1 B (t, Ti−1 )
L (t, Ti−1 , Ti ) = −1
δi−1 B (t, Ti )
where δi−1 = Ti − Ti−1.
Model Risk of Exotic Derivatives 175
7. We have:
Z +∞
Caplet = B (0, t) f (x) φ (x; m (0, t) , V (0, t)) dx
−∞
Z +∞
= B (0, t) max (0, g (x)) φ (x; m (0, t) , V (0, t)) dx
−∞
Z
= B (0, t) g (x) φ (x; m (0, t) , V (0, t)) dx
ZE
= B (0, t) h (x) dx
E
8. We have:
x2 2
e−ax −bx−c − 1 (x−m)2
Z
J = √ e 2V dx
x1 2πV
Z x2
1
= √ eP (x) dx
x1 2πV
where P (x) is a quadratic polynomial:
1 2
P (x) = − (x − m) − ax2 − bx − c
2V
1 2 m m2
= − x + x− − ax2 − bx − c
2V
V
2V 2
1 m m
2
= − +a x + −b x− +c
2V V 2V
2
1 1 + 2aV 2 m − bV m + 2cV
= − x + x−
2 V V 2V
We can write P (x) as follows:
1 2 m̃ m̃2
P (x) = − x + x− − c̃
2Ṽ Ṽ 2Ṽ
1 2
= − (x − m̃) − c̃
2Ṽ
where:
V
Ṽ =
1 + 2aV
m − bV
m̃ =
1 + 2aV
2
m̃2
m + 2cV
c̃ = −
2V 2Ṽ
We deduce that:
Z x2
1 1 2
J = √ e− 2Ṽ (x−m̃) −c̃ dx
x 2πV
s1
Ṽ −c̃ x2
Z
1 1 2
= e √ e− 2Ṽ (x−m̃) dx
V x1 2π Ṽ
r
1 −c̃ x2 − m̃ x1 − m̃
= e Φ √ −Φ √
1 + 2aV Ṽ Ṽ
We also have:
√ b − m/V
r
x − m̃ 1 + 2aV
√ = x+ V √
Ṽ V 1 + 2aV
and:
m2 + 2cV m̃2
c̃ = −
2V 2Ṽ
2
m2 (1 + 2aV ) (m − bV )
= c+ −
2V (1 + 2aV ) 2V (1 + 2aV )
2am2 + 2bm − b2 V
= c+
2 (1 + 2aV )
Model Risk of Exotic Derivatives 177
where: Z
2
Ii (E) = e−α̂(t,Ti )−β̂(t,Ti )x−Γ̂(t,Ti )x φ (x; m (0, t) , V (0, t)) dx
E
Since we can write Ii (E) in terms of J , we obtain an analytical formula of the caplet
price. For instance, if E = (−∞, x1 ] ∪ [x2 , +∞), we have:
Ii (E) = J α̂ (t, Ti ) , β̂ (t, Ti ) , Γ̂ (t, Ti ) , m (0, t) , V (0, t) , −∞, x1 +
J α̂ (t, Ti ) , β̂ (t, Ti ) , Γ̂ (t, Ti ) , m (0, t) , V (0, t) , x2 , +∞
where: ( √
1 2
S1 (T ) = S1 (0) e(b1 − 2 σ1 )T +σ1 √T ε1
1 2
S2 (T ) = S2 (0) e(b2 − 2 σ2 )T +σ2 T ε2
and (ε1 , ε2 ) is a standardized Gaussian random vector with ρ (ε1 , ε2 ) = ρ. Since the
probability density function of (ε1 , ε2 ) is equal to:
1 − 1
2(1−ρ2 )
(x21 +x22 −2ρx1 x2 )
h (x1 , x2 ) = p e
2π 1− ρ2
we have: ZZ
−rT
C0 = e g (x1 , x2 ) h (x1 , x2 ) dx1 dx2
R2
where:
+
g (x1 , x2 ) = (g1 (x1 ) + g21 (x
2 ) − K)
√
2
g1 (x1 ) = α1 S1 (0) e(b1 − 2 σ1 )T +σ1 √T x1
1 2
g2 (x2 ) = α2 S2 (0) e(b2 − 2 σ2 )T +σ2 T x2
we deduce that9 :
h Z
+ i +
E Aeb+cε − D = Aeb+cx − D φ (x) dx
R
Z ∞
= Aeb ecx φ (x) dx −
1 D b
c ln A−c
Z ∞
D φ (x) dx
1 D b
c ln A−c
Z ∞
1 2
= Aeb+ 2 c ecx φ (x) dx −
1 D b
c ln A − c −c
Z ∞
D φ (x) dx
1 D b
c A−c
ln
1 2
b+ 2 c
= Ae Φ (d1 ) − DΦ (d1 + c)
where:
1 A
d1 = ln + b
c D
(b) If A < 0 and D > 0, we have:
+
Aeb+cε − D =0
and: h + i
E Aeb+cε − D =0
and: h + i 1 2
E Aeb+cε − D = −DΦ (−d1 − c) + Aeb+ 2 c Φ (−d1 )
and: h + i 1 2
E Aeb+cε − D = Aeb+ 2 c − D
Therefore, we have:
ZZ
−rT
C0 = e g 0 (x1 , x3 ) h0 (x1 , x3 ) dx1 dx3
R2
where:
+
0 0 0
g (x1 , x3 ) = (g1 (x1 ) + g12 (x
1 , x3 )√− K)
2
g10 (x1 ) = α1 S1 (0) e(b1 − 2 σ1 )T +σ1 T x1 √ 2 √
1 2
√
g2 (x1 , x3 ) = α2 S2 (0) e(b2 − 2 σ2 )T +ρσ2 T x1 + 1−ρ σ2 T x3
0
It follows that:
Z Z
−rT 0 0 +
C0 = e (g2 (x1 , x3 ) − (K − g1 (x1 ))) φ (x3 ) dx3 φ (x1 ) dx1
R R
where:
√
g20 (x1 , x3 ) = α2 S2 (0) eρσ2 T x1
×
2
√ √
σ22 − 21 (1−ρ2 )σ22 )T +
e(b2 − 2 ρ
1
1−ρ2 σ2 T x3
where S ? > 0 and K ? > 0. Table 9.1 shows that we cannot always transform the
two-dimensional integral into a one-dimensional integral.
TABLE 9.1: Pricing basket options with one-dimensional integration
Case α1 α2 K Type S? K? 1D
#1 + + + (call) α1 S1 (T ) + α2 S2 (T ) K
#2 + + − (e) α1 S1 (T ) + α2 S2 (T ) −K X
#3 + − + (call) α1 S1 (T ) K − α2 S2 (T ) X
#4 + − − (call) α1 S1 (T ) − K −α2 S2 (T )
#5 − + + (call) α2 S2 (T ) K − α1 S1 (T ) X
#6 − + − (call) α2 S2 (T ) − K −α1 S1 (T )
#7 − − + (0) X
#8 − − − (put) α1 S1 (T ) + α2 S2 (T ) K
Chapter 10
Statistical Inference and Model Estimation
L2 = (In − H) (In − H)
= In − 2H + H2
= In − 2H + H
= In − H
Û = LY = L (Xβ + U) = LXβ + LU = LU
3. We have:
−1 >
trace (L) = trace In − X X> X X
−1 >
= trace (In ) − trace X X> X X
−1
= trace (In ) − trace X> X X> X
We know that the rank of an idempotent matrix is equal to its trace. We deduce that
rank (L) = trace (L) = n − K.
181
182 Handbook of Financial Risk Management
4. We have:
>
RSS β̂ = Û> Û = (LU) (LU) = U> L> LU = U> LU
It follows that:
h i
= E U> LU
E RSS β̂
= E trace U> LU
h i
= E trace LU> U
h i
= trace E LU> U
= trace LE U> U
= σ 2 trace (L)
= (n − K) σ 2
and:
RSS β̂
E σ̂ 2 = E = σ2
n−K
5. We have:
>
−1 −1
U> LU = σ 2 (σIn ) U L (σIn ) U
= σ 2 V> LV
Since V> LV is a normalized Gaussian quadratic form, we have:
V> LV ∼ χ2ν
because ν = rank L = n − K. We deduce that:
RSS β̂
σ̂ 2 =
n−K
U> LU
=
n−K
σ2
= V> LV
n−K
σ2
∼ χ2
n − K n−K
6. We have:
>
cov β̂, Û = E β̂ − β Û − 0
h i
= E β̂ − β Û>
h i h i
= E β̂ Û> − βE Û>
h −1 > >
i
= E β + X> X X U (LU)
> −1 > h i
= βE [U] L> + X> X X E UU> L>
−1 >
= σ 2 X> X X L
= 0
Statistical Inference and Model Estimation 183
and:
(n − K) σ̂ 2
∼ χ2n−K
σ2
It follows that:
β̂j − βj
t β̂j =
σ̂ β̂j
β̂ − βj
= r j
−1
σ̂ 2 (X> X)
j,j
β̂j −βj
q
σ 2 ((X> X)−1 )
j,j
= q
(n−K)σ̂ 2
(n−K)σ 2
N (0, 1)
∼ q 2
χn−K
n−K
∼ tn−K
>
ε> ε = (Y − Xβ) (Y − Xβ)
= Y> Y − β > X> Y − Y> Xβ + β > X> Xβ
= Y> Y − 2β > X> Y + β > X> Xβ
It follows that:
β̂ = arg min ε> ε
1
= arg min β > X> X β − β > X> Y
2
β̂ is the solution of a QP problem with Q = X> X and R = X> Y.
>
1 We have Y> Xβ = Y> Xβ = β > X> Y because Y> Xβ is a scalar.
184 Handbook of Financial Risk Management
X> >
? 1β̂0 + X? X? β̂? = X> ?Y
If the residuals are centered, we must verify that 1> ε̂ = 0 or 1> Y − β̂0 1−β̂? X? =
0. We have2 :
1> Y − β̂0 1−β̂? X? = 1> Y − 1> β̂0 1 − 1> β̂? X?
of β is K ×1, the matrices C, γ and D have the following dimensions K ×(K − 1),
(K − 1) × 1 and K × 1. The objective function becomes then:
1 >
β X> X β − β > X> Y
f (β) =
2
1 > >
(Cγ + D) X> X (Cγ + D) − (Cγ + D) X> Y
=
2
1 > > > 1 1
= γ C X XCγ + D> X> XCγ + γ > C > X> XD +
2 2 2
1 > >
D X XD − γ > C > X> Y − D> X> Y
2
1 > > >
γ C X XC γ + γ > C > X> XD − C > X> Y +
=
2
1 > > > >
D X XD − D X Y
2
We deduce that: −1
γ̂ = C > X> XC C > X> (Y − XD)
and: −1
β̂ = C C > X> XC C > X> (Y − XD) + D
The analytical solution consists in computing C, D and finally β̂.
= β
186 Handbook of Financial Risk Management
2. (a) We have:
β̃ =arg min RSS (β)
Aβ = B
s.t.
Cβ ≥ D
We deduce that:
1
arg min β > 2X> X β − β > 2X> Y
β̃ =
2
Aβ = B
s.t.
Cβ ≥ D
We obtain β̃1 = −2.40, β̃2 = 1.08, β̃3 = 0.49, β̃4 = 2.43 and β̃5 = −0.60.
ii. If β1 = β2 = β5 , we have:
1 −1 0 0 0 0
A= and B =
1 0 0 0 −1 0
We obtain β̃1 = β̃2 = β̃5 = −0.08, β̃3 = 2.22 and β̃4 = 3.17.
iii. If β1 ≥ β2 ≥ β3 ≥ β4 ≥ β5 , we have:
1 −1 0 0 0 0
0 1 −1 0 0 0
C= and D =
0 0 1 −1 0 0
0 0 0 1 −1 0
We obtain β̃1 = 1.33, β̃2 = 1.33, β̃3 = 1.33, β̃4 = 1.33 and β̃5 = −0.23.
P5
iv. If β1 ≤ β2 ≤ β3 ≤ β4 ≤ β5 and i=1 βi = 1, we have:
A = 1 1 1 1 1 , B = 1,
and:
−1 1 0 0 0 0
0 −1 1 0 0 0
C=
and D =
0 0 −1 1 0 0
0 0 0 −1 1 0
Statistical Inference and Model Estimation 187
We obtain β̃1 = −2.63, β̃2 = 0.91, β̃3 = 0.91, β̃4 = 0.91 and β̃5 = 0.91. The
first-order condition of the QP program is:
We deduce that:
0.0000
3.7244
λC =
0.8501
25.5951
3. (a) We have:
1 >
β X> X β − β > X> Y − λ> (Aβ − B)
f (β; λ) =
2
The first-order condition is:
∂ f (β; λ)
= X > X β − X > Y − A> λ = 0
∂β
We have then: −1 −1 >
β̃ = X> X X> Y − X> X
A λ
Since Aβ = B, we have:
−1 −1 >
A X> X X> Y − A X> X
A λ=B
We deduce that:
−1
X> X X> Y −
β̃ =
−1 > −1 > −1 −1
X> X A A X> X A X >X X> Y − B
A
−1 > −1 > −1
= β̂ − X> X A A X> X A Aβ̂ − B
(b) To transform the explicit constraints into implicit constraints, we consider the
parametrization:
β = Cγ + D
188 Handbook of Financial Risk Management
and: −1
β̃ = C C > X> XC C > X> (Y − XD) + D
(c) The expression of the estimator under explicit constraints is:
−1 > −1 > −1
β̃ = β̂ − X> X A A X> X A Aβ̂ − B
>
−1 >
>
−1 > −1 >
−1
= X X I −A A X X A A X X ·
−1 > −1 > −1
X> Y + X> X A A X> X
A B
and:
−1 > −1 > −1
X> X A A X> X A =
−1 > >
?
I − C C > X> XC C X X A> A A>
β = Cγ + D
√1
0 0 1
3 3
√1 1
0 0
γ1
3
3
= 1 0 0 γ2 + 0
0 1 0 γ3 0
0 0 √1 − 23
3
We deduce that:
−1 >
C > X> XC C X> Y − X> XD
γ̃ =
2.08942
= 3.21265
−0.09168
We obtain the same solution:
β̃ = C γ̃ + D
0.28040
0.28040
= 2.08942
3.21265
−0.71960
β = Cγ + D
1 0 0 0
1 0
0
γ1
0
= 0 1 0 γ2 + 0
0 0 1 γ3 0
1 0 0 −1
190 Handbook of Financial Risk Management
we obtain:
−1 >
C > X> XC C X> Y − X> XD
γ̃ =
0.28040
= 2.08942
3.21265
and:
β̃ = C γ̃ + D
0.28040
0.28040
= 2.08942
3.21265
−0.71960
It follows that:
Pn
∂ ` (λ) yi
=0 ⇔ −n + i=1 = 0
∂λ
Pn λ̂
yi
⇔ λ̂ = i=1 = ȳ
n
2. We have: Pn
∂ 2 ` (λ) i=1 yi
=−
∂ λ2 λ2
We deduce that:
Pn
i=1 Yi
I (λ) = E
λ2
n
=
λ
The variance based on the Information matrix is then:
λ̂
var λ̂ =
n
If we use the Hessian matrix, we obtain:
λ̂2 λ̂2 λ̂
var λ̂ = Pn = =
i=1 yi nȳ n
We obtain the same expression.
Statistical Inference and Model Estimation 191
It follows that:
n
∂ ` (λ) n X
=0 ⇔ − yi = 0
∂λ λ̂ i=1
n 1
⇔ λ̂ = Pn =
i=1 yi ȳ
2. We have:
∂ 2 ` (λ) n
2
=− 2
∂λ λ
We deduce that:
n
I (λ) =
λ2
The variance based on the Information matrix is then:
λ̂2
var λ̂ =
n
It is equal to the variance based on the Hessian matrix.
2. It follows that:
∂ ` (θ) 2X> (Y − Xβ)
=
∂β 2σ 2
X> Y − X> Xβ
=
σ2
and:
>
∂ ` (θ) n (Y − Xβ) (Y − Xβ)
=− 2 +
∂ σ2 2σ 2σ 4
192 Handbook of Financial Risk Management
We deduce that:
∂ ` (θ)
= 0 ⇔ X> Y − X> Xβ̂ = 0
∂β
−1 >
⇔ β̂ = X> X X Y
and:
>
∂ ` (θ) n Y − Xβ̂ Y − Xβ̂
=0 ⇔ − + =0
∂ σ2 2σ̂ 2 2σ̂ 4
>
Y − Xβ̂ Y − Xβ̂
⇔ σ̂ 2 =
n
2 2
We verify that β̂ML = β̂OLS and σ̂ML < σ̂OLS because:
>
Y − Xβ̂ Y − Xβ̂
2
σ̂OLS =
n−K
3. We have:
∂ 2 ` (θ) X> X
= −
∂ β ∂ β> σ2
∂ 2 ` (θ) X> (Y − Xβ)
= −
∂ β ∂ σ2 σ4
>
X U
= − 4
σ
>
∂ 2 ` (θ) n (Y − Xβ) (Y − Xβ)
= −
∂ σ2 ∂ σ2 2σ 4 σ6
n U> U
= −
2σ 4 σ6
It follows that:
−X> X/σ 2 −X> U/σ 4
H (θ) =
−X> U/σ 4 n/ 2σ 4 − U> U/σ 6
and:
= −E [H (θ)]
I (θ)
>
2
> 4
= X >X/σ
4 E> X U6 /σ n 4
E X U /σ E U U /σ − 2 /σ
>
X X/σ 2
0
= n 4
0 2 /σ
Pn
because we have E X> U = 0 and E U> U = E
2
2
i=1 ui = nσ . We deduce that:
−1
var (θ) = I (θ)
−1
σ 2 X> X 0
=
0 2σ 4 /n
Statistical Inference and Model Estimation 193
= π1 E Y1k + π2 E Y2k
k
because B is independent from Y1 and Y2 , B k ∼ B (π1 ) and (1 − B) ∼ B (π2 ).
2. We deduce that:
E [Y ] = π1 E [Y1 ] + π2 E [Y2 ]
= π1 µ1 + π2 µ2
and:
= E Y 2 − E2 [Y ]
var (Y )
= π1 E Y12 + π2 E Y22 − E2 [Y ]
Since we know that E Yi2 = µ2i + σi2 , we obtain:
2
var (Y ) = π1 µ21 + σ12 + π2 µ22 + σ22 − (π1 µ1 + π2 µ2 )
2
= π1 σ12 + π2 σ22 + π1 π2 (µ1 − µ2 )
because π2 = 1 − π1 .
194 Handbook of Financial Risk Management
3
3. We remind that E Yi = µ3i + 3µi σi2 . It follows that:
h i
3
E Y 3 − 3E [Y ] var (Y ) − E3 [Y ]
E (Y − E [Y ]) =
π1 µ31 + 3µ1 σ12 + π2 µ32 + 3µ2 σ22 −
=
2
3 (π1 µ1 + π2 µ2 ) π1 σ12 + π2 σ22 + π1 π2 (µ1 − µ2 ) −
3
(π1 µ1 + π2 µ2 )
3
π1 π2 (π2 − π1 ) (µ1 − µ2 ) + 3π1 π2 (µ1 − µ2 ) σ12 − σ22
=
It follows that:
1
ln X (t) − ln X (s) = µ − σ 2 (t − s) + σ (W (t) − W (s))
2
Since W (t) − W (s) ∼ N (0, t − s), we deduce that the log-likelihood function of the
sample X is:
T
ε2i
1X 2
` (µ, σ) = − ln 2π + ln σ ∆ti + 2
2 i=1 σ ∆ti
T T
T T 1X 1 X ε2i
= − ln 2π − ln σ 2 − ln ∆ti −
2 2 2 i=1 2 i=1 σ 2 ∆ti
where:
t
σ2
Z
e−a(t−u) dW (u) ∼ N 0, 1 − e−2a(t−s)
s 2a
Statistical Inference and Model Estimation 195
We deduce that:
T 2
1X σ −2a∆ti
` (a, b, σ) = − ln 2π + ln 1−e −
2 i=1 2a
T
1X 2aε2i
2 i=1 σ 2 (1 − e−2a∆ti )
T
T T σ2 1X
ln 1 − e−2a∆ti −
= − ln 2π − ln −
2 2 2a 2 i=1
aε2i
σ2 (1 − e−2a∆ti )
where:
εi = xi − xi−1 e−a∆ti − b 1 − e−a∆ti
3. We have:
We deduce that:
T
ε2i
1X
ln 2π + ln σ 2 (ti−1 , xi−1 ) ∆ti + 2
` (θ) = −
2 i=1 σ (ti−1 , xi−1 ) ∆ti
where:εi = xi − xi−1 − µ (ti−1 , xi−1 ) ∆ti . In the case of the CIR process, we obtain:
T
T T 1X
` (a, b, σ) = − ln 2π − ln σ 2 − ln (xi−1 ∆ti )
2 2 2 i=1
T
1X ε2i
− 2
(10.1)
2 i=1 σ xi−1 ∆ti
where:
εi = xi − xi−1 − a (b − xi−1 ) ∆ti
We assume that X (s, t) = X (t) | X (s) is normally-distributed
h N (mi1 (s, t) , m2 (s, t))
2
where m1 (s, t) = E [X (s, t)] and m2 (s, t) = E (X (s, t) − m1 (s, t)) .Then, we have:
T
!
2
1X (xi − m1 (ti−1 , ti ))
` (θ) = − ln 2π + ln m2 (ti−1 , ti ) +
2 i=1 m2 (ti−1 , ti )
and:
2 !
e−a∆ti − e−2a∆ti 1 − e−a∆ti
2
m2 (ti−1 , ti ) = σ xi−1 +b
a 2a
196 Handbook of Financial Risk Management
We deduce that:
T T
` (a, b, σ) = − ln 2π − ln σ 2 −
2 2
T 2 !
e−a∆ti − e−2a∆ti 1 − e−a∆ti
1 X
ln xi−1 +b −
2 i=1 a 2a
T
1X ε2i
2
(10.2)
2 i=1 σ xi−1 ∆ti
where:
εi = xi − xi−1 e−a∆ti − b 1 − e−a∆ti
When ∆ti → 0, we have e−a∆ti ≈ 1 − a∆ti and e−2a∆ti ≈ 1 − 2a∆ti . It follows that:
e−a∆ti − e−2a∆ti
(1 − a∆ti ) − (1 − 2a∆ti )
≈
a a
≈ ∆ti
and:
2
1 − e−a∆ti 1 − 2 (1 − a∆ti ) + (1 − 2a∆ti )
≈
2a 2a
≈ 0
We deduce that m1 (ti−1 , ti ) ≈ xi−1 (1 − a∆ti ) + ab∆ti , m2 (ti−1 , ti ) ≈ σ 2 xi−1 ∆ti and
εi ≈ xi − xi−1 (1 − a∆ti ) − ab∆ti
≈ xi − xi−1 − a (b − xi−1 ) ∆ti
We conclude that the log-likelihood functions (10.1) and (10.2) converge to the same
expression when ∆ti → 0.
4. For the geometric Brownian motion, we have Eti−1 [εi ] = 0 and Eti−1 ε2i − σ 2 ∆ti = 0.
We deduce that:
hi,1 (µ, σ) = ln xi − ln xi−1 − µ − 21 σ 2 ∆ti
2
hi,2 (µ, σ) = ln xi − ln xi−1 − µ − 21 σ 2 ∆ti − σ 2 ∆ti
For the Ornstein-Uhlenbeck process, we can use the same two moment conditions and
the orthogonal condition Eti−1 [εi xi−1 ] = 0. Finally, we obtain:
−a∆ti
− b 1 − e−a∆ti
hi,1 (θ) = xi − xi−1 e
2 −2a∆ti
hi,2 (θ) = xt − xt−1 e−a∆ti − b 1 − e−a∆ti − σ 2 1−e 2a
hi,3 (θ) = xi − xi−1 e−a∆ti − b 1 − e−a∆ti xi−1
and: 2 !
e−a∆ti − e−2a∆ti 1 − e−a∆ti
2
m2 (ti−1 , ti ) = σ xi−1 +b
a 2a
Statistical Inference and Model Estimation 197
we obtain:
hi,1 (θ) = xi − m1 (ti−1 , ti )
hi,2 (θ) = (xi − m1 (ti−1 , ti ))2 − m2 (ti−1 , ti )
where:
m1 (ti−1 , ti ) = xi−1 + a (b − xi−1 ) ∆ti
and:
2γ
m2 (ti−1 , ti ) = σ 2 |xi−1 | ∆ti
φ (α) φ (−α)
λ (α) = =
1 − Φ (α) Φ (−α)
We have:
∞ 2 !
x−µ
Z
1 1 1
E X̃ 2 = 2
x √ exp − dx
1 − Φ (α) c σ 2π 2 σ
Z ∞
1 2 1 1 2
= (µ + σy) √ exp − y dy
1 − Φ (α) α 2π 2
Z ∞
1 ∞
= µ2 φ (y) dy + 2µσ [−φ (y)]α +
1 − Φ (α) α
Z ∞
2 2
σ y φ (y) dy
α
Z ∞
σ2
2 ∞
= µ + 2µσλ (α) + [−yφ (y)]α + φ (y) dy
1 − Φ (α) α
= µ2 + 2µσλ (α) + σ 2 (1 + αλ (α))
We deduce that:
E X̃ 2 − E2 X̃
var X̃ =
= µ2 + 2µσλ (α) +
σ 2 (1 + αλ (α)) − µ2 − 2µσλ (α) − σ 2 λ2 (α)
= σ 2 (1 − δ (α))
where:
We have:
E Ỹ = Pr {Y = c} E Ỹ | X < c + Pr {Y 6= c} E [X | X ≥ c]
= Pr {X < c} c + Pr {X ≥ c} E X̃
= Φ (α) c + (1 − Φ (α)) (µ + σλ (α))
We also have:
E Ỹ 2 = Pr {Y = c} E Ỹ 2 | X < c + Pr {Y 6= c} E X 2 | X ≥ c
= Φ (α) c2 + (1 − Φ (α)) E X̃ 2
We deduce that:
E Ỹ 2 − E2 Ỹ
var Ỹ =
Φ (α) c2 + (1 − Φ (α)) µ2 + 2µσλ (α) + σ 2 (1 + αλ (α)) −
=
Φ2 (α) c2 − 2Φ (α) (1 − Φ (α)) (µc + σcλ (α)) −
2
(1 − Φ (α)) µ2 + 2µσλ (α) + σ 2 λ2 (α)
because we have:
−Φ (α) λ2 (α) − λ (α) φ (α) + λ2 (α) = 0
3. In Figures 10.1 and 10.2, we have reported the corresponding probability density
function of
the variable X̃ and the censoredrandom
truncated random variableỸ . We
obtain E X̃ = 3.7955, E X̃ 2 = 18.3864, σ X̃ = 1.9952, E Ỹ = 2.7627, E Ỹ 2 =
11.9632 and σ Ỹ = 2.0810. We verify that truncation reduces variance: σ X̃ ≤
σ (X). In the case of truncation, some observations are excluded, implying that we
observe only a part of the probability density function. In the case od censoring, the
probability density function is a mixture of continuous and discrete distributions. In
particular, we observe a probability mass at the censoring point X = c.
4. We have:
Pr {Y = 0} = Pr {Y ? ≤ 0}
= Pr x> β + U ≤ 0
= Pr U ≤ −x> β
>
x β
= Φ −
σ
>
x β
= 1−Φ
σ
We deduce that the log-likelihood function is equal to:
n >
X xi β
` (θ) = (1 − di ) ln 1 − Φ −
i=1
σ
n 2 !
yi − x>
1X 2 i β
di ln 2π + ln σ +
2 i=1 σ
5. We have:
∂ φ (f (x))
ln (1 − Φ (f (x))) = − f 0 (x)
∂x 1 − Φ (f (x))
and:
x>
∂ i β xi
=
∂β σ σ
We also have:
∂ 1 1
=− 3
∂ σ2 σ 2σ
We deduce that the ML estimator satisfies the following first-order conditions:
∂ ` (θ) 1 X φi 1 X
yi − x>
=− xi + 2 i β xi = 0 (10.4)
∂β σ 1 − Φi σ
di =0 di =1
and:
∂ ` (θ) 1 X φi 1 X 2 n1
2
= 3
x>
i β+ 4
yi − x>
i β − 2 =0 (10.5)
∂σ 2σ 1 − Φi 2σ 2σ
di =0 di =1
x>
>
i β xi β Pn
where φi = φ , Φi = Φ and n1 = i=1 di .
σ σ
6. Since ∂x φ (x) = −xφ (x), we have:
and:
x>
∂ φi 1 φi i β
=− φi − (1 − Φi ) x>
i β
∂ σ2 1 − Φi 2σ 3 (1 − Φi )2 σ
For the Hessian matrix, we obtain:
∂ 2 ` (θ) x>
1 X φi i β
= − 2 φi − (1 − Φi ) xi x>
i −
∂ β ∂ β> σ 2
(1 − Φi ) σ
di =0
1 X
xi x>
i
σ2
di =1
and:
∂ 2 ` (θ) 1 X φi
∂ β ∂ σ2
=
2σ 3 2 (1 − Φi ) +
di =0
(1 − Φi )
> > 2 !!
X φi xi β xi β
2 φi − (1 − Φi ) xi −
(1 − Φ i ) σ σ
di =0
1 X
yi − x>
4 i β xi
σ
di =1
202 Handbook of Financial Risk Management
We also have:
∂ 1 3
=−
∂ σ2 σ3 2σ 5
and:
>
∂ 2 ` (θ)
1 X φi xi β
= − 2 3 (1 − Φ i ) +
∂ σ2 ∂ σ2 4σ 4
(1 − Φi ) σ
di =0
> 2 > 3 !
xi β xi β
φi − (1 − Φi ) −
σ σ
1 X 2 n1
6
yi − x>i β + 4
σ 2σ
di =1
1 X φi 1 X
x> yi − x>
>
− 3 i β+ 4 i β xi β = 0
2σ 1 − Φi 2σ
di =0 di =1
1 X 1 X 2 n1
yi − x>
>
4 i β xi β + 4
yi − x>
i β − 2 =0
2σ 2σ 2σ
di =1 di =1
We deduce that:
1 X 2
yi − x>
> >
σ2 = i β xi β + yi − xi β
n1
di =1
1 X
yi − x>
= i β yi
n1
di =1
we obtain:
n
∂ 2 ` (θ)
1 X (1 − Φi ) φi
E = − (φi − (1 − Φi ) zi ) xi x>
i −
∂ β ∂ β> σ 2 i=1 (1 − Φi )2
n
1 X
Φ i xi x>
i
σ 2 i=1
n
X
= − ai xi x>
i
i=1
where:
φ2i
1
ai = − φi zi − − Φi
σ2 1 − Φi
Using Equation (10.3), we have:
E Di yi − x>
i β = E [Di Ui ]
φi
= E [Di ] σ
Φi
= σφi
and:
n
∂ 2 ` (θ)
X
E = − bi x i
∂ β σ2 i=1
where:
φ2i zi
1 2 1
bi = −φ i − + φ z
i i + 4 σφi
2σ 3 1 − Φi σ
φ2i zi
1 2
= φ z
i i + φ i −
2σ 3 1 − Φi
We have:
X 2 X
yi − x> yi − x> yi − x>
i β = i β i β
di =1 di =1
X
yi − x>
>
= n1 σ 2 − i β xi β
di =1
and:
" # " #
n1 1 X 2 n1 1 X
yi − x> yi − x>
>
E 4
− 6 i β = E − 4+ 6 i β xi β
2σ σ 2σ σ
di =1 di =1
n n
1 X 1 X
= − 4 Φi + 4 φi zi
2σ i=1 σ i=1
We deduce that:
n
∂ 2 ` (θ)
X
E = − ci
∂ β ∂ β> i=1
204 Handbook of Financial Risk Management
where:
φ2i zi2
1 3 1 1
ci = − −3φ z
i i − + φ z
i i + 4 Φi − 4 φi zi
4σ 4 1 − Φi 2σ σ
φ2 z 2
1
= − 4 φi zi3 + φi zi − i i − 2Φi
4σ 1 − Φi
φi
= λ x>
i β
1 − Φi
where λ is the inverse Mills ratio. The first-order condition (10.4) becomes:
−σ̂X> >
0 Λ0 + X1 Y1 − X1 β̂ = 0
It follows that the OLS estimator β̂1 based on non-censured data is biased.
and:
= E x> β + U | U ≤ −x> β
E [Y | Y ≤ 0]
= x> β + E U | U ≤ −x> β
>
x β
= x> β − σλ (10.8)
σ
Statistical Inference and Model Estimation 205
Rt ηt ηt> Rt>
We deduce that:
h > i
Pt|t−1 = Et−1 αt − α̂t|t−1 αt − α̂t|t−1
h > i >
= Tt Et−1 αt−1 − α̂t−1|t−1 αt−1 − α̂t−1|t−1 Tt +
> >
2Tt Et−1 αt−1 − α̂t−1|t−1 ηt Rt +
Rt Et−1 ηt ηt> Rt>
2. We have:
vt = yt − Et−1 [yt ]
= yt − Et−1 [Zt αt + dt + t ]
= yt − Zt α̂t|t−1 − dt
= Zt αt − α̂t|t−1 + t
Statistical Inference and Model Estimation 207
and:
h i
>
Ft = Et−1 (vt − 0) (vt − 0)
h > i
= Et−1 Zt αt − α̂t|t−1 + t Zt αt − α̂t|t−1 + t
h > i >
Zt + Et−1 t >
= Zt Et−1 αt − α̂t|t−1 αt − α̂t|t−1 t
= Zt Pt|t−1 Zt> + Ht
3. We have:
h > i
Et−1 αt vt> =
Et−1 αt Zt αt − α̂t|t−1 + t
h i
= Et−1 αt αt> − α̂t|t−1
>
Zt> + Et−1 αt >
t
h i
= Et−1 αt − α̂t|t−1 αt> − α̂t|t−1 >
Zt> +
h i
α̂t|t−1 Et−1 αt> − α̂t|t−1
>
Zt>
= Pt|t−1 Zt>
and:
αt αt
=
vt Zt αt − α̂t|t−1 + t
Im 0 αt 0
= +
Zt In t −Zt α̂t|t−1
αt
= At + Bt
t
Conditionally to the filtration Ft−1 , the random vector (αt , vt ) is a linear combination
At Xt + Bt of the independent Gaussian random vector Xt = (αt , t ). We deduce that:
Pt|t−1 Zt>
αt α̂t|t−1 Pt|t−1
∼N ,
vt 0 Zt Pt|t−1 Ft
4. We deduce that:
α̂t|t = Et [αt ]
= E αt | vt = yt − Zt α̂t|t−1 − dt
and:
Pt|t = Pt|t−1 − Pt|t−1 Zt> Ft−1 Zt Pt|t−1
208 Handbook of Financial Risk Management
We have:
Since we have vt = yt − Zt α̂t|t−1 − dt , we can write the state space model as follows:
yt = Zt α̂t|t−1 + dt + vt
α̂t+1|t = Tt+1 α̂t|t−1 + ct+1 + Kt vt
If vt = 0, then α̂t+1|t = Tt+1 α̂t|t−1 + ct+1 . Kt indicates how the filter changes the
classical estimation Tt+1 α̂t|t−1 + ct+1 when it takes into account innovation errors.
Therefore, Kt is the correction matrix of the prediction-correction method.
We obtain:
yt = Zt? αt?
?
αt? = Tt? αt−1 + Rt? ηt?
where:
Zt? =
Zt dt In
Tt ct 0
Tt? = 0 1 0
0 0 0
Rt 0
Rt? = 0 0
0 In
The state vector becomes αt? = (αt , γt , t ) whereas the noise process ηt? = (ηt , t ) is a
Gaussian random vector N (0, Q?t ) where:
Qt Ct>
Q?t =
C t Ht
Statistical Inference and Model Estimation 209
7. If we apply the Kalman filter to the augmented state space model, we obtain:
?
α̂t|t−1 = Tt? α̂t−1|t−1
?
? ? ?
Tt?> + Rt? Q?t Rt?>
Pt|t−1 = Tt Pt−1|t−1
? ? ?
ŷt|t−1 = Zt α̂t|t−1
? ?
vt = yt − ŷt|t−1
Ft = Zt Pt|t−1 Zt?>
? ? ?
α̂? = α̂t|t−1
? ?
Zt?> Ft?−1 vt?
+ Pt|t−1
t|t
Pt|t = Pt|t−1 − Pt|t−1 Zt?> Ft?−1 Zt? Pt|t−1
? ? ? ?
Using the standard SSM notations, we have c = (µ, 0), R = (1, 1), Q = σε2 and:
φ1 0
T =
0 0
It follows that:
1 − φ1 0
I2 − T =
0 1
and:
−1 1 1 0
(I2 − T ) =
1 − φ1 0 1 − φ1
1
1−φ1 0
=
0 1
210 Handbook of Financial Risk Management
We also have:
1 1
RQR> = σε2
1 1
and:
φ21
0 0 0
0 0 0 0
T ⊗T =
0
0 0 0
0 0 0 0
We obtain: 1
1−φ21
0 0 0
(I4 − T ⊗ T )
−1
= 0 1 0 0
0 0 1 0
0 0 0 1
and:
−1
(I4 − T ⊗ T ) vec RQR>
vec (P∞ ) =
1 2
σ
1−φ21 ε
2
=
σε
σ2 ε
σε2
Using the standard SSM notations, we have c = (µ, 0), R = (1, 1), Q = σε2 and:
0 −θ1
T =
0 0
We obtain:
−1 1 −θ1
(I2 − T ) =
0 1
and:
1 −θ1 µ µ
α̂∞ = =
0 1 0 0
Statistical Inference and Model Estimation 211
We have:
−θ12
1 0 0
0 1 0 0
I4 − T ⊗ T =
0
0 1 0
0 0 0 1
and:
θ12
2
1 0 0 σε σε2 1 + θ12
0 1 0 0 σε2 σε2
vec (P∞ ) = =
0 0 1 0 σε2 σε2
0 0 0 1 σε2 σε2
Finally, we obtain:
1 + θ12
1
P∞ = σε2
1 1
Using the standard SSM notations, we have c = (µ, 0), R = (1, 1), Q = σε2 and:
φ1 −θ1
T =
0 0
We obtain:
−1 1 1 −θ1
(I2 − T ) =
1 − φ1 0 1 − φ1
and: µ
1 1 −θ1 µ 1−φ1
α̂∞ = =
1 − φ1 0 1 − φ1 0 0
We also have:
φ21 θ12
−φ1 θ1 −φ1 θ1
0 0 0 0
T ⊗T =
0
0 0 0
0 0 0 0
It follows that:
1 φ1 θ1 φ1 θ1 θ12
σε2
1−φ21
− 1−φ 2 − 1−φ 2 1−φ21
1 1 2
σε
vec (P∞ ) =
0 1 0 0 2
0 0 1 0 σε
0 0 0 1 σε2
and: !
1−2φ1 θ1 +θ12
1
P∞ = σε2 1−φ21
1 1
Using the standard SSM notations, we have c = (µ, 0), R = (1, 1), Q = σε2 and:
0 θ1
T =
0 θ1
We obtain:
1 1 − θ1 θ1 µ µ
α̂∞ = =
1 − θ1 0 1 0 0
and:
θ12
1 0 0 2 1
1−θ12 σ 1−θ12
θ12 ε2
0 1
1 0 1−θ12 σε 1−θ12
2
vec (P∞ ) = 2 = σε
θ12 1
0 0 1 σε 1−θ12
1−θ12
σε2 1
1
0 0 0 1−θ12
1−θ12
We deduce that: !
1 1
1−θ12 1−θ12
P∞ = σε2 1 1
1−θ12 1−θ12
1. We have:
−1 −1
−1
Im + AB > C −1 B A = Im + AB > C −1 B A−1
−1
= A−1 Im + AB > C −1 B
−1
= A−1 + B > C −1 B
−1 −1
2. If the relationship Im + AB > C −1 B = Im − AB > C + BAB > B is true, we
must verify that:
−1
(∗) = Im + AB > C −1 B Im − AB > C + BAB > B
= Im
We have:
−1
(∗) = Im + AB > C −1 B Im − AB > C + BAB > B
−1
Im + AB > C −1 B − Im + AB > C −1 B AB > C + BAB >
= B
−1
Im + AB > C −1 B − Im + AB > C −1 B AB > B −1 C + AB >
=
−1
−1
Im + AB > C −1 B − Im + AB > C −1 B B −1 CB > A−1 + Im
=
Since we have:
−1
Im + AB > C −1 B = AB > C −1 B AB > C −1 B + Im
−1
= AB > C −1 B B −1 CB > A−1 + Im
Statistical Inference and Model Estimation 213
We deduce that:
Im + AB > C −1 B −
(∗) =
−1
−1
−1
AB > C −1 B B −1 CB > A−1 + Im B −1 CB > A−1 + Im
Im + AB > C −1 B − AB > C −1 B
=
= Im
and:
−1
(∗) = Im + AB > C −1 B AB > C −1
−1 > −1
= A−1 + B > C −1 B B C
−1
= A − AB C + BAB >
>
BA B > C −1
−1
= AB > C −1 − AB > C + BAB > BAB > C −1
−1
AB > C −1 − AB > C + BAB > BAB > + C C −1 − I
=
−1
AB > C −1 − AB > C + BAB > BAB > + C C −1 +
=
−1
AB > C + BAB >
−1
= AB > C −1 − AB > C −1 + AB > C + BAB >
4. We have:
−1
Im + D−1 A (A + D)
(∗) =
−1 −1
= (A + D) + D−1 A (A + D)
−1 −1
= (A + D) + D−1 Im + DA−1
−1
−1
= (A + D) + D−1 Im − Im + DA−1 DA−1
−1 −1
= (A + D) + D−1 − D−1 AD−1 + Im
−1 −1
= (A + D) + D−1 − (A + D)
= D−1
214 Handbook of Financial Risk Management
5. Let V be a covariance matrix. The information matrix I is the inverse of the covariance
matrix V :
I = V −1
This matrix is used in the method of maximum likelihood.
? ?
6. The state α̂t|t (resp. α̂t|t−1 ) is the estimator of αt normalized by the covariance matrix
given the filtration Ft (resp. Ft−1 ).
7. We have:
−1
It|t Pt|t−1 = Pt|t Pt|t−1
−1
−1
= Pt|t−1 Im − Pt|t−1 Zt> Ft−1 Zt Pt|t−1
−1
Im + Pt|t−1 Zt> Ht−1 Zt Pt|t−1
= Pt|t−1
= Im + Zt> Ht−1 Zt Pt|t−1
because:
−1
(∗) = Im − Pt|t−1 Zt> Ft−1 Zt
−1
= Im − Pt|t−1 Zt> −Ft + Zt Pt|t−1 Zt> Zt
−1
= Im − Pt|t−1 Zt> (−Ht ) Zt
= Im + Pt|t−1 Zt> Ht−1 Zt
We also have:
−1
(∗) = It|t Pt|t−1 Zt> Zt Pt|t−1 Zt> + Ht
−1
Im + Zt> Ht−1 Zt Pt|t−1 Zt> Zt Pt|t−1 Zt> + Ht
=
−1
Zt> In + Ht−1 Zt Pt|t−1 Zt> Zt Pt|t−1 Zt> + Ht
=
8. We have:
(a)
−1
It|t−1 = Pt|t−1
−1
= Tt Pt−1 Tt> + Rt Qt Rt>
−1
= Tt I−1
t−1|t−1 Tt
>
+ R t Qt R >
t
(b)
?
α̂t|t−1 = It|t−1 α̂t|t−1
= It|t−1 Tt α̂t−1|t−1
= It|t−1 Tt I−1 ?
t−1|t−1 α̂t−1|t−1
Statistical Inference and Model Estimation 215
(c)
−1
It|t = Pt|t
−1
−1
= Pt|t−1 Im − Pt|t−1 Zt> Ft−1 Zt
−1
Im + Pt|t−1 Zt> Ht−1 Zt
= Pt|t−1
= It|t−1 + Zt> Ht−1 Zt
(d)
?
α̂t|t = It|t α̂t|t
= It|t α̂t|t−1 + Pt|t−1 Zt> Ft−1 yt − Zt α̂t|t−1
We deduce that the recursive equations of the Kalman information filter are:
−1
−1 > >
It|t−1 = Tt I t−1|t−1 Tt + R t Qt Rt
α̂t|t−1 = It|t−1 Tt I−1
? ?
t−1|t−1 α̂t−1|t−1
> −1
It|t = It|t−1 + Zt Ht Zt
α̂? = α̂?
> −1
t|t t|t−1 + Zt Ht yt
It is not obvious that the computational time is reduced when using the information
filter. Its advantage may be due to the inverse of It−1|t−1 that can be more stable
than Ft−1 in some cases.
9. We have:
T T
nT 1X 1 X > −1
` (θ) = − ln (2π) − ln |Ft | − v F vt
2 2 t=1 2 t=1 t t
Ft = Zt I−1 >
t|t−1 Zt + Ht
vt = yt − Zt I−1
?
t|t−1 α̂t|t−1
?
α̂0 = 0
I0 = 0
In the case of the Kalman covariance matrix, we set α0 ∼ N (0, κIm ) where κ is a
scalar sufficiently high such that I0 = κ−1 Im ' 0.
216 Handbook of Financial Risk Management
2. We have:
yt = µt + Φ01 yt−1 + Φ02 yt−2 + εt
We deduce that:
and Xp
(p)
Φi =− Φ0j
j=i+1
We notice that:
Xp
Π(p) = Φ0i − In
i=1
X
p−1
= Φ0i − In + Φ0p
i=1
= Π(p−1) + Φ0p
and:
(p)
Xp
Φi = − Φ0j
j=i+1
Xp−1
= − Φ0j − Φ0p
j=i+1
(p−1)
= Φi − Φ0p
We prove the relationship by induction. Let us assume that it holds for the order p−1.
We have:
∆yt = yt − yt−1
Xp
= µt + Φ0i yt−i + εt − yt−1
i=1
Xp−1
= µt + Φ0i yt−i + εt − yt−1 + Φ0p yt−p
i=1
Xp−1 (p−1)
= µt + Π(p−1) yt−1 + Φi ∆yt−i + εt + Φ0p yt−p
i=1
Xp−1 (p)
= µt + Π(p) − Φ0p yt−1 + Φi + Φ0p ∆yt−i +
i=1
εt + Φ0p yt−p
Xp (p)
= µt + Π(p) yt−1 + Φi ∆yt−i + εt + ηt
i=1
Statistical Inference and Model Estimation 217
(p)
Since Φp = 0, the value of ηt is equal to:
p−1
X
ηt = −Φ0p yt−1 + Φ0p ∆yt−i − Φp(p) ∆yt−p + Φ0p yt−p
i=1
p−1
X
= −Φ0p yt−1 + Φ0p (yt−i − yt−i−1 ) + Φ0p yt−p
i=1
= −Φ0p yt−1 + Φ0p yt−1 − Φ0p yt−2 + Φ0p yt−2 +
. . . − Φ0p yt−p + Φ0p yt−p
= 0
If λj 6= 0, we obtain:
n
σ2 σ2 X cos (2λj t)
lim var (a (λj )) = + lim
n→∞ 2 2 n→∞
t=1
n
σ2
=
2
218 Handbook of Financial Risk Management
We also have:
!2
n
1 X
var (b (λj )) = E √ yt sin (λj t)
n t=1
n
σ2 X 2
= sin (λj t)
n t=1
n
σ 2 X 1 − cos (2λj t)
=
n t=1 2
f λj 6= 0, we obtain:
σ2
lim var (b (λj )) =
n→∞ 2
2
2
We deduce that a (λj ) ∼ N 0, σ2 and b (λj ) ∼ N 0, σ2 .
2. We have:
n
" n
#
1X X
lim cov (a (λj ) , b (λj )) = lim E ys cos (λj s) yt sin (λj t)
n→∞ n→∞ n s=1 t=1
n
σ2 X
= lim cos (λj t) sin (λj t)
n→∞ n
t=1
= 0
It follows that a (λj ) and b (λj ) are asymptotically independent. We conclude that:
2
a2 (λj ) + b2 (λj ) ∼ χ22
σ 2
and:
4π
Iy (λj ) ∼ χ22
σ2
3. We verify that:
fy (λj ) 2
E [Iy (λj )] = E χ2 = fy (λj )
2
and:
fy2 (λj )
var χ22 = fy2 (λj )
var (Iy (λj )) =
4
Since we have:
Pr 0.0506 ≤ χ22 ≤ 7.3778 = 95%
we deduce that:
Iy (λj )
Pr 0.0506 ≤ 2 ≤ 7.3778 = 95%
fy (λj )
Finally, we obtain:
4. If λj = 0, we obtain:
n
σ2 X 1 + 1
lim var (a (0)) = = σ2
n→∞ n t=1 2
and:
var (b (0)) = 0
It follows that:
1
a2 (0) + b2 (0) ∼ χ21
σ 2
and:
2π
Iy (0) ∼ χ21
σ2
−1
For a white noise process, we have fy (0) = (2π) σ 2 . Therefore, we can make the
hypothesis that:
Iy (0)
lim ∼ χ21
n→∞ fy (0)
We notice that:
lim E [Iy (0)] = fy (0) · E χ21 = fy (0)
n→∞
and:
lim var (Iy (0)) = fy2 (0) · var χ21 = 2fy2 (0)
n→∞
Since this is the sum of three independent stationary processes, the stationary form
2
of yt is equal to S (yt ) = (1 − L) yt . We have4 :
2 2 2 2
1 − e−iλ = 1 − e−iλ 1 − e−iλ
2
= (2 (1 − cos λ))
2
= 4 (1 − cos λ)
We conclude that:
2
σζ2 + 2 (1 − cos λ) ση2 + 4 (1 − cos λ) σε2
fS(y) (λ) =
2π
3. In Figure 10.3, we have represented the spectral density functions of Models (M1) and
(M2) when σε = ση = σζ = 1. We observe that they are similar for low frequencies, and
the difference between the two processes comes from the dynamics on high frequencies.
4. µt is the stochastic trend, βt is an AR(1) process that can be viewed as a mean-
reverting component when φ < 0 and γt is a stochastic seasonal process. When σω = 0,
we have:
γt−s+1 + . . . + γt−1 + γt = 0
4 Another way to find this result is to notice that (1 − L)2 = 1 − 2L + L2 . Therefore, we have:
1 − e−iλ 2 2 1 − 2e−iλ + e−iλ 2 2
=
2
= 1 − 2e−iλ + e−2iλ
= |(1 − 2 cos λ + cos 2λ) + i (2 sin λ − sin 2λ)|2
= (1 − 2 cos λ + cos 2λ)2 + (2 sin λ − sin 2λ)2
= 1 − 4 cos λ + 4 cos2 λ + 2 cos 2λ − 4 cos λ cos 2λ + cos2 2λ +
4 sin2 λ − 4 sin λ sin 2λ + sin2 2λ
= 6 − 4 cos λ + 2 cos 2λ − 4 (cos λ cos 2λ + sin λ sin 2λ)
= 6 − 4 cos λ + 2 cos 2λ − 4 cos (λ − 2λ)
= 6 − 8 cos λ + 2 cos 2λ
= 4 − 8 cos λ + 2 (1 + cos 2λ)
= 4 − 8 cos λ + 2 1 + cos2 λ − sin2 λ
= 4 − 8 cos λ + 4 cos2 λ
= 4 (1 − cos λ)2
Statistical Inference and Model Estimation 221
γt = − (γt−s+1 + . . . + γt−1 )
= γt−s
We obtain a deterministic seasonal time series, where s represents the period length
of a season. For example, if s = 4, we obtain:
γt = γt−4 = γt−8 = . . .
γt+1 = γt−3 = γt−7 = . . .
γt+2 = γt−2 = γt−6 = . . .
γt+3 = γt−1 = γt−5 = . . .
The process repeats every four time periods. If σω 6= 0, we have γt−s+1 + . . . + γt−1 +
γt = ωt and γt−s + . . . + γt−2 + γt−1 = ωt−1 . Therefore, we have:
γt = ωt − (γt−s+1 + . . . + γt−1 )
= ωt − (ωt−1 − γt−s )
= γt−s + (ωt − ωt−1 )
We deduce that:
5. We have:
zt = (1 − L) (1 − Ls ) yt
= (1 − Ls ) ηt + (1 − L) (1 − Ls ) βt + (1 − L) (1 − Ls ) εt +
(1 − L) (1 − Ls ) γt
and:
We deduce that:
zt = (1 − Ls ) ηt + (1 − L) (1 − Ls ) βt +
2
(1 − L) (1 − Ls ) εt + (1 − L) ωt
If we assume that |φ| < 1, then βt is stationary. Moreover, we know that ηt , εt and
ωt are stationary. We conclude that zt is stationary and S (yt ) = (1 − L) (1 − Ls ) yt
is a stationary form of yt .
(1 − Ls ) yt = (1 − Ls ) µt + (1 − Ls ) βt + (1 − Ls ) εt + (1 − L) ωt
and:
(1 − Ls ) µt = µt − µt−s
= (µt−1 + ηt ) − µt−s
= ηt + (µt−2 + ηt−1 ) − µt−s
= ηt + ηt−1 + . . . + ηt−s−1
2
= (1 − cos sλ) + sin2 sλ
= 2 (1 − cos sλ)
and:
gλ ((1 − L) (1 − Ls )) = gλ (1 − L) · gλ (1 − Ls )
= 4 (1 − cos λ) (1 − cos sλ)
Statistical Inference and Model Estimation 223
We remind that
−1
1
gλ (1 − φL) = 2
|1 − φe−iλ |
1
= 2
(1 − φ cos λ) + φ2 sin2 λ
1
=
1 − 2φ cos λ + φ2
We deduce that:
(1 − L) (1 − Ls )
2πfS(y) (λ) = gλ (1 − Ls ) ση2 + gλ σζ2 +
1 − φL
2
gλ ((1 − L) (1 − Ls )) σε2 + gλ (1 − L) σω2
= 2 (1 − cos sλ) ση2 +
4 (1 − cos λ) (1 − cos sλ)
σζ2 +
1 − 2φ cos λ + φ2
4 (1 − cos λ) (1 − cos sλ) σε2
4 − 8 cos λ + 4 cos2 λ σω2
gλ ((1 − L) (1 − Ls )) gλ 1 − L − Ls + Ls+1
=
= 4 − 4 cos λ − 4 cos sλ +
2 cos (s − 1) λ + 2 cos (s − 1) λ
1. We have:
s 2
gλ (1 − Ls ) = 1 − e−iλ
2
= 1 − e−isλ
2
= (1 − cos sλ) + sin2 sλ
= 2 (1 − cos sλ)
σε2
fy (λ) =
2πgλ (1 − Ls )
σε2
=
4π (1 − cos (sλ))
2. We have:
σε2
f (λ) = 2
d
2π (1 − e−iλ )
because5 :
λ
2 1 λ λ λ λ
sin = cos − − cos +
2 2 2 2 2 2
1
= (1 − cos λ)
2
3. We have:
−1 −1
zt = (1 − φL) ut + (1 − θL) vt
We deduce that:
σu2 1 − 2θ cos λ + θ2 σu2
fz (λ) = +
2π (1 − 2φ cos λ + φ2 ) 2π
5 We use the following trigonometric identity:
1
sin α sin β = (cos (α − β) − cos (α + β))
2
Statistical Inference and Model Estimation 225
(a) The simulated time series z is represented in the first panel Figure 10.4. In the
second panel, we also give the periodogram of z:
n 2
2
|dz (λj )| 1 X −iλj t
Iz (λj ) = = zt e
2πn 2πn
t=1
u1 u2
C (u1 , u2 ) =
u1 + u2 − u1 u2
We have:
u2 (u1 + u2 − u1 u2 ) − u1 u2 (1 − u2 )
∂1 C (u1 , u2 ) = 2
(u1 + u2 − u1 u2 )
u22
= 2
(u1 + u2 − u1 u2 )
2
c (u1 , u2 ) = ∂1,2 C (u1 , u2 )
2
2u2 (u1 + u2 − u1 u2 ) − 2u22 (u1 + u2 − u1 u2 ) (1 − u1 )
= 4
(u1 + u2 − u1 u2 )
2u1 u2
= 3
(u1 + u2 − u1 u2 )
2. We have:
1 − 2u + C (u, u)
λ+ (u) =
1−u
(1 − 2u) (2 − u) + u
=
(1 − u) (2 − u)
2
2u − 4u + 2
=
u2 − 3u + 2
2u2 − 4u + 2
λ+ = lim
u→1 u2 − 3u + 2
4u − 4
= lim
u→1 2u − 3
= 0
The Gumbel logistic copula has then no upper tail dependence. For the lower tail
227
228 Handbook of Financial Risk Management
dependence, we obtain:
C (u, u)
λ+ = lim
u→0 u
u
= lim
u→0 2u − u2
1
= lim
u→0 2 − 2u
1
=
2
We verify that it has a lower tail dependence.
4. We have:
∂ 2 C (u1 , u2 )
c (u1 , u2 ) =
∂ u1 ∂ u 2
= 1 + θ (1 − 2u1 ) (1 − 2u2 )
It follows that:
We deduce that :
n n
` = n ln λ − ln σ 2 − ln 2π +
2 2
n
X x1,i − µ −λx2,i
ln 1 + θ 1 − 2Φ 2e −1 −
i=1
σ
n 2 n
1 X x1,i − µ X
−λ x2,i
2 i=1 σ i=1
2. We have:
S1 (x1 ) = S (x1 , 0)
= exp (−x1 )
with ũ = − ln u.
1. We have:
It follows that:
ZZ
E [X1 X2 ] = x1 x2 dF (x1 , x2 )
ZZ
= θ× x1 x2 dC− (Φ (x1 ) , Φ (x1 )) +
ZZ
(1 − θ) × x1 x2 dC+ (Φ (x1 ) , Φ (x1 ))
= θ × (−1) + (1 − θ) × (+1)
= 1 − 2θ
We deduce that:
ρ hX1 , X2 i = E [X1 X2 ] = 1 − 2θ
The linear correlation between X1 and X2 is equal to zero when θ takes the value 1/2.
ρ hX1 , X2 i = ρ hµ1 + σ1 N1 , µ2 + σ2 N2 i
= ρ hN1 , N2 i
= 1 − 2θ
3. We have:
1 − ρ hX1 , X2 i
θ=
2
The MM estimator θ̂MM is then equal to:
1 − ρ̂
θ̂MM =
2
where ρ̂ is the empirical correlation between X1 and X2 .
3. We have:
Z 1
E [LGD] = xγxγ−1 dx
0
Z 1
= γ xγ dx
0
1
xγ+1
= γ
γ+1 0
γ
=
γ+1
Let x̄ be the empirical mean of the sample {x1 , . . . , xn }. The MM estimator γ̂MM
satisfies the following equation:
γ̂MM
= x̄
γ̂MM + 1
We deduce that:
x̄
γ̂MM =
1 − x̄
Pn
i=1 xi
= P n
n − i=1 xi
where γ1 and γ2 are the parameters associated to the risk classes C1 and C2 . It follows
that the log-likelihood function is equal to:
n
X n
X
` = n ln γ1 + n ln γ2 + (γ1 − 1) ln xi + (γ2 − 1) ln yi +
i=1 i=1
n
X
ln 1 − θ − θ (γ1 ln xi + γ2 ln yi ) + θ2 γ1 γ2 ln xi ln yi −
i=1
n
X
θγ1 γ2 ln xi ln yi
i=1
Copulas and Dependence 233
with:
n
X θ2 γ2 ln yi − θ ln xi
g1 (γ1 , γ2 , θ) = −
i=1
1 − θ − θ (γ1 ln xi + γ2 ln yi ) + θ2 γ1 γ2 ln xi ln yi
n
X
θγ2 ln xi ln yi
i=1
n
X θ2 γ1 ln xi − θ ln yi
g2 (γ1 , γ2 , θ) = −
i=1
1 − θ − θ (γ1 ln xi + γ2 ln yi ) + θ2 γ1 γ2 ln xi ln yi
n
X
θγ1 ln xi ln yi
i=1
When θ̂ is equal to zero, we have g1 (γ1 , γ2 , 0) = 0. In this case, the estimator γ̂1
corresponds to the ML estimator γ̂ML . When we have θ̂ 6= 0, we obtain g1 (γ1 , γ2 , θ) 6=
0 and γ̂1 6= γ̂ML . We obtain this result because more information is available in
the bivariate case. The ML method can then correct the estimator γ̂ML by taking
into account the dependence function between LGD1 and LGD2 . For instance, if the
estimated copula is equal to the Fréchet upper copula C+ , it is obvious that the two
estimators γ̂1 and γ̂2 are equal, even if the unidimensional ML estimators are not
necessarily equal. Let us consider the following sample:
LGD1 (in %) 50 40 60 50 80 90 70 10 40 40
LGD2 (in %) 60 50 80 70 80 90 80 30 50 70
We obtain γ̂ML = 1.31 for C1 and γ̂ML = 2.18 for C2 . With the bivariate ML method,
we obtain γ̂1 = 0.88, γ̂2 = 1.44 and θ̂ = 1.71.
(i) C hX1 , X2 i = C− if and only if there exists a non-increasing function f such that
we have X2 = f (X1 );
(ii) C hX1 , X2 i = C⊥ if and only if X1 and X2 are independent;
(iii) C hX1 , X2 i = C+ if and only if there exists a non-decreasing function f such
that we have X2 = f (X1 ).
(a) The dependence between τ and LGD is maximum when we have C hτ , LGDi =
C+ . Since we have U1 = U2 , we conclude that:
LGD +e−λτ − 1 = 0
where ρmin hτ , LGDi (resp. ρmax hτ , LGDi) is the linear correlation corresponding
to the copula C− (resp. C+ ). It comes that:
1
E [τ ] = σ (τ ) =
λ
and:
1
E [LGD] =
2
r
1
σ (LGD) =
12
E [τ LGD] = E τ e−λτ
Z ∞
= te−λt λe−λt dt
Z0 ∞
= tλe−2λt dt
0
∞
te−2λt 1 ∞ −2λt
Z
= − + e dt
2 0 2 0
−2λt ∞
1 e
= 0+ −
2 2λ 0
1
=
4λ
We deduce that:
r !
1 1 1 1
ρmin hτ , LGDi = −
4λ 2λ λ 12
√
3
= −
2
Copulas and Dependence 235
E [τ LGD] = E τ 1 − e−λτ
Z ∞
t 1 − e−λt λe−λt dt
=
Z0 ∞ Z ∞
−λt
= tλe dt − tλe−2λt dt
0 0
Z ∞
−λt ∞
−λt 1
= −te 0
+ e dt −
0 4λ
−λt ∞
e 1
= 0+ − −
λ 0 4λ
3
=
4λ
We deduce that:
r !
3 1 1 1
ρmax hτ , LGDi = −
4λ 2λ λ 12
√
3
=
2
We finally obtain the following result:
√
3
|ρ hτ , LGDi| ≤
2
(c) We notice that |ρ hτ , LGDi| is lower than 86.6%, implying that the bounds −1
and +1 can not be reached.
3. (a) If the copula function of (τ1 , τ2 ) is the Fréchet upper bound copula, τ1 and τ2
are comonotone. We deduce that:
U1 = U2 ⇐⇒ 1 − e−λ1 τ1 = 1 − e−λ2 τ2
and:
λ2
τ1 = τ2
λ1
(b) We have U1 = 1 − U2 . It follows that S1 (τ1 ) = 1 − S2 (τ2 ). We deduce that:
e−λ1 τ1 = 1 − e−λ2 τ2
and:
− ln 1 − e−λ2 τ2
τ1 =
λ1
There exists then a function f such that τ1 = f (τ2 ) with:
− ln 1 − e−λ2 t
f (t) =
λ1
(c) Using Question 2(b), we known that ρ ∈ [ρmin , ρmax ] where ρmin and ρmax are
the correlations of (τ1 , τ2 ) when the copula function is respectively C− and C+ .
236 Handbook of Financial Risk Management
We also know that ρ = 1 (resp. ρ = −1) if there exists a linear and increasing
(resp. decreasing) function f such that τ1 = f (τ2 ). When the copula is C+ , we
have f (t) = λλ12 t and f 0 (t) = λλ21 > 0. As it is a linear and increasing function,
we deduce that ρmax = 1. When the copula is C− , we have:
− ln 1 − e−λ2 t
f (t) =
λ1
and:
λ2 e−λ2 t ln 1 − e−λ2 t
0
f (t) = − <0
λ1 (1 − e−λ2 t )
The function f (t) is decreasing, but it is not linear. We deduce that ρmin 6= −1
and:
−1 < ρ ≤ 1
(d) When the copula is C− , we know that there exists a decreasing function f such
that X2 = f (X1 ). We also know that the linear correlation reaches the lower
bound −1 if the function f is linear:
X2 = a + bX1
This implies that b < 0. When X1 takes the value +∞, we obtain:
X2 = a + b × ∞
As the lower bound of X2 is equal to zero 0, we deduce that a = +∞. This
means that the function f (x) = a + bx does not exist. We conclude that the
lower bound ρ = −1 can not be reached.
4. (a) X1 + X2 is a Gaussian random variable because it is a linear combination of the
Gaussian random vector (X1 , X2 ). We have:
E [X1 + X2 ] = µ1 + µ2
and:
var (X1 + X2 ) = σ12 + 2ρσ1 σ2 + σ22
We deduce that:
X1 + X2 ∼ N µ1 + µ2 , σ12 + 2ρσ1 σ2 + σ22
(b) We have:
cov (Y1 , Y2 ) = E [Y1 Y2 ] − E [Y2 ] E [Y2 ]
= E eX1 +X2 − E [Y2 ] E [Y2 ]
(c) We have:
1 2 1 2
eµ1 + 2 σ1 eµ2 + 2 σ2 (eρσ1 σ2 − 1)
ρ hY1 , Y2 i = q q
2 2 2 2
e2µ1 +σ1 eσ1 − 1 e2µ2 +σ2 eσ2 − 1
eρσ1 σ2 − 1
= p 2 p 2
eσ1 − 1 eσ2 − 1
ρ hY1 , Y2 i = 1 ⇐⇒ ρ = 1 and σ1 = σ2
The lower bound of ρ hY1 , Y2 i is reached if ρ is equal to −1. In this case, we have:
e−σ1 σ2 − 1
ρ hY1 , Y2 i = p 2
p 2 > −1
eσ1 − 1 eσ2 − 1
It follows that ρ hY1 , Y2 i =
6 −1.
(e) It is evident that:
eρσ1 σ2 t − 1
ρ hS1 (t) , S2 (t)i = p 2
p 2
eσ1 t − 1 eσ2 t − 1
In the case σ1 = σ2 and ρ = 1, we have ρ hS1 (t) , S2 (t)i = 1. Otherwise, we
obtain:
lim ρ hS1 (t) , S2 (t)i = 0
t→∞
(f) In the case of lognormal random variables, the linear correlation does not neces-
sarily range between −1 and +1.
F1 (x1 ) = Pr {X1 ≤ x1 }
= Pr {X1 ≤ x1 , X2 ≤ ∞}
= F (x1 , ∞)
We deduce that:
−α −α
θ 1 + x1 θ2 + ∞
F1 (x1 ) = 1− − +
θ1 θ2
−α
θ 1 + x1 θ2 + ∞
+ −1
θ1 θ2
−α
θ 1 + x1
= 1−
θ1
It follows that:
−α
θ 1 + x1
1− = u1
θ1
−α
θ 1 + x1
⇔ = 1 − u1
θ1
θ 1 + x1 −1/α
⇔ = (1 − u1 )
θ1
We deduce that:
C (u1 , u2 ) = 1 − (1 − u1 ) − (1 − u2 ) +
−α
−1/α −1/α
(1 − u1 ) + (1 − u2 ) −1
−α
−1/α −1/α
= u1 + u2 − 1 + (1 − u1 ) + (1 − u2 ) −1
3. We have:
∂ C (u1 , u2 ) −α−1
−1/α −1/α
= 1 − α (1 − u1 ) + (1 − u2 ) −1 ×
∂ u1
1 −1/α−1
− (1 − u1 ) × (−1)
α
−α−1
−1/α −1/α
= 1 − (1 − u1 ) + (1 − u2 ) −1 ×
−1/α−1
(1 − u1 )
∂ 2 C (u1 , u2 )
c (u1 , u2 ) =
∂ u1 ∂ u2
−α−2
−1/α −1/α
= − (−α − 1) (1 − u1 ) + (1 − u2 ) −1 ×
1 −1/α−1 −1/α−1
− (1 − u2 ) × (−1) × (1 − u1 )
α
−α−2
α+1 −1/α −1/α
= (1 − u1 ) + (1 − u2 ) −1 ×
α
−1/α−1
(1 − u1 − u2 + u1 u2 )
In Figure 11.2, we have reported the density of the Pareto copula when α is equal to
1 and 10.
α+1
c (u1 , u2 ) = ((1 − u1 ) (1 − u2 ))1/α ×
α
−α−2
(1 − u1 )1/α + (1 − u2 )1/α − (1 − u1 )1/α (1 − u2 )1/α
Copulas and Dependence 239
4. We have:
C (u, u)
λ− = lim+
u→0 u
∂ C (u, u)
= 2 lim+
u→0 ∂ u1
−α−1
−1/α −1/α −1/α−1
= 2 lim+ 1 − (1 − u) + (1 − u) −1 (1 − u)
u→0
= 2 lim+ (1 − 1)
u→0
=0
and:
1 − 2u + C (u, u)
λ+ = lim−
u→1 1−u
−α
−1/α −1/α
(1 − u) + (1 − u) −1
= lim
u→1− 1−u
−α
1/α
= lim 1 + 1 − (1 − u)
u→1−
−α
= 2
The tail dependence coefficients λ− and λ+ are given with respect to the parameter
α in Figure 11.2. We deduce that the bivariate Pareto copula function has no lower
tail dependence (λ− = 0), but an upper tail dependence (λ+ = 2−α ).
5. The bivariate Pareto copula family cannot reach C− because λ− is never equal to 1.
240 Handbook of Financial Risk Management
We notice that:
lim λ+ = 0
α→∞
and
lim λ+ = 1
α→0
This implies that the bivariate Pareto copula may reach C⊥ and C+ for these two
limit cases: α → ∞ and α → 0. In fact, α → 0 does not correspond to the copula C+
because λ− is always equal to 0.
6. (a) We note U1 = F1 (X1 ) and U2 = F2 (X2 ). X1 and X2 are comonotonic if and
only if:
U2 = U1
We deduce that:
−α2 −α1
θ2 + X2 θ1 + X1
1− =1−
θ2 θ1
−α2 −α1
θ2 + X2 θ1 + X1
⇔ =
θ2 θ1
α1 /α2 !
θ1 + X1
⇔ X2 = θ2 −1
θ1
U2 = 1 − U1
We deduce that:
−α2 −α1
θ2 + X2 θ1 + X1
=1−
θ2 θ1
−α2 −α1
θ2 + X2 θ1 + X1
⇔ =1−
θ2 θ1
−α1 !1/α2
θ 1 + X 1
⇔ X2 = θ2 1 − − 1
θ1
4. We have:
Xi:8
Sample
1 2 3 4 5 6 7 8
1 0.04 0.14 0.24 0.34 0.45 0.55 0.72 0.94
2 0.12 0.25 0.31 0.32 0.57 0.64 0.69 0.97
3 0.11 0.17 0.17 0.26 0.50 0.50 0.69 0.85
4 0.00 0.03 0.15 0.53 0.58 0.77 0.98 0.98
5 0.15 0.25 0.46 0.62 0.65 0.74 0.85 0.89
6 0.05 0.07 0.15 0.25 0.65 0.74 0.86 0.93
7 0.12 0.16 0.33 0.34 0.55 0.61 0.63 0.95
8 0.01 0.11 0.14 0.47 0.57 0.82 0.87 0.96
9 0.27 0.55 0.57 0.68 0.73 0.78 0.83 0.85
10 0.28 0.40 0.68 0.89 0.91 0.94 0.99 0.99
The empirical and theoretical mean and standard deviation of Xi:8 are reported in
Table 12.1.
243
244 Handbook of Financial Risk Management
TABLE 12.1: Empirical and theoretical mean and standard deviation of Xi:8
i X̄i:8 E [Xi:n ] σ̂ (Xi:n ) σ (Xi:n )
1 0.1150 0.1111 0.0981 0.0994
2 0.2130 0.2222 0.1584 0.1315
3 0.3200 0.3333 0.1918 0.1491
4 0.4700 0.4444 0.2096 0.1571
5 0.6160 0.5556 0.1302 0.1571
6 0.7090 0.6667 0.1333 0.1491
7 0.8110 0.7778 0.1241 0.1315
8 0.9310 0.8889 0.0511 0.0994
5. We reiterate that Xi:n ∼ B (i, n − i + 1). We deduce that the median statistic follows
a symmetric Beta distribution:
Xk+1:n ∼ B (k + 1, k + 1)
Moreover, we have:
Xi:n ∼ B (i, 2k − i)
3. The return period is the average period between two consecutive events. It is equal
to:
n
T =
p
where p is the occurrence probability of the event and n is the unit period measured
in days. We have:
1
T F−1
n:n (α) = ×n
1−α
We deduce that the return periods are respectively equal to 100, 100, 500 and 2 200
days.
4. We would like to find the value α that satisfies the following equation:
T F−1 −1
20:20 (α) = T F (99.9%)
We have:
1 1
× 20 = ×1
1−α 1 − 0.999
We deduce that:
α = 1 − 20 × 0.001 = 98%
This implies that the survival function does not depend on the initial time. This
Markov property is especially useful in credit models, because the default time of the
counterparty does not on the past history, for instance the age of the company.
246 Handbook of Financial Risk Management
2. We have:
n \ \ o
Pr {min (τ1 , . . . , τn ) ≥ t} = Pr τ1 ≥ t . . . τn ≥ t
n
Y
= Pr {τi ≥ t}
i=1
n
!
X
= exp − λi t
i=1
and:
n \ \ o
Pr {max (τ1 , . . . , τn ) ≤ t} = Pr τ1 ≤ t . . . τn ≤ t
n
Y
= Pr {τi ≤ t}
i=1
Yn
1 − e−λi t
=
i=1
We deduce that: !
n
X
min (τ1 , . . . , τn ) ∼ E λi
i=1
−λ1 t1
1 − e−λ2 t1 dt1
= λ1 e
Z0 ∞ Z ∞
= λ1 e−λ1 t1 dt1 − λ1 e−(λ1 +λ2 )t1 dt1
0 0
λ1
= 1−
λ1 + λ2
λ2
=
λ1 + λ2
We can generalize this result to the case n > 2 and we finally obtain:
λi
Pr {min (τ1 , . . . , τn ) = τi } = Pn
j=1 λj
λ1
τi = τ1
λi
Extreme Value Theory 247
and:
λ1
Pr {max (τ1 , . . . , τn ) ≤ t} = Pr τ1 ≤ t
λ−
λ−
= 1 − exp −λ1 t
λ1
= 1 − exp −λ− t
We finally obtain:
min (τ1 , . . . , τn ) ∼ E λ+
and:
max (τ1 , . . . , τn ) ∼ E λ−
However, the EV property does not hold for the Fréchet lower bound copula C− :
t
C− ut1 , ut2 = max ut1 + ut2 − 1, 0 6= max (u1 + u2 − 1, 0)
248 Handbook of Financial Risk Management
C− 0.52 , 0.82
= max (0.25 + 0.64 − 1, 0)
= 0
6= 0.32
3. We have:
h
θ θ i1/θ
C ut1 , ut2 exp − − ln ut1 + − ln ut2
=
h i1/θ
θ θ
= exp − (−t ln u1 ) + (−t ln u2 )
h i1/θ
θ θ
= exp −t (− ln u1 ) + (− ln u2 )
θ 1/θ t
+(− ln u2 )θ ]
= e−[(− ln u1 )
= Ct (u1 , u2 )
1 − 2u + C (u1 , u2 )
λ = lim+
u→1 1−u
It measures the probability to have an extreme in one direction knowing that we have
already an extreme in the other direction. If λ is equal to 0, extremes are independent
and the EV copula is the product copula C⊥ . If λ is equal to 1, extremes are comono-
tonic and the EV copula is the Fréchet upper bound copula C+ . Moreover, the upper
tail dependence of the copula between the random variables is equal to the upper tail
dependence of the copula between the extremes.
= 2 − 21/θ
6. (a) We have:
t(1−θ1 ) t(1−θ2 )
C ut1 , ut2 min utθ tθ2
= u1 u2 1 , u2
1
t t t
= u11−θ1 u1−θ
2
2
min uθ11 , uθ22
t
= u11−θ1 u1−θ
2
2
min uθ11 , uθ22
= Ct (u1 , u2 )
where G1 and G2 are the two univariate EV probability distributions and C?hX1 ,X2 i
is the EV copula associated to ChX1 ,X2 i .
(b) We have:
x2
G (x1 , x2 ) = Λ (x1 ) Φα 1 +
α
−x1
x2 −α
= exp −e − 1+
α
(c) We have:
x2
G (x1 , x2 ) = Ψ1 (x1 − 1) Φα 1 +
α
x2 −α
= exp x1 − 1 − 1 +
α
2. We know that the upper tail dependence is equal to zero for the Normal copula when
ρ < 1. We deduce that the EV copula is the product copula. We then obtain the same
results as previously.
3. When the parameter ρ is equal to 1, the Normal copula is the Fréchet upper bound
copula C+ , which is an EV copula. We deduce the following results:
G (x1 , x2 ) = min (Λ (x1 ) , Ψ1 (x2 − 1))
= min exp −e−x1 , exp (x2 − 1)
(a)
x2
G (x1 , x2 ) = min Λ (x1 ) , Φα 1 +
α
−x1
x2 −α
= min exp −e , exp − 1 + (b)
α
x2
G (x1 , x2 ) = min Ψ1 (x1 − 1) , Φα 1 +
α
x2 −α
= min exp (x2 − 1) , exp − 1 + (c)
α
4. In the previous exercise, we have shown that the Gumbel-Houggard copula is an EV
copula.
(a) We deduce that:
θ θ 1/θ
G (x1 , x2 ) = e−[(− ln Λ(x1 )) +(− ln Ψ1 (x2 −1)) ]
h i1/θ
θ
= exp − e−θx1 + (1 − x2 )
(b) We obtain:
θ 1/θ
x2
− (− ln Λ(x1 ))θ +(− ln Φα (1+ ))
G (x1 , x2 ) = e α
1/θ !
−θx1
x2 −αθ
= exp − e + 1+
α
(c) We have:
θ 1/θ
x2
− (− ln Ψ1 (x1 −1))θ +(− ln Φα (1+ ))
G (x1 , x2 ) = e α
1/θ !
θ
x2 −αθ
= exp − (1 − x1 ) + 1 +
α
Chapter 13
Monte Carlo Simulation Methods
(a) We have seen that the quantile function of the distribution function GEV (µ, σ, ξ)
has the following expression:
σ −ξ
G−1 (α) = µ − 1 − (− ln α)
ξ
It follows that:
σ −ξ
xi ← µ − 1 − (− ln ui )
ξ
(b) The cumulative density function of the log-normal distribution LN µ, σ 2 is
equal to:
ln x − µ
F (x) = Φ
σ
We deduce that:
F−1 (u) = exp µ + σΦ−1 (u)
(c) We have:
1
F (x) = −β
1 + (x/α)
and:
1/β
−1 u
F (u) = α
1−u
To simulate a log-logistic random variate LL (α, β), we use the following trans-
formation:
1/β
ui
xi ← α
1 − ui
251
252 Handbook of Financial Risk Management
(b) We have:
FL (x) = Pr {X ≤ x | X ≥ H}
Pr {X ≤ x, X ≥ H}
=
Pr {X ≥ H}
FX (x) − FX (H)
=
1 − FX (H)
(c) We have:
FX (x) − FX (H)
FL (x) = u ⇔ =u
1 − FX (H)
⇔ FX (x) = u + FX (H) (1 − u)
⇔ x = F−1
X (u + FX (H) (1 − u))
It follows that:
−1
FL (u) = F−1
X (u + FX (H) (1 − u))
li ← F−1
X (ui + FX (H) (1 − ui ))
(d) Concerning the first algorithm, we simulate nX values of X, but we only kept on
average nL = nX (1 − FX (H)) values of L, meaning that the acceptance ratio
is equal to 1 − FX (H). For the second algorithm, all the simulated values of ui
are kept. For instance, if FX (H) is equal to 90% and we would like to simulate
one million of random numbers for L, we have to simulate approximatively 10
millions of random numbers in the first algorithm, that is 10 more times than
for the second algorithm. In this case, the acceptance ratio is only equal to 10%.
(e) When X follows a log-normal distribution LN µ, σ 2 , Algorithm (a) becomes:
In Figure 13.1, we have represented the random numbers li generated with the
two algorithms. We observe that only 4 simulated values are higher than H in the
case of Algorithm (a). With Algorithm (c), all the simulated values are higher
than H and it is easier to simulate a random loss located in the distribution tail.
and:
xn:n = max (x1 , . . . , xn )
(b) We have:
n
F1:n (x) = 1 − (1 − F (x))
Monte Carlo Simulation Methods 253
and:
1/n
F−1
1:n (u) = F
−1
1 − (1 − u)
We deduce that a simulated value x−
i of X1:n is given by:
1/n
x−
i ← F −1
1 − (1 − u i )
n
For the maximum order statistic Xn:n , we have F1:n (x) = F (x) and:
−1 1/n
x+i ← F ui
(c) In Figure 13.2, we report 1 000 simulated values of X1:50 and X50:50 when Xi ∼
N (0, 1).
It follows that Y ∼ G (α, β). To simulate X, we draw a gamma random variate Y and
set X = 1/Y .
2. (a) The density function of X ∼ G (α, β) is equal to:
β α xα−1 e−βx
f (x) =
Γ (α)
In the case α = 1, we obtain:
f (x) = βe−βx
This is the density function of E (β). To simulate X, we apply the following
transformation:
ln u
x←−
β
where u is a uniform random number.
(b) We know that:
Xn
G (n, β) = G (1, β)
j=1
We deduce that:
n
X
G (n, β) = Ei
i=1
where Ei ∼ E (β) are iid exponential random variables. We deduce that the
probability distribution G (n, β) can be simulated by:
n
1X
x←− ln ui
β i=1
Monte Carlo Simulation Methods 255
or: !
n
1 Y
x ← − ln ui
β i=1
We note:
Y
X=
Y +Z
and:
S =Y +Z
It follows that Y = XS and Z = (1 − X) S. The Jacobian of (y, z) = ϕ (x, s) is
then equal to:
s x
Jϕ =
−s 1 − x
Since we have det Jϕ = s, we deduce that:
It follows that the random variables X and S are independent, X ∼ B (α, β) and
S ∼ G (α + β, δ).
(b) To simulate a beta-distributed random variate, we consider the following trans-
formation:
y
x←
y+z
where y and z are two independent random variates from G (α, δ) and G (β, δ).
Since R and Θ are independent, we have fR,Θ (r, θ) = fR (r) fΘ (θ). Moreover, Θ
is a uniform random variable and we have:
1
fΘ (θ) =
2π
We deduce that:
fR (r)
fX,Y (x, y) =
2πr
We also notice that:
X2 + Y 2 = R2 cos2 Θ + R2 sin2 Θ
= R2
√
(b) We assume that R = 2E where E ∼ E (1).
i. We have:
n√ o
FR (r) = Pr 2E ≤ r
r2
= Pr E ≤
2
2
= 1 − e−r /2
We deduce that:
fR (r) = ∂r FR (r)
2
= re−r /2
ii. We have:
p
Z ∞ fR x2 + y 2
fX (x) = p dy
−∞ 2π x2 + y 2
Z ∞ −(x2 +y2 )/2
e
= dy
−∞ 2π
2 2
e−x /2 ∞ e−y /2
Z
= √ √ dy
2π −∞ 2π
2
e−x /2
= √
2π
= φ (x)
Monte Carlo Simulation Methods 257
We obtain:
0 −ν/2−1 √
x2 1
ν + x2
Z
1
fX (x) = − 1+ √ du
1 2π ν u u2 u−1 − 1
Z 1 −ν/2−1 √
x2 1
1 ν + x2
= 1+ √ du
0 2π ν u u2 u−1 − 1
√ −(ν+1)/2 Z 1
ν x2 −1/2
= 1+ u(ν−1)/2 (1 − u) du
2π ν 0
√ −(ν+1)/2
x2
ν+1 1 ν
= B , 1+
2 2 2π ν
We have:
√ ν+1 √
Γ 12
ν+1 1 ν Γ 2 ν
B , =
Γ ν2 + 1
2 2 2π 2π
√ √
Γ ν+1
2 π ν
= ν ν
2Γ 2
2π
ν+1
Γ 2
= √
πνΓ ν2
We deduce that the random variate ri can be simulated using the inversion
method: r
−2/ν
ri ← ν (1 − ui ) −1
f (x)
h (x) =
g (x)
β−1
xα−1 (1 − x)
=
B (α, β)
We deduce that:
β−1 β−2
(α − 1) xα−2 (1 − x) + (β − 1) xα−1 (1 − x)
h0 (x) =
B (α, β)
β−2
xα−2 (1 − x)
= ((α − 1) (1 − x) + (β − 1) x)
B (α, β)
and:
h0 (x) = 0 ⇔ (α − 1) (1 − x) + (β − 1) x = 0
α−1
⇔ x? =
α+β−2
We deduce that:
α−1 β−1
Γ (α + β) (α − 1) (β − 1)
c= α+β−2
Γ (α) Γ (β) (α + β − 2)
(b) We have reported the functions f (x) and cg (x) in Figure 13.3. c takes the value
1.27, 1.78, 8.00 and 2.76. The acceptance ratio is minimum in the third case
when α = 1 and β = 8. In fact, it corresponds to the worst situation for the
acceptance-rejection algorithm. Indeed, when one parameter is equal to 1, we
obtain:
β−1
Γ (1 + β) (β − 1)
c= β−1
=β
Γ (1) Γ (β) (β − 1)
The acceptance ratio p tends to zero when the second parameter tends to infinity:
1
lim p = lim =0
β→∞ β→∞ c
f (x)
h (x) =
g (x)
β−1
(1 − x)
=
αB (α, β)
Its maximum is reached at point x? = 0. We deduce that:
1
c=
αB (α, β)
x ← u1/α
3. (a) We have: Z x
1 −|t|
G (x) = e dt
−∞ 2
If x ≤ 0, we obtain:
Z x
1 t
G (x) = e dt
−∞ 2
1 x
= e
2
1 1
= − (1 − ex )
2 2
If x > 0, we obtain:
Z x
1 0 1 −t
G (x) = e + e dt
2 0 2
1 1
= + (1 − ex )
2 2
We deduce that:
1 1
+ sign (x) 1 − e−x
G (x) =
2 2
and:
−1 1 1
G (u) = − sign u − ln 1 − 2 u −
2 2
To simulate the Laplace distribution, we consider the following transformation:
1 1
x ← − sign u − ln 1 − 2 u −
2 2
f (x)
h (x) =
g (x)
r
2 −0.5x2 +|x|
= e
π
We have:
− (x + 1) h (x) if x < 0
h0 (x) =
− (x − 1) h (x) if x ≥ 0
There are two maxima: x? = ±1. We deduce that:
f (x)
h (x) =
g (x)
π 1 + x2 α−1 −x
= x e
Γ (α)
π
xα−1 + xα+1 e−x
=
Γ (α)
π (α−1) ln x
= e + e(α+1) ln x e−x
Γ (α)
We deduce that:
π (α+1) ln x
h (x) ≤ e + e(α+1) ln x e−x
Γ (α)
2π (α+1) ln x −x
= e e
Γ (α)
2π α+1 −x
= x e
Γ (α)
Monte Carlo Simulation Methods 263
We have: 0
xα+1 e−x = ((α + 1) − x) xα e−x
The maximum is reached at the point x? = α + 1. We deduce that:
2π α+1 −(α+1)
c= (α + 1) e
Γ (α)
(b) We have:
−3/2
Γ (3/2) x2
g (x) = √ 1+
Γ (1) 2π 2
−3/2
x2
1
= √ 1+
2 2 2
2 −3/2
= 2+x
and:
Z x −3/2
G (x) = 2 + t2 dt
−∞
x
t
= √
2 2 + t2 −∞
1 x
= 1+ √
2 2 + x2
We calculate the inverse function G−1 (u):
x2
1 x 2
1+ √ =u ⇔ 2
= (2u − 1)
2 2+x 2 2 + x
2 2
⇔ x2 = 2 (2u − 1) + x2 (2u − 1)
2 2
⇔ x2 = 2 (2u − 1) + x2 (2u − 1)
2
2 (2u − 1)
⇔ x2 =
(4u2 − 4u)
√
2 (u − 0.5)
⇔ G−1 (u) = √
u2 − u
It follows that we can simulate the Student t distribution with 2 degrees of
freedom by using the following transformation:
√
2 (u − 0.5)
x← √
u2 − u
(c) In Figure 13.5, we show the acceptance ratio p = 1/c for the two algorithms. It is
obvious that algorithm (b) dominates algorithm (a). In particular, the acceptance
ratio tends to 0 when α tends to infinity when we use the Cauchy distribution
as the proposal distribution.
5. (a) We have:
p (k)
c = sup
q (k)
= K × max p (k)
264 Handbook of Financial Risk Management
(b) We obtain c = 5 × 40% = 2. Therefore, the acceptance ratio is equal to 50% and
we reject one simulation in two. This is confirmed by Figure 13.6, which shows
the number of accepted and rejected values. However, the acceptance ratio is not
the same for each states. For instance, it is equal to 100% for the state, which
has the highest probability, but it can be low for states with small probabilities.
In our experiment, we obtain the following results:
where fA (k) and fR (k) are the frequencies of accepted and rejected values, and
fA? (k) and fR? (k) are the normalized frequencies. We have rejected 49.6% of
simulated values on average. Among these rejected values, 32.5% comes from the
first state, 17.1% from the second state, etc. We also verify that the empirical
frequencies fA? (k) are close to the theoretical probabilities p (k).
Monte Carlo Simulation Methods 265
4. We have:
e−θu1 e−θu2 − 1
C2|1 (u2 | u1 ) = ∂1 C (u1 , u2 ) = −θ
(e − 1) + (e−θu1 − 1) (e−θu2 − 1)
We deduce that:
C2|1 (u2 | u1 ) = v
e−θu1 e−θu2 − e−θu1 = ve−θ − ve−θu1 + v e−θu1 − 1 e−θu2
⇔
e−θu2 (1 − v) e−θu1 + v = (1 − v) e−θu1 + ve−θ
⇔
!
1 v e−θ − 1
⇔ u2 = − ln 1 +
θ v + (1 − v) e−θu1
5. We have:
ϕ (u) = v
1 − θ (1 − u)
⇔ ln =v
u
⇔ 1 − θ (1 − u) = uev
1−θ
⇔ ϕ−1 (v) = u = v
e −θ
It follows that:
1−θ
ϕ−1 (ϕ (u1 ) + ϕ (u2 )) =
1−θ(1−u1 )
exp ln u1 + ln 1−θ(1−u
u2
2)
−θ
(1 − θ) u1 u2
=
(1 − θ (1 − u1 )) (1 − θ (1 − u2 )) − θu1 u2
The denominator is equal to:
D = (1 − θ (1 − u1 )) (1 − θ (1 − u2 )) − θu1 u2
= 1 − θ (1 − u1 ) − θ (1 − u2 ) + θ2 (1 − u1 ) (1 − u2 ) − θu1 u2
= 1 − 2θ + θu1 + θu2 − θu1 u2 + θ2 (1 − u1 ) (1 − u2 )
= (1 − θ) − (1 − θ) θ (1 − u1 ) (1 − u2 )
= (1 − θ) (1 − θ (1 − u1 ) (1 − u2 ))
Monte Carlo Simulation Methods 267
We finally obtain:
u1 u2
ϕ−1 (ϕ (u1 ) + ϕ (u2 )) =
1 − θ (1 − u1 ) (1 − u2 )
The conditional copula is given by:
C2|1 (u2 | u1 ) = ∂1 C (u1 , u2 )
u2 (1 − θ (1 − u1 ) (1 − u2 )) − θu1 u2 (1 − u2 )
= 2
(1 − θ (1 − u1 ) (1 − u2 ))
(1 − θ) u2 + θu22
= 2
(1 − θ (1 − u1 ) (1 − u2 ))
(1 − θ) u2 + θu22
= 2
(1 − θ + θu1 + θu2 (1 − u1 ))
To find the inverse conditional copula C−1
2|1 , we have to solve the equation
C2|1 (u2 | u1 ) = v. It follows that:
2
(1 − θ) u2 + θu22 = v (1 − θ + θu1 + θu2 (1 − u1 ))
or:
2
(1 − θ) u2 + θu22 = v (1 − θ + θu1 ) +
2θvu2 (1 − θ + θu1 ) (1 − u1 ) +
2
vθ2 u22 (1 − u1 )
We obtain:
aθ (v, u1 ) u22 + bθ (v, u1 ) u2 + cθ (v, u1 ) = 0
where:
2
aθ (v, u1 ) = vθ2 (1 − u1 ) − θ
bθ (v, u1 ) = 2θv (1 − θ + θu1 ) (1 − u1 ) − (1 − θ) ≤ 0
2
cθ (v, u1 ) = v (1 − θ + θu1 ) ≥ 0
We deduce that the solution is equal to:
p
−bθ (v, u1 ) − b2θ (v, u1 ) − 4aθ (v, u1 ) cθ (v, u1 )
u2 = Ψθ (v, u1 ) =
2aθ (v, u1 )
Finally, we obtain the following simulation algorithm:
u 1 = v1
u2 = Ψθ (v2 , v1 )
6. Using the previous algorithms, we obtain the following simulated random vectors:
We have:
µt = E [T ]
= µy + Σyx Σ−1 ?
xx (x − µx )
and:
Σtt = cov (T )
= Σyy − Σyx Σ−1
xx Σxy
It follows that:
T ∼ N µy + Σyx Σ−1 ? −1
xx (x − µx ) , Σyy − Σyx Σxx Σxy
T = µy + Σyx Σ−1 ?
xx (x − µx ) + Ptt U
where U ∼ N (0, I). We deduce the following algorithm to simulate the random vector
T:
(a) We simulate the vector u = u1 , . . . , uny of independent Gaussian random vari-
ates N (0, 1);
(b) We calculate Ptt the Cholesky decomposition of Σyy − Σyx Σ−1
xx Σxy ;
(c) The simulation of the random vector T is given by:
t ← µy + Σyx Σ−1 ?
xx (x − µx ) + Ptt u
2. We have:
= E Y − Σyx Σ−1 ?
E T̃ xx (X − x )
= E [Y ] − Σyx Σ−1 ?
xx (E [X] − x )
= µy − Σyx Σ−1 ?
xx (µx − x )
We deduce that:
T̃ − E T̃ = (Y − µy ) − Σyx Σ−1
xx (X − µx )
and:
h i
>
cov T̃ = E (Y − µy ) (Y − µy ) +
h i
>
Σyx Σ−1
xx E (X − µx ) (X − µx ) Σ−1 >
xx Σyx −
h i
>
2E (Y − µy ) (X − µx ) Σ−1 >
xx Σyx
T̃ ∼ N µy + Σyx Σ−1 ? −1
xx (x − µx ) , Σyy − Σyx Σxx Σxy
(a) We simulate the vector u = (u1 , . . . , unz ) of independent Gaussian random vari-
ates N (0, 1);
(b) We calculate Pzz the Cholesky decomposition of Σzz ;
(c) We simulate the random vector Z:
z ← µz + Pzz u
(d) We set x = (z1 , . . . , znx ) and y = znx +1 , . . . , znx +ny .
(e) The simulation of the random vector T is given by:
t ← y − Σyx Σ−1 ?
xx (x − x )
zi ← µi + Σi,1:i−1 Σ−1
1:i−1,1:i−1 (z1:i−1 − µ1:i−1 ) +
q
Σi,i − Σi,1:i−1 Σ−1
1:i−1,1:i−1 Σ1:i−1,i ui
with: p
z1 ← µ1 + Σ1,1 u1
We verify that:
PP> =
1 p 0 1 p ρ
ρ 1 − ρ2 0 1 − ρ2
1 ρ
=
ρ 1
We deduce that:
X1 1 p 0 N1
=
X2 ρ 1 − ρ2 N2
270 Handbook of Financial Risk Management
where N1 and N2 are two independent standardized Gaussian random variables. Let
n1 and n2 be two independent random variates, whose probability distribution is
N (0, 1). Using the Cholesky decomposition, we deduce that can simulate X in the
following way:
x1 ← n1 p
x2 ← ρn1 + 1 − ρ2 n2
2. We have
C hX1 , X2 i = C hΦ (X1 ) , Φ (X2 )i
= C hU1 , U2 i
because the function Φ (x) is non-decreasing. The copula of U = (U1 , U2 ) is then the
copula of X = (X1 , X2 ).
3. We deduce that we can simulate U with the following algorithm:
(
u1 ← Φ (x1 ) = Φ (n
1)
p
u2 ← Φ (x2 ) = Φ ρn1 + 1 − ρ2 n2
6. We have:
C2|1 (u2 | u1 ) = ∂u1 C (u1 , u2 )
!
Φ−1 (u2 ) − ρΦ−1 (u1 )
= Φ p
1 − ρ2
Let v1 and v2 be two independent uniform random variates. The simulation algorithm
corresponds to the following steps:
u1 = v1
C2|1 (u1 , u2 ) = v2
We deduce that:
(
u1 ← v1
p
u2 ← Φ ρΦ−1 (v1 ) + 1 − ρ2 Φ−1 (v2 )
Because this ratio is lower than 5%, we conclude that one million of simulations is
sufficient even if α is equal to 99.9%.
2. The results become:
h i
α E CaR
d 2 (α) σ CaR
d 2 (α) IC95% CaR
d 2 (α)
4. In Figure 13.8, we have reported the capital-at-risk calculated with the Normal copula
and the Gaussian approximation defined as:
r 2 2
CaR (α) = S̄1 + S̄2 +
d d 1 (α) − S̄1 + CaR
CaR d 2 (α) − S̄2 + . . .
d 1 (α) − S̄1 CaR
. . . + 2ρ CaR d 2 (α) − S̄2
We deduce that:
W (s) 0 s s s
W (t) ∼ N 0 , s t t
W (u) 0 s t u
We note:
B (t) = {W (t) | W (s) = ws , W (u) = wu }
We know that the conditional distribution of W (t) given that W (s) = ws and W (u) =
wu is Gaussian with:
−1
s s
ws 0
E [B (t)] = 0+ s t −
s u wu 0
u−t t−s
= ws + wu
u−s u−s
Monte Carlo Simulation Methods 275
and:
−1
s s s
var (B (t)) = t− s t
s u t
(t − s) (u − t)
=
u−s
3. We deduce that:
r
u−t t−s (t − s) (u − t)
B (t) = ws + wu + ε
u−s u−s u−s
where ε is a standard Gaussian random variable. To simulate B (t), we then use the
iterative algorithm based on filling the path and moving the starting point (s, B (s))
at each iteration.
E [p̂MC ] = E [ϕ (X)]
Z ∞
= 1 {x ≥ c} φ (x) dx
−∞
Z ∞
= φ (x) dx
c
= 1 − Φ (c)
= p
Recall that var (p̂MC ) = E p̂2MC − E2 [p̂MC ]. We have1 :
Z ∞
E p̂2MC = ϕ2 (x) φ (x) dx
−∞
Z ∞
= 1 {x ≥ c} φ (x) dx
−∞
= p
It follows that:
var (p̂MC ) = p − p2
= p (1 − p)
= Φ (c) (1 − Φ (c))
We deduce that:
1 Z−µ 2
h 1 2
i
E [p̂IS ] = E 1 {Z ≥ c} σe 2 ( σ ) − 2 Z
Z ∞
1 z−µ 2
( ) − 12 z 2 z−µ
= 1 {z ≥ c} e 2 σ φ dz
−∞ σ
Z ∞
1 1 2
= √ e− 2 z dz
c 2π
= 1 − Φ (c)
= p
and:
Z−µ 2
h 2
i
E p̂2IS = E 1 {Z ≥ c} σ 2 e( σ ) −Z
Z ∞
σ z−µ 2 2 1 z−µ 2
= √ e( σ ) −z e− 2 ( σ ) dz
2π
Zc ∞
σ 21 ( z−µ 2 2
σ ) −z dz
= √ e
c 2π
We have:
2
z 2 − 2µz + µ2 − 2σ 2 z 2
1 z−µ
− z2 =
2 σ 2σ 2
1 − 2σ 2 µ2
2 2µ
= z − z+
2σ 2 1 − 2σ 2 1 − 2σ 2
!
2
1 − 2σ 2 µ2 σ 2
µ
= z− −2 2
2σ 2 1 − 2σ 2 (1 − 2σ 2 )
2
1 − 2σ 2 µ2
µ
= 2
z − 2
−
2σ 1 − 2σ 1 − 2σ 2
We note2 :
µ
µ̃ =
1 − 2σ 2
and
σ
σ̃ = √
2σ 2 − 1
2 We assume that 2σ 2 − 1 > 0.
Monte Carlo Simulation Methods 277
It follows that:
2
Z ∞ 1−2σ 2
2
σ
− µ µ
z− 1−2σ
E p̂2IS = e 1−2σ2
√ e 2σ2 2
dz
c 2π
2
Z ∞
− µ σσ̃ 1 z−µ̃ 2
= e 1−2σ2 √ e− 2 ( σ̃ ) dz
c σ̃ 2π
Z ∞
σ2 µ2
− 1−2σ 1 1 z−µ̃ 2
= √ e 2
√ e− 2 ( σ̃ ) dz
2
2σ − 1 σ̃ 2π
c
σ2
µ2
− 1−2σ c − µ̃
= √ e 2
1−Φ
2σ 2 − 1 σ̃
We conclude that3 :
!!
σ2 − µ
2
c 2σ 2 − 1 + µ 2
var (p̂IS ) = √ e 1−2σ2 1−Φ √ − (1 − Φ (c))
2σ 2 − 1 2
σ 2σ − 1
The probability distribution of p̂IS is no longer a Bernoulli distribution.
3. We have var (p̂MC ) = 13.48 × 10−4 . In Figure 13.11, we report the relationship be-
tween µ and var (p̂IS ) for different values of σ. We find that the minimum value is
approximately obtained for the same value of µ:
σ µ? var (p̂IS ) × 10−4 var (p̂IS ) / var (p̂MC )
0.80 3.158 0.05 0.34%
1.00 3.154 0.06 0.45%
2.00 3.151 0.14 1.03%
3.00 3.151 0.22 1.60%
Therefore, we can make the hypothesis that the optimal value of µ does not highly
depend on the parameter σ.
4. When σ is equal to 1, we obtain:
2 2
var (p̂IS ) = eµ (1 − Φ (c + µ)) − (1 − Φ (c))
The IS scheme is optimal if the variance var (p̂IS ) is minimum. The first-order condition
is then:
∂ var (p̂IS ) 2 2
= 2µeµ (1 − Φ (c + µ)) − eµ φ (c + µ) = 0
∂µ
We deduce that the optimal value µ? satisfies the following nonlinear equation:
2µ? (1 − Φ (c + µ? )) = φ (c + µ? )
In Figure 13.12, we draw the relationship between c and µ? . We notice that:
lim µ? = c
c→∞
We can then consider µ = c. In Figure 13.12, we also report the variance ratio
var (p̂IS ) / var (p̂MC ) for the two schemes µ = µ? and µ = c. We conclude that we
obtain similar variance reduction with the heuristic scheme when c > 1.
(a) We have:
−1 −1
n
Fn (an x + bn ) = 1 − e−λ(λ x+λ ln n)
n
1 −x
= 1− e
n
We deduce that:
n
1 −x −x
G (x) = lim 1 − e = e−e = Λ (x)
n→∞ n
(b) We have:
n
Fn (an x + bn ) = n−1 x + 1 − n−1
n
1
= 1 + (x − 1)
n
We deduce that:
n
1
G (x) = lim 1 + (x − 1) = ex−1 = Ψ1 (x − 1)
n→∞ n
(c) We have:
α n
n θ
F (an x + bn ) = 1− −1
θ + θα n x + θn1/α − θ
1/α
α n
1
= 1−
α−1 n1/α x + n1/α
n
1 x −α
= 1− 1+
n α
We deduce that:
n
1 x −α x −α
x
G (x) = lim 1− 1+ = e−(1+ α ) = Φα 1 +
n→∞ n α α
279
280 Handbook of Financial Risk Management
3. We notice that:
−1/ξ
lim (1 + ξx) = e−x
ξ→0
Then we obtain:
( −1/ξ )
x−µ
lim G (x) = lim exp − 1 + ξ
ξ→0 ξ→0 σ
( −1/ξ )
x−µ
= exp − lim 1 + ξ
ξ→0 σ
x−µ
= exp − exp −
σ
4. (a) We have: h i
−ξ
G−1 (α) = µ − σξ −1 1 − (− ln α)
When the parameter ξ is equal to 1, we obtain:
−1
G−1 (α) = µ − σ 1 − (− ln α)
−1
By definition, we have T = (1 − α) n. The return period T is then associate
to the confidence level α = 1 − n/T . We deduce that:
R (T ) ≈ −G−1 (1 − n/t)
−1
= − µ − σ 1 − (− ln (1 − n/T ))
T
= − µ+ −1 σ
n
We then replace µ and σ by their ML estimates µ̂ and σ̂.
(b) For Portfolio #1, we obtain:
252
r (1Y) = − 1% + − 1 × 3% = −34%
21
For Portfolio #2, the stress scenario is equal to:
252
r (1Y) = − 10% + − 1 × 2% = −32%
21
We conclude that Portfolio #1 is more risky than Portfolio #2 if we consider a
stress scenario analysis.
Stress Testing and Scenario Analysis 281
2. We have:
m (x) = E [Y | X = x]
= E [β0 + βX + σU | X = x]
= β0 + βx + σE [U | X = x]
= β0 + βx
Ỹ = eY
= eβ0 +βX+σU
= eβ0 X̃ β Ũ σ
4. In the Gaussian case, we notice that the conditional expectation is a linear function.
This is not the case for the lognormal case. The use of ordinary least squares to
compute a conditional stress scenario assumes that the distribution of risk factors are
Gaussian.
282 Handbook of Financial Risk Management
where:
µy|x = µy + Σyx Σ−1
xx (x − µx )
and:
Σyy|x = Σyy − Σyx Σ−1
xx Σxy
We deduce that: q
qα (x) = µy|x + Φ−1 (α) Σyy|x
2. We have:
q
qα (x) = µy + Σyx Σ−1
xx (x − µx ) + Φ
−1
(α) Σyy − Σyx Σ−1
xx Σxy
= β0 (α) + β > x
where: q
β0 (α) = µy − Σyx Σ−1
xx µx + Φ
−1
(α) Σyy − Σyx Σ−1
xx Σxy
and:
β = Σ−1
xx Σxy
m (x) = β0 + β > x
where:
β0 = µy − Σyx Σ−1
xx µx
and:
β = Σ−1
xx Σxy
It follows that linear regression and quantile regression produce the same estimate β,
but not the same intercept. Indeed, we have:
q
β0 (α) = β0 + Φ−1 (α) Σyy − Σyx Σ−1 xx Σxy
If α > 50%, the intercept of the quantile regression is larger than the intercept of the
linear regression:
β0 (α) > β0 If α > 50%
β0 (α) = β0 If α = 50%
β0 (α) < β0 If α < 50%
We conclude that the median regression coincides with the linear regression if (X, Y )
is Gaussian.
4. We know that Z = Φ−1 (Fτ (τ )) ∼ N (0, 1). It follows that (X, Z) is Gaussian. The
expression of the conditional quantile of Z is then:
ln (1 − Φ (Z))
τ =−
λ
we conclude that the conditional quantile of the default time is:
ln 1 − Φ β0 (α) + β > x
τ
qα (x) = −
λ
β = Σ−1
xx Σxz
ρσx σz
=
σx2
σz
= ρ
σx
1 Indeed, Fτ (τ ) ∼ U[0,1] and Φ−1 U[0,1] ∼ N (0, 1).
Chapter 15
Credit Scoring Models
and:
−1 > −1 −1 ols
β̂ ridge = X> X + λIK X X β̂
−1 −1 ols
= X> X X> X + λIK β̂
−1 −1 ols
= IK + λ X> X β̂ (15.1)
285
286 Handbook of Financial Risk Management
where: −1
Q = λ2 X> X + 2λIK
Since Q is a symmetric positive definite matrix, we have:
X> X + Q X> X
(e) We have:
Ŷ = Xβ̂ ridge
−1
= X X> X + λIK X> Y
= HY
−1 >
where H = X X> X + λIK X . We deduce that:
−1 >
df (model) = tr X X> X + λIK X
−1
= tr X> X + λIK X> X
We finally obtain:
K
X s2k
df (model) =
s2 +λ
k=1 k
Credit Scoring Models 287
2. (a) We have:
1 >
f (β) = (Y − Xβ) (Y − Xβ) +
2
K K
!
λ X X
2
α |βk | + (1 − α) βk
2
k=1 k=1
1 > 1
β X> X + λ (1 − α) IK β − β > X> Y + Y> Y+
=
2 2
K
λα X
|βk |
2
k=1
1 > λ
L (β; λ) = (Y − Xβ) (Y − Xβ) + β > β
2 2
1
Y> Y − 2β > X> Y + β > X> X + λIK β
=
2
We deduce that:
−1
β̂ = X> X + λIK X> Y
2. We have:
−1
β̂−i = X>
−i X−i + λIK X>−i Y−i
−1
X > X − xi x> X > Y − xi yi
= i + λIK
−1
Q − xi x> X> Y − xi yi
= i
Credit Scoring Models 289
3. We notice that:
ûi,−i = yi − ŷi,−i
= yi − x>
i β̂−i
−1 !
X> X + λIK xi ûi
= yi − x>
i β̂ −
1 − hi
−1
> x> >
i X X + λIK xi ûi
= yi − xi β̂ +
1 − hi
hi ûi
= ûi +
1 − hi
ûi
=
1 − hi
and:
X> X + λIn = V S 2 + λIK V >
It follows that:
Since we have:
−1 −1
X> X + λIn X> X = V S 2 + λIK V > V S2V >
−1 2 −1 −1
= V> S + λIK V V S2V >
−1 2 >
V S 2 + λIK
= S V
we finally obtain:
−1 −1 2 >
df (model) (λ) = trace V>
S 2 + λIK S V
−1 2 > > −1
= trace S 2 + λIK S V V
−1 2
= trace S 2 + λIK
S
K
X s2k
=
s2 +λ
k=1 k
6. Since we have Ŷ = H (λ) Y and Û = (In − H (λ)) Y, we can express the PRESS
statistic as:
n
!2
1 X ((In − H (λ)) Y)i
Press =
n i=1 (In − H (λ))i,i
nK k=1 s2k + λ
K
!−2
2
X (n − K) s2k + nλ
= nK RSS β̂ (λ) (15.2)
s2k + λ
k=1
and:
K
X (n − K) s2k + nλ
λ%⇒ %
s2k + λ
k=1
7. Since we have 1 − h̄ = n−1 trace (In − H (λ)), the GCV statistic is equal to:
2
1 1
GCV = RSS β̂ (λ)
n n−1 trace (In − H (λ))
−2
= n (trace (In − H (λ))) RSS β̂ (λ)
K
!−2
X λ
GCV = n n − K + RSS β̂ (λ) (15.3)
s2k + λ
k=1
8. The values of β̂−i when λ is equal to 3 are reported in Table 15.1. In the last row,
we have also given the ridge estimate β̂ calculated with the full sample. Using the
values of ŷi,−i , ûi,−i , ûi and hi (see Table 15.2), we obtain5 Press = 0.29104 and
GCV = 0.28059.
and:
K
X K
X K
X
2
kxi − x̄k = x2i,k + x̄2(k) − 2 xi,k x̄(k)
k=1 k=1 k=1
4 We verify that Equations (15.2) and (15.3) are equivalent, because we have:
K K
1 X (n − K) s2 + nλ
k 1 X (n − K) s2k + λ + Kλ
=
K s2k + λ K s2k + λ
k=1 k=1
K
X λ
= (n − K) +
s2k + λ
k=1
and:
n X
X K n X
X K n X
X K
S2 = n x2i,k + n x̄2(k) − 2n xi,k x̄(k)
i=1 k=1 i=1 k=1 i=1 k=1
K n n n
!
X X X X
= n x2i,k +n x̄2(k) − 2nx̄(k) xi,k
k=1 i=1 i=1 i=1
K n
!
X X
= n x2i,k + n2 x̄2(k) − 2n2 x̄2(k)
k=1 i=1
K n
!
X X
= n x2i,k − n2 x̄2(k)
k=1 i=1
We conclude that S1 = S2 .
2. Using the previous result, we have:
1 X X 2
X 2
kxi − xi0 k = nj kxi − x̄j k
2
C(i)=j C(i0 )=j C(i)=j
where x̄j and nj is the mean vector and the number of observations of Cluster Cj .
3. The first-order conditions are:
∂ f (µ1 , . . . , µnC )
=0 for j = 1, . . . , nC
∂ µj
where:
nC
X X 2
f (µ1 , . . . , µnC ) = nj kxi − µj k
j=1 C(i)=j
Since we have:
∂ 2
kxi − µj k = −2 (xi − µj )
∂ µj
Credit Scoring Models 295
it follows that:
∂ f (µ1 , . . . , µnC ) X
= −2nj (xi − µj ) = 0
∂ µj
C(i)=j
We deduce that µ?j = µ?j,1 , . . . , µ?j,K where:
1 X
µ?j,k = xi,k
nj
C(i)=j
Finally, we verify that the optimal solution is µ?j = x̄j . The Llyod’s algorithm exploits
this result in order to find the optimal partition.
4. In Figure 15.2, we have reported the classification operated by K-means, LDA and
QDA. We notice that the unsupervised K-means algorithm gives the same result as
the supervised LDA algorithm.
var β1> X
var (Z1 ) =
= β1> Σβ1
Since, the first derivative ∂β L (β; λ1 ) is equal to 2Σβ − 2λ1 β, we deduce that the
first-order condition is:
Σβ1 = λ1 β1 (15.4)
or:
(Σ − λ1 IK ) β1 = 0
It follows that β1 is an eigenvector of Σ and λ1 is the associated eigenvalue. Moreover,
we have:
Maximizing var (Z1 ) is then equivalent to consider the eigenvector β1 that corresponds
to the largest eigenvalue.
2. We have:
var β2> X
var (Z2 ) =
= β2> Σβ2
The objective function is then to maximize the variance of Z2 under the constraints
of normalization and independence between Z1 and Z2 :
It follows that:
β1> (2Σβ2 − 2λ2 β2 − ϕβ1 ) = β1> 0 = 0
7 Joliffe (2002) notices that the solution is β1 = ∞ without this normalization.
Credit Scoring Models 297
or:
Since the 1st and 2nd PCs are uncorrelated, Equation (15.5) implies that β1> Σβ2 = 0
and β1> β2 = 0. We deduce that −ϕβ1> β1 = 0 or ϕ = 0 because β1> β1 = 1. In this case,
the first-order condition becomes:
Σβ2 = λ2 β2
n
>
X
S = (xi − µ̂) (xi − µ̂)
i=1
n
X n
X
= xi x>
i − 2µ̂ x>
i + nµ̂µ̂
>
i=1 i=1
n
X
= xi x>
i − nµ̂µ̂
>
i=1
J
X
SW = Sj
j=1
J X
>
X
= (xi − µ̂j ) (xi − µ̂j )
j=1 i∈Cj
J
X X
= xi x> >
i − nj µ̂j µ̂j
j=1 i∈Cj
J
X X J
X
= xi x>
i − nj µ̂j µ̂>
j
j=1 i∈Cj j=1
n
X J
X
= xi x>
i − nj µ̂j µ̂>
j
i=1 j=1
8 We cannot use the first eigenvector because β1> β2 must be equal to zero.
298 Handbook of Financial Risk Management
j=1 j=1
J
X
nj µ̂j µ̂> >
+ nµ̂µ̂>
= j − 2µ̂ nµ̂
j=1
J
X
= nj µ̂j µ̂>
j − nµ̂µ̂
>
j=1
PJ
because nµ̂ = j=1 nj µ̂j . It follows that:
Xn J
X J
X
SW + SB = xi x>
i − nj µ̂j µ̂>
j
+ nj µ̂j µ̂>
j − nµ̂µ̂
>
i=1
= S
2. We have:
n1 µ̂1 + n2 µ̂2
µ̂ =
n1 + n2
It follows that:
n1 µ̂1 + n2 µ̂1 n1 µ̂1 + n2 µ̂2
µ̂1 − µ̂ = −
n1 + n2 n1 + n2
n1 µ̂1 + n2 µ̂1 − n1 µ̂1 − n2 µ̂2
=
n1 + n2
n2
= (µ̂1 − µ̂2 )
n1 + n2
and:
n1
µ̂2 − µ̂ = (µ̂2 − µ̂1 )
n1 + n2
We deduce that:
> >
SB = n1 (µ̂1 − µ̂) (µ̂1 − µ̂) + n2 (µ̂2 − µ̂) (µ̂2 − µ̂)
2
n2 >
= n1 (µ̂1 − µ̂2 ) (µ̂1 − µ̂2 ) +
n1 + n2
2
n1 >
n2 (µ̂2 − µ̂1 ) (µ̂2 − µ̂1 )
n1 + n2
n1 n2 >
= (µ̂1 − µ̂2 ) (µ̂1 − µ̂2 )
n1 + n2
Credit Scoring Models 299
and9 :
n1 n2 > >
β > SB β = β (µ̂1 − µ̂2 ) (µ̂1 − µ̂2 ) β
n1 + n2
n1 n2 >
β > µ̂1 − β > µ̂2 β > µ̂1 − β > µ̂2
=
n1 + n2
n1 n2 2
= β > µ̂1 − β > µ̂2
n1 + n2
n1 n2 2
= (µ̃1 − µ̃2 )
n1 + n2
where µ̃j is defined as:
1 X 1 X 1 X
µ̃j = yi = β > xi = β > xi = β > µ̂j
nj nj nj
i∈Cj i∈Cj i∈Cj
3. We have:
>
X
Sj = (xi − µ̂j ) (xi − µ̂j )
i∈Cj
and:
>
X
β > Sj β = β> (xi − µ̂j ) (xi − µ̂j ) β
i∈Cj
X 2
= β > xi − β > µ̂j
i∈Cj
X 2
= (yi − µ̃j )
i∈Cj
= S̃j
= s̃2j
We deduce that:
β > SW β = β > (S1 + S2 ) β
= β > S1 β + β > S2 β
= s̃21 + s̃22
4. We have:
β > SB β
J (β) =
β > SW β
2
n1 n2 (µ̃1 − µ̃2 )
=
n1 + n2 s̃21 + s̃22
We finally obtain the following optimization program:
2
(µ̃1 − µ̃2 )
β ? = arg max
s̃21 + s̃22
2
In order to separate the class C1 and C2 , we would like that (µ̃1 − µ̃2 ) is the largest,
meaning that the projected means must be as far away as possible. At the same time,
we would like that the scatters s̃21 and s̃22 are the smallest, meaning that the samples
of each class are close to the corresponding projected mean.
9 because β > µ̂1 − β > µ̂2 is a scalar.
300 Handbook of Financial Risk Management
SB β = λSW β
We have:
n1 n2 >
SB β = (µ̂1 − µ̂2 ) (µ̂1 − µ̂2 ) β
n1 + n2
n1 n2
(µ̂1 − µ̂2 ) β > µ̂1 − β > µ̂2
=
n1 + n2
= γ (µ̂1 − µ̂2 )
where:
n1 n2
β > µ̂1 − β > µ̂2
γ=
n1 + n2
We deduce that:
λSW β = γ (µ̂1 − µ̂2 )
or:
γ −1
β= S (µ̂1 − µ̂2 )
λ W
It follows that the decision boundary is linear and depends on the direction µ̂1 − µ̂2 .
Since we have J (β 0 ) = J (β) if β 0 = cβ, we can choose the following optimal value:
β ? = S−1
W (µ̂1 − µ̂2 )
6. We have:
SW = S1 + S2
16.86 8.00 21.33 18.33
= +
8.00 18.00 18.33 18.83
38.19 26.33
=
26.33 36.83
and:
0.89 −3.10
SB =
−3.10 10.86
We observe that the 5th observation is incorrectly assigned to Class C2 , because its
score 1.147 is larger than −0.317.
Credit Scoring Models 301
2. We have:
∂ `i (β)
Ji,k (β) =
∂ βk
φ x> φ x>
i β xi,k i β xi,k
= − (1 − yi ) + yi
1 − Φ x> Φ x>
i β i β
We deduce that:
− (1 − yi ) Φ x> >
i β + yi 1 − Φ xi β
φ x>
Ji,k (β) = >
>
i β xi,k
Φ xi β 1 − Φ xi β
yi − Φ x> φ x>
i β i β
= xi,k
Φ x> 1 − Φ x>
i β i β
1 − 2Φ x> φ x>
= i β i β xi,j
∂
yi − Φ x> φ x>
(∗) = i β i β
∂ βj
− yi − Φ x> φ x>
>
xi β xi,j − φ2 x>
= i β i β i β xi,j
We note: 2 2
Φ x>
i β 1 − Φ x> i β ∂ 2 `i (β)
Ai =
φ x>
i β xi,j xi,k ∂ βk ∂ βj
and: 2 2
Φ x>
i β 1 − Φ x> β
Bi = >
i ci
φ xi β
We obtain:
−yi x> >
> >
Φ x> 1 − Φ x>
Ai = i β + Φ xi β xi β − φ xi β i β i β −
> > >
yi − Φ xi β 1 − 2Φ xi β φ xi β
−yi Φ xi β xi β + Φ2 x>
>
> > >
>
= i β xi β − Φ xi β φ xi β +
yi Φ2 x>
>
x>
>
3 2
x> >
i β xi β − Φ i β xi β + Φ i β φ xi β −
Φ3 x> −x> 2
x> (1 + yi ) x> >
= i β i β +Φ i β i β − φ xi β +
Φ x> > >
− yi φ x>
i β yi −xi β + 2φ xi β i β
and:
2
= yi φ x> > >
1 − Φ x>
Bi i β + xi βΦ xi β i β +
2
(1 − yi ) φ x> > >
Φ x>
i β − xi β 1 − Φ xi β i β
= yi φ x> >
>
xi β − 2yi Φ x> >
i β + yi Φ xi β i β φ xi β −
2yi Φ2 x>
>
xi β + yi Φ2 x> >
i β i β φ xi β +
y i Φ3 x >
>
xi β + Φ2 x> >
i β i β φ xi β −
yi Φ2 x> >
x>
2
>
i β φ xi β − Φ i β xi β +
Φ x i β x i β + y i Φ x i β x i β − y i Φ3 x >
>
3
> 2 >
> >
i β xi β
>
3
> 2 >
> >
= Φ xi β xi β + Φ xi β − (1 + yi ) xi β + φ xi β +
Φ x> > >
+ yi φ x>
i β yi xi β − 2φ xi β i β
where β(s) is the value of β at the step s. We may initialize the algorithm with the
−1 >
OLS solution β(0) = X > X X Y.
Credit Scoring Models 303
Ŷ = fz,y (V )
fz,y Zγ >
=
fz,y fx,z (U ) γ >
=
fz,y fx,z Xβ > γ >
=
Ŷ = Xβ > γ > = XA
>
where A = (γβ) is a nx × ny matrix. The least squares loss is then equal to:
ny
n X
X
L (θ) = Li,j (θ)
i=1 j=1
n ny
XX 1 2
= (yj (xi ) − yi,j )
i=1 j=1
2
1 |
= trace Ŷ − Y Ŷ − Y
2
1 |
= trace ((XA − Y ) (XA − Y ))
2
We deduce that:
1 |
 = arg min trace ((XA − Y ) (XA − Y ))
2
−1
= (X | X) X | Y
and:
−1
γ̂ β̂ = Â> = Y > X (X | X)
We conclude that it is not possible to estimate β and γ separately because it depends
on the rank of the different matrices. Indeed, A has nx × ny parameters whereas the
product γβ has nz (nx + ny ) parameters. In particular, the model is overidentified
when:
nx × ny
nz >
nx + ny
Otherwise, we obtain a constrained linear regression:
1 |
β̂, γ̂ = arg min trace ((XA − Y ) (XA − Y ))
2
s.t. γβ = A>
304 Handbook of Financial Risk Management
1 2
ξ (ŷ, y) = (ŷ − y)
2
and:
ξ 0 (ŷ, y) = ŷ − y
We deduce that:
∂ Li,j (θ)
= (yj (xi ) − yi,j ) yj (xi ) (1 − yj (xi )) zi,h
∂ γj,h
Credit Scoring Models 305
and:
∂ Li,j (θ)
= (yj (xi ) − yi,j ) yj (xi ) (1 − yj (xi )) γj,h zi,h (1 − zi,h ) xi,k
∂ βh,k
The matrix forms are:
∂ L (θ) >
= Ŷ − Y G Ŷ Z
∂γ
and: >
∂ L (θ)
= Ŷ − Y G Ŷ γ G (Z) X
∂β
where G Ŷ = Ŷ 1n×ny − Ŷ and G (Z) = Z (1n×nz − Z).
5. We have:
ξ (ŷ, y) = − (y ln ŷ + (1 − y) ln (1 − ŷ))
and:
y (1 − y)
ξ 0 (ŷ, y) = − +
ŷ (1 − ŷ)
ŷ (1 − y) − y (1 − ŷ)
=
ŷ (1 − ŷ)
ŷ − y
=
ŷ (1 − ŷ)
We deduce that:
∂ Li (θ) (y (xi ) − yi )
= y (xi ) (1 − y (xi )) zi,h
∂ γh y (xi ) (1 − y (xi ))
= (y (xi ) − yi ) zi,h
and:
∂ Li (θ) (y (xi ) − yi )
= y (xi ) (1 − y (xi )) γh zi,h (1 − zi,h ) xi,k
∂ βh,k y (xi ) (1 − y (xi ))
= (y (xi ) − yi ) γh zi,h (1 − zi,h ) xi,k
The matrix forms are: >
∂ L (θ)
= Ŷ − Y Z
∂γ
and:
∂ L (θ) |
= Ŷ − Y γ Z (1 − Z) X
∂β
6. In the case of the softmax activation function, the value of yj (xi ) is equal to:
yj (xi ) = fz,y (vi,j )
evi,j
= PnC v 0
j 0 =1 e
i,j
The loss function is additive with respect to the index i, but not with respect to the
index j.
306 Handbook of Financial Risk Management
7. We have:
ξ (ŷ, y) = −y ln ŷ
It follows that:
y
ξ 0 (ŷ, y) = −
ŷ
We also have:
ez j
f (zj ) = PnC
j 0 =1 ezj0
We deduce that:
PnC
∂ f (zj ) ezj j 0 =1ezj0 − e2zj
= 2
∂ zj
P
nC zj 0
j 0 =1 e
P
nC zj 0
ezj 0
j =1 e − ezj
= PnC z 0 PnC z 0
j 0 =1 e j 0 =1 e
j j
!
ezj ez j
= PnC 1 − PnC
j 0 =1 ez j 0 j 0 =1 ezj0
= f (zj ) (1 − f (zj ))
and:
∂ f (zj ) ezj +zj0
= − P 2
∂ zj 0 nC zj 00
00
j =1 e
ezj ezj0
= − PnC PnC
j 00 =1 ezj00 j 00 =1 ezj00
= −f (zj ) f (zj 0 )
We notice that:
nC
X ∂ ξ (yj 0 (xi ) , yi,j 0 ) ∂ yj 0 (xi )
(∗) =
∂ yj 0 (xi ) ∂ vi,j
j 0 =1
y i,j ∂ y j (x i ) X yi,j 0 ∂ yj 0 (xi )
= − +
yj (xi ) ∂ vi,j 0
yj 0 (xi ) ∂ vi,j
j 6=j
y i,j
X yi,j 0
= − f (vi,j ) (1 − f (vi,j )) − f (vi,j ) f (vi,j 0 )
yj (xi ) 0
yj 0 (xi )
j 6=j
y i,j
X yi,j 0
= − yj (xi ) (1 − yj (xi )) − yj (xi ) yj 0 (xi )
yj (xi ) 0
yj 0 (xi )
j 6=j
X
= −yi,j (1 − yj (xi )) + yj (xi ) yi,j 0
j 0 6=j
nC
X
= −yi,j + yj (xi ) yi,j 0
j 0 =1
= yj (xi ) − yi,j
Credit Scoring Models 307
PnC
because10 j 0 =1 yi,j 0 = 1. We deduce that:
nC nC
∂ Li (θ) X ∂ ξ (yj 0 (xi ) , yi,j 0 ) X ∂ yj 0 (xi ) ∂ vi,j 00
=
∂ γj,h 0
∂ y j 0 (x i ) 00
∂ vi,j 00 ∂ γj,h
j =1 j =1
nC
X ∂ ξ (y (xi ) , y
j0 ) ∂ yj 0 (xi )
i,j 0
= zi,h
∂ yj 0 (xi ) ∂ vi,j
j 0 =1
nC
X ∂ ξ (yj 0 (x i ) , yi,j 0 ) ∂ y j 0 (x )
i
= zi,h
0
∂ yj 0 (xi ) ∂ vi,j
j =1
and:
n
∂ L (β0 , β; α) X
=β− α i yi xi = 0 K
∂β i=1
Pn
3. At the optimum, we deduce that β = i=1 αi yi xi and the objective function of the
dual problem is:
n
!> n ! n
!
∗ 1 X X X
L (α) = αi yi xi αi yi xi − β0 αi yi −
2 i=1 i=1 i=1
n
!> n ! n
X X X
α i yi xi αi yi xi + αi
i=1 i=1 i=1
n n
!> n
!
X 1 X X
= αi − αi yi xi αi yi xi
i=1
2 i=1 i=1
n n X n
X 1 X
= αi − αi αj yi yj x>
i xj
i=1
2 i=1 j=1
Credit Scoring Models 309
Then, we have:
n n n
X 1 XX
α̂ = arg max αi − αi αj yi yj x>
i xj
i=1
2 i=1 j=1
s.t. α ≥ 0n
1
α̂ = arg min α> Γα − α> 1n
2
s.t. α ≥ 0n
5. We notice that:
Cθ ≥ D ⇔ −Cθ ≤ −D
By applying the direct computation, we deduce that:
1
α̂ = arg min α> Q∗ α − α> R∗
2
s.t. α ≥ 0n
where:
Q∗ = CQ−1 C >
−1
0 0>
= C K C>
0K IK
y1 y1 x1,1 · · · y1 x1,K
0>
.. .. .. ∞ K
= · ·
. . . 0K IK
yn yn xn,1 · · · yn xn,K
>
y1 y1 x1,1 · · · y1 x1,K
.. .. ..
. . .
ynyn xn,1 ··· yn xn,K
>
= ∞ y y +Γ
R∗ = −CQ−1 R + D
= −CQ−1 0 + 1n
= 1n
310 Handbook of Financial Risk Management
Finally, we obtain:
1
arg min α> ∞ y > y + Γ α − α> 1n
α̂ =
2
s.t. α ≥ 0n
The singularity of the matrix Q does not allow to define a proper dual problem. In
particular, we observe a scaling
Pn issue of the Lagrange coefficients. This is why we
reintroduce the constraint i=1 αi yi = 0, and replace the previous dual problem by:
1
α̂ = arg min α> Γα − α> 1n
> 2
y α=0
s.t.
α ≥ 0n
where αi ≥ 0 and λi ≥ 0. The first-order conditions for β0 and β are the same:
n
∂ L (β0 , β; α) X
=− αi yi = 0
∂ β0 i=1
and:
n
∂ L (β0 , β; α) X
=β− α i yi xi = 0 K
∂β i=1
∂ L (β0 , β; α)
= C · 1n − α − λ = 0n
∂ξ
It follows that:
n
X n
X n
X
L∗ (α, λ) = L∗ (α) + C ξi − α i ξi − λi ξi
i=1 i=1 i=1
n
X
= L∗ (α) + ξi (C − αi − λi )
i=1
= L∗ (α)
because of the first-order condition for ξi . The objective function of the dual problem
is then the same as previously, and does not depend on the Lagrange multipliers λ.
However, λi ≥ 0 and C − αi − λi = 0 implies that C − αi ≥ 0 or αi ≤ C. Finally, we
obtain the following dual problem:
1
α̂ = arg min α> Γα − α> 1n
> 2
y α=0
s.t.
0n ≤ α ≤ C · 1n
ξ i ≥ 1 − y i β0 + x >
i β
Pn
5. In Figure 15.3, we have represented the optimal values of β0 , β1 , β2 , i=1 ξi and the
margin M with respect to C. We notice that the paths are not smooth. We verify that
the soft margin classifier tends to the hard margin classifier when C → ∞. In Figure
15.4, we show the optimal hyperplane when C = 0.07. We verify that the soft margin
classifier has a larger margin than the hard margin classifier.
312 Handbook of Financial Risk Management
Pn
FIGURE 15.3: Optimal values of β0 , β1 , β2 , i=1 ξi and M
and:
n
∂ L (β0 , β; α) X
=β− α i yi xi = 0 K
∂β i=1
The first-order condition for ξ is:
∂ L (β0 , β; α)
= 2 · Cξ − α − λ = 0n
∂ξ
The Kuhn-Tucker conditions are min (λi , ξi ) = 0, implying that λi ξi = 0. This is
αi
equivalent to impose that 2C · ξ − α = 0n or ξi = . It follows that:
2C
α 2 αi
i
Cξi2 − αi ξi − λi ξi = C − αi − 0 · ξi
2C 2C
αi2 α2
= − i
4C 2C
αi2
= −
4C
and:
n
1 X 2
L∗ (α, λ) = L∗ (α) − α
4C i=1 i
1 1 >
= α> 1n − α> Γα − α α
2 4C
1 1
= α> 1n − α> Γ + In α
2 2C
314 Handbook of Financial Risk Management
FIGURE 15.5: Convergence of soft margin classification with squared hinge loss
4. We obtain β̂0 = 0.853, β̂1 = −0.371 and β̂1 = 0.226. The optimal values of αi and ξi
are given in Table 15.3.
squared hinge loss function is convex and everywhere differentiable. Finally, the ramp
loss function is bounded. The last three functions can be viewed as an approximation
of the 0-1 loss function. Graphically, the ramp loss function is the best approximation.
2. We have:
It follows that Lramp is not convex, making the optimization problem tricky.
LS-SVM regression
1. We note θ = (β0 , β, ξ) the (1 + K + n)×1 vector of parameters. The objective function
is equal to:
n
1 2
X
f (θ) = kβk2 + C ξi2
2 i=1
1 >
= θ Qθ − θ> R
2
where:
0> 0>
0 K n
Q = 0K IK 0K×n
0n 0n×K 2C · In
316 Handbook of Financial Risk Management
and R = 01+K+n . Let Y = (yi ) and X = (xi,k ) be the output vector and the design
matrix. The equality constraint is Aθ = B where:
A = 1n X In
and B = Y .
and:
n
∂ L (β0 , β; α) X
=β− αi xi = 0K
∂β i=1
∂ L (β0 , β; α)
= 2C · ξ − α = 0n
∂ξ
Since we have α> 1n = 0, β = X > α and ξ = α/ (2C), the objective function of the
dual problem is equal to:
n
1 2
X
L∗ (α) = kβk2 + C ξi2 +
2 i=1
n n n
! n
X X X X
αi yi − β0 αi − αi x>
i β− αi ξi
i=1 i=1 i=1 i=1
1 >
= β β + C · ξ > ξ + α> Y − β0 · α> 1n − β > β − α> ξ
2
1 C > α> α
= − β>β + α α + α >
Y −
2 4C 2 2C
> 1 > >
α> α
= α Y − α XX α −
2 4C
Finally, we obtain the following dual problem:
1 > > 1
α̂ = arg min α XX + In α − α > Y
2 2C
s.t. α> 1n = 0
3. We also have β̂ = X > α̂. In this problem, all the training points are support vectors.
Credit Scoring Models 317
Pn
We deduce that β̂0 = n−1 i=1 yi − x> ˆ >
i β̂ and ξi = yi − β̂0 − xi β̂. We verify that
the residuals are centered:
n n
1Xˆ 1 X
ξi = yi − β̂0 − x>
i β̂
n i=1 n i=1
n
1 X
= yi − x>
i β̂ − β̂0
n i=1
= 0
ε-SVM regression
n
1 2
X
ξi− + ξi+
f (θ) = kβk2 + C
2 i=1
1 >
= θ Qθ − θ> R
2
where:
0> 0>
0 K 2n
Q = 0K IK 0K×2n
02n 02n×K 02n×2n
and:
0
0K
R=
−C · 1n
−C · 1n
− +
The constraints β0 + x> >
i β − yi ≤ ε + ξi and yi − β0 − xi β ≤ ε + ξi are equivalent to
> − > +
−β0 − xi β + ξi ≥ −yi − ε and β0 + xi β + ξi ≥ yi − ε. The matrix form Cθ ≥ D is
defined by:
−1n −X In 0n×n
C=
1n X 0n×n In
and:
−Y − ε · 1n
D=
Y − ε · 1n
and:
n n
∂ L (·) X
−
X
=β+ αi xi − αi+ xi = 0K
∂β i=1 i=1
We deduce that:
1> − +
n α −α =0
and:
β = X > α+ − α−
∂ L (·)
= C · 1n − α− − λ− = 0n
∂ ξ−
and:
∂ L (·)
= C · 1n − α + − λ + = 0n
∂ ξ+
This implies that:
C = αi− + λ− + +
i = αi + λi
It follows that:
n
X
αi− ε + ξi− − β0 − x>
(∗) = i β + yi +
i=1
n
X
αi+ ε + ξi+ + β0 + x>
i β − yi
i=1
> >
= ε α − + α + 1 n − β0 α − − α + 1 n −
> >
α− − α+ Xβ + α− − α+ Y +
Xn Xn
αi− ξi− + αi+ ξi+
i=1 i=1
Credit Scoring Models 319
We also have:
n
X n
X n
X
ξi− + ξi+ ξi− + C ξi+
C = C
i=1 i=1 i=1
n
X n
X
αi− + λi
−
ξi− + αi+ + λ+
+
= i ξi
i=1 i=1
>
Since (α− − α+ ) X = β > , the objective function of the dual problem becomes:
1 2 > >
L∗ (·) = kβk2 − ε α− + α+ 1n + β > β − α− − α+ Y
2
1 > >
= − β > β − ε α − + α + 1n − α − − α + Y
2
Since we have λ− + − − + +
i ≥ 0, λi ≥ 0, C · 1n − α − λ = 0n and C · 1n − α − λ = 0n ,
− +
we deduce that αi ≤ C and αi ≤ C. Finally, we obtain the following dual problem:
1 − >
α̂− , α̂+ α − α+ XX > α− − α+ +
= arg min
2
> >
ε α + α+ 1n + α− − α+ Y
−
> −
1n (α − α+ ) = 0
s.t. 0n ≤ α− ≤ C · 1n
0n ≤ α + ≤ C · 1n
−
We also remind that C = αi− + λ− + +
i = αi + λi . The set SV of negative support
320 Handbook of Financial Risk Management
vectors corresponds then to the observations such that 0 < αi− < C. In this case, we
have ε + ξi− − β0 − x> − >
i β + yi = 0 and ξi = 0. We deduce that β̂0 = yi + ε − xi β̂ when
− +
i ∈ SV . The set SV of positive support vectors corresponds to the observations
such that 0 < αi+ < C. In this case, we have ε + ξi+ + β0 + x> +
i β − yi = 0 and ξi = 0.
+
We deduce that β̂0 = yi − ε − x> i β̂ when i ∈ SV . Finally, we obtain:
P
> >
P
i∈SV − yi + ε − x i β̂ + i∈SV + yi − ε − x i β̂
β̂0 =
nSV − + nSV +
where nSV − and nSV + are the number of negative and positive support vectors.
5. If αi− < C, we have λ− − − −
i > 0 and ξi = 0. Otherwise, we have λi = 0 and ξi > 0.
− >
More precisely, we have ε + ξi − β0 − xi β + yi = 0 or:
ξˆi− = − yi + ε − β̂0 − x>
i β̂
>
6. When ε is equal to zero, the term ε (α− + α+ ) 1n disappears in the objective function
of the dual problem:
1 − >
−L∗ (·) = α − α+ XX > α− − α+ + α− − α+ Y
2
By setting δ = α+ − α− , we obtain the following QP problem:
1
δ̂ = arg min δXX > δ − δ > Y
> 2
1n δ = 0
s.t.
−C · 1n ≤ δ ≤ C · 1n
and: n o
ξˆi+ = 1 δ̂i = C · max 0, yi − β̂0 − x>
i β̂
2. Since we have yi f(s) (xi ) = 1 if yi = yi,s and yi f(s) (xi ) = −1 if yi 6= yi,s , we obtain:
n
X
wi,s e−yi β(s) f(s) (xi ) · 1 {yi = yi,s } +
L β(s) , f(s) =
i=1
n
X
wi,s e−yi β(s) f(s) (xi ) · 1 {yi 6= yi,s }
i=1
n
X
= e−β(s) wi,s · 1 {yi = yi,s } +
i=1
n
X
eβ(s) wi,s · 1 {yi 6= yi,s }
i=1
We notice that:
n
X n
X n
X
wi,s · 1 {yi = yi,s } = wi,s − wi,s · 1 {yi 6= yi,s }
i=1 i=1 i=1
It follows that:
n
X n
X
e−β(s) wi,s + eβ(s) − e−β(s)
L β(s) , f(s) = wi,s · 1 {yi 6= yi,s }
i=1 i=1
n
ni=1 wi,s · 1 {yi 6= yi,s } X
P
= e−β(s) + eβ(s) − e−β(s) Pn wi,s
i=1 wi,s i=1
n
X
eβ(s) − e−β(s) L(s) + e−β(s)
= wi,s
i=1
We have: n
∂ L β(s) , f(s) X
eβ(s) + e−β(s) L(s) − e−β(s)
= wi,s
∂β i=1
We deduce that:
eβ(s) + e−β(s) L(s) − e−β(s) = 0
1 − L(s) 1/2
β̂(s) = ln
L(s)
1 − L(s)
1
= ln
2 L(s)
4. We have:
s−1
X
ĝ(s) (x) = β̂(s0 ) fˆ(s0 ) (x) + β̂(s) fˆ(s) (x)
s0 =1
Using the fact that −yi fˆ(s) (xi ) = 2·1 {yi 6= ŷi,s }−1, the expression of wi,s+1 becomes:
5. The AdaBoost model can be viewed as an additive model, which is estimated using the
forward stagewise method and the softmax loss function. However, there is a strong
difference. Indeed, the solution fˆ(s) is given by:
n
X
fˆ(s) = arg min wi,s e−ws ·1{yi 6=fs (xi )}
i=1
because −yi β̂(s) f(s) (xi ) = 2β̂(s) · 1 {yi 6= yi,s } − β̂(s) and:
n
X
L β̂(s) , f(s) = e−β̂(s) wi,s e−ws ·1{yi 6=yi,s }
i=1
In the AdaBoost algorithm, the objective function for finding fˆ(s) is exogenous.
We also have:
∂ Lw (θ) >
= (Gy,y Gy,v ) (w Z)
∂γ
and:
∂ Lw (θ) >
= (((Gy,y Gy,v ) γ) Gz,u ) (w X)
∂β
where the matrices Gy,y , Gy,v , Gz,u , Z, X and γ are those defined in Exercise
15.4.7 on page 303.
324 Handbook of Financial Risk Management
(b) For the primal problem, the difference concerns the vector R:
0K+1
R=
−Cw
It follows that the support vectors corresponds to training points such that 0 <
αi < Cwi .
(c) Hard margin classification assumes that the training set is linearly separable.
So, there is no impact of weights on the solution. This is why it is impossible
to introduce weights in the objective function of the hard margin classification
problem.
Appendix A
Technical Appendix
E [Xt | Fs ] = E [Xt−1 + εt | Fs ]
h Pt−s+1 i
= E Xs + n=0 εt−n | Fs
hP i
t−s+1
= E [Xs | Fs ] + E n=0 ε t−n | Fs
= xs + 0
= xs
Xt = φXt−1 + εt
= φ (φXt−2 + εt−1 ) + εt
= φ2 Xt−2 + φεt−1 + εt
X∞
= φn εt−n
n=0
n
because limn→∞ φ = 0.
(a) We have:
∞
X
E Xt2 = φ2n E ε2t−n
n=0
∞
X
= σ2 φ2n
n=0
σ2
=
1 − φ2
< ∞
1 See Question 1(c) of Exercise A.4.2.
325
326 Handbook of Financial Risk Management
P∞
∀t ∈ Z, we have E [Xt ] = E [ n=0 φn εt−n ] = 0. We deduce that:
E [Xt ] = E [Xs ]
∀ (s, t) ∈ Z with t ≥ s and ∀u ≥ 0, we have:
"∞ ∞
#
X X
n n
E [Xs+u Xt+u ] = E φ εs+u−n φ εt+u−n
n=0 n=0
∞ ∞
" #
X X
n n
= E φ εs+u−n φ εt+u−n
n=0 n=t−s
∞ ∞
" #
X X
n t−s+n
= E φ εs+u−n φ εs+u−n
n=0 n=0
∞
" #
X
= φt−s E φ2n ε2s+u−n
n=0
φt−s 2
= σ
1 − φ2
= E [Xs Xt ]
We deduce that Xt is a weak-sense stationary process.
(b) We have:
Z p !
1 − φ2 1 − φ2 x2
P {Xt ∈ A} = √ exp − dx
A σ
2 2π 2σ 2
The probability P {Xt ∈ A} does not depend on t. We deduce that:
P {Xt ∈ A} = P {Xs ∈ A}
(c) We have:
E [Xt | Ft−1 ] = E [φXt−1 + εt | Ft−1 ]
= φxt−1
6= xt−1
It follows that Xt is a Markov process only if φ is equal to 0.
(d) We have:
h i
2
E Xt2 = E (εt + θεt−1 )
= 1 + θ2 σ2
< ∞
∀t ∈ Z, we have E [Xt ] = E [εt + θεt−1 ] = 0. We deduce that E [Xt ] = E [Xs ].
∀ (s, t) ∈ Z with t ≥ s and ∀u ≥ 0, we have:
E [Xs+u Xt+u ] = E [(εs+u + θεs+u−1 ) (εt+u + θεt+u−1 )]
= E [εs+u εt+u ] + θE [εs+u−1 εt+u ] +
θE [εs+u εt+u−1 ] + θ2 E [εs+u−1 εt+u−1 ]
1 + θ2 σ 2 if t = s
= θσ 2 if |t − s| = 1
0 if |t − s| > 1
Technical Appendix 327
(c) We have:
∞
|x| − 1 x2
Z
E [|W (t)|] = √ e 2t dx
−∞ 2πt
Z ∞
x − 1 x2
= 2 √ e 2t dx
0 2πt
r h
2 1 2 ∞
i
= −te− 2t x
πt 0
r
2t
=
π
< ∞
and:
2
We note f (y) = − y2 − yε
√
h
. We have:
ε
f 0 (y) = −y − √
h
ε2
0 ≤ f (y) ≤
2h
and: Z 0 2
y yε
exp − − √ dy ≤ C
−∞ 2 h
where C ∈ R+ . It follows that:
r 2
2 ε
0 ≤ P {|W (t + h) − W (t)| > ε} ≤ C exp −
π 2h
and: r 2
2 ε
0 ≤ lim+ P {|W (t + h) − W (t)| > ε} ≤ C lim+ exp −
h→0 π h→0 2h
2
ε
Since limh→0+ exp − 2h = 0, we deduce that:
3. We have:
E W 2 (t) = t
and:
h i
2
E W 2 (t) Fs =
E (W (t) − W (s) + W (s)) Fs
h i
2
= E W (s) | Fs + 2E [ (W (t) − W (s)) W (s)| Fs ] +
h i
2
E (W (t) − W (s)) Fs
= 0 + 0 + (t − s)
= t−s
2 We use the change of variable y = h−1/2 (x − ε).
Technical Appendix 329
3 4
If X ∼ N (0, 1), we know that E X = 0 and E X = 3. We deduce that
3
E W (t) = 0 and:
4
E W 4 (t) = t1/2 N (0, 1)
E
= 3t2
We remind that E exp N µ, σ 2 = exp µ + 0.5σ 2 . We deduce that:
h i 1
E eW (t) = e 2 t
and:
h i h i
E eW (t) Fs = E eW (s)+W (t)−W (s) Fs
h i
= eW (s) E eW (t)−W (s) Fs
1
= eW (s) e 2 (t−s)
1
= e 2 (t−s)W (s)
and:
E X n+1 = 0
where n!! denotes the double factorial. We can also show that:
(2n)!
(2n − 1)!! =
2n n!
It follows that:
(2n)!
E W 2n (t) = n tn
2 n!
and:
E W n+1 (t) = 0
n!
E [W n (t)] = t /2
n
2n/2 (n/2)!
n−1
X
(∗) = (αf + βg) (ti ) (W (ti+1 ) − W (ti ))
i=0
n−1
X
= (αf (ti ) + βg (ti )) (W (ti+1 ) − W (ti ))
i=0
n−1
X
= α f (ti ) (W (ti+1 ) − W (ti )) +
i=0
n−1
X
β g (ti ) (W (ti+1 ) − W (ti ))
i=0
Z b Z b
= α f (t) dW (t) + β g (t) dW (t)
a a
We conclude that the stochastic integral verifies the linearity property. We now intro-
duce the following partition:
We deduce that:
Z b n−1
X
f (t) dW (t) = f (ti ) (W (ti+1 ) − W (ti ))
a i=0
k−1
X
= f (ti ) (W (ti+1 ) − W (ti )) +
i=0
n−1
X
f (ti ) (W (ti+1 ) − W (ti ))
i=k
Z c Z b
= f (t) dW (t) + f (t) dW (t)
a c
2. We have:
"Z # "n−1 #
b X
E f (t) dW (t) = E f (ti ) (W (ti+1 ) − W (ti ))
a i=0
n−1
X
= E [f (ti ) (W (ti+1 ) − W (ti ))]
i=0
n−1
X
= E [f (ti )] · E [W (ti+1 ) − W (ti )]
i=0
= 0
Technical Appendix 331
hR i
b Rb
We note (∗) = E a
f (t) dW (t) a g (t) dW (t) . We have:
"n−1 n−1
#
X X
(∗) = E f (ti ) (W (ti+1 ) − W (ti )) g (ti ) (W (ti+1 ) − W (ti ))
i=0 i=0
n−1
X n−1
X
= E f (ti ) g (tj ) (W (ti+1 ) − W (ti )) (W (tj+1 ) − W (tj ))
i=0 j=0
n−1
X h i
2
= E f (ti ) g (tj ) (W (ti+1 ) − W (ti )) +
i=0
X
2 E [f (ti ) g (tj ) (W (ti+1 ) − W (ti )) (W (tj+1 ) − W (tj ))]
i>j
We deduce that:
n−1
X h i
2
(∗) = E [f (ti ) g (tj )] · E (W (ti+1 ) − W (ti )) +
i=0
X
2 E [f (ti ) g (tj )] · E [(W (ti+1 ) − W (ti )) (W (tj+1 ) − W (tj ))]
i>j
n−1
X
= E [f (ti ) g (tj )] (ti+1 − ti )
i=0
"n−1 #
X
= E f (ti ) g (tj ) (ti+1 − ti )
i=0
"Z #
b
= E f (t) g (t) dt
a
This result is known as the Itô isometry property. It is particularly useful for comput-
ing the covariance between two Itô processes X1 (t) and X2 (t):
"Z #
Z b b
cov (X1 (t) , X1 (t)) = E σ1 (t) dW (t) σ2 (t) dW (t)
a a
"Z #
b
= E σ1 (t) σ2 (t) dt
a
where σ1 (t) and σ2 (t) are the diffusion coefficients of X1 (t) and X2 (t).
3. We remind that:
! !2
Z b Z b
var f (t) dW (t) = E f (t) dW (t) −
a a
"Z #
b
2
E f (t) dW (t)
a
332 Handbook of Financial Risk Management
It follows that:
! "Z #
Z b b
2
var f (t) dW (t) =E f (t) dt − 02
a a
Since the mathematical expectation and the Riemann-Stieltjes are both linear, we
conclude that: Z b ! Z
b
E f 2 (t) dt
var f (t) dW (t) =
a a
2. It follows that: Z t Z t Z t
dW 2 (s) = ds + 2 W (s) dW (s)
0 0 0
and: Z t
W 2 (t) = t + 2 W (s) dW (s)
0
Therefore, we obtain:
Z t
I (t) = W (s) dW (s)
0
1
W 2 (t) − t
=
2
If follows that the expected value is equal to:
Z t
1
W 2 (t) − t
E W (s) dW (s) = E
0 2
2
E W (t) − t
=
2
= 0
Concerning the variance, we obtain:
Z t
1 2
var W (s) dW (s) = var W (t) − t
0 2
1
var W 2 (t)
=
4
1
E W 4 (t) − E2 W 2 (t)
=
4
1
3t2 − t2
=
4
t2
=
2
Technical Appendix 333
We also notice that we can directly find this result by using the Itô isometry property:
Z t "Z 2 # t
var W (s) dW (s) = E W (s) dW (s)
0 0
Z t
E W 2 (s) ds
=
0
Z t
= s ds
0
2
t
=
2
E [In (t)] = 0
and3 :
Z t
E W 2n (s) ds
var (In (t)) =
0
Z t
(2n)! n
= n
s ds
0 2 n!
Z t
(2n)!
= sn ds
2n n! 0
(2n)!
= tn+1
2n (n + 1)!
Finally, we obtain the following values of var (In (t)):
n 1 2 3 4 5 6
1 2 15 4 315 5
var (In (t)) 2t t3 4 t 21t5 2 t 1485t5
= E W 2n (t)
var (Jn (t))
(2n)! n
= t
2n n!
3 We use the result obtained in Question 4 of Exercise A.4.2.
334 Handbook of Financial Risk Management
= E W 2n (t) − E2 [W n (t)]
var (Jn (t))
2 ! n
(2n)! n! t
= − n
(n)! ( /2)! 2n
6. We have:
Z t
E [Kn (t)] = E W n (s) ds
0
Z t
= E [W n (s)] ds
0
by using Fubini’s theorem. The challenge lies in computing the term E [W n (s) W n (u)].
We face two difficulties. First, W n (s) and W n (u) are not independent. Therefore, the
covariance involves the power series of W (s). Second, we must distinguish the case
s < u and u ≥ u. This is why it is long and tedious to compute the variance for high
order n.
Technical Appendix 335
= 2s2 + us
We deduce that:
Z tZ t
E K22 (t) = E W 2 (s) W 2 (u) ds du
0 0
Z t Z u Z t
2 2
= 2s + us ds + 2u + us ds du
0 0 u
Z t u t !
2 3 1 2 1
= s + us + 2u2 s + us2 du
0 3 2 0 2 u
Z t
2 1 2 4 3
= 2u t + ut − u du
0 2 3
t
2 3 1 1
= u t + u2 t2 − u4
3 4 3 0
7 4
= t
12
336 Handbook of Financial Risk Management
and:
= E K22 (t) − E2 [K2 (t)]
var (K2 (t))
2
7 4 2! 2
= t − t
12 2 · 2!
1 4
= t
3
For n = 3 and s < u, we have:
3 3
W 3 (s) W 3 (u) = (W (s) − W (0)) (W (u) − W (0))
3 3
= (W (s) − W (0)) (W (s) − W (0) + W (u) − W (s))
6 5
= (W (s) − W (0)) + 3 (W (s) − W (0)) (W (u) − W (s)) +
4 2
3 (W (s) − W (0)) (W (u) − W (s)) +
3 3
(W (s) − W (0)) (W (u) − W (s))
It follows that:
6! 3 4! 2
E W 3 (s) W 3 (u) =
s + 3 · 0 + 3 · s (u − s) + 0
23 · 3! 22 · 2!
= 6s3 + 9us2
We deduce that:
Z tZ t
E K32 (t) = E W 3 (s) W 3 (u) ds du
0 0
Z t Z u Z t
3 2 3 2
= 6s + 9us ds + 6u + 9u s ds du
0 0 u
Z t u t !
3 4 3 3 9 2 2
= s + 3us + 6u s + u s du
0 2 0 2 u
Z t
9
= −6u4 + 6u3 t + u2 t2 du
0 2
t
6 5 3 4 3 3 2
= − u + u t+ u t
5 2 2 0
9 5
= t
5
and:
= E K32 (t) − E2 [K3 (t)]
var (K3 (t))
9 5
= t
5
9. Using Equation (A.1), we deduce that:
Z t
In (t) = W n (s) dW (s)
0
n t n−1
Z
1
= W n+1 (t) − W (s) ds
n+1 2 0
1 n
= Jn+1 (t) − Kn−1 (t)
n+1 2
Technical Appendix 337
and:
Jn (t) = W n (t)
Z t Z t
1
= n (n − 1) W n−2 (s) ds + n W n−1 (s) dW (s)
2 0 0
n (n − 1)
= Kn−2 (t) + nIn−1 (t)
2
We also have:
Z t
Kn (t) = W n (s) ds
0
2 2
= Jn+2 (t) − In+1 (t)
(n + 2) (n + 1) (n + 1)
and:
Z t Z t Z t
W (s) 1 W (s)
de = e ds + eW (s) dW (s)
0 2 0 0
It follows that:
Z t Z t
W (t) 1 W (s)
e =1+ e ds + eW (s) dW (s)
2 0 0
or:
1
X (t) = 1 + Y (t) + Z (t) (A.2)
2
1
2. X (t) = eW (t) is lognormal random variable with E [X (t)] = e 2 t and var (X (t)) =
Rt
e2t − et . In the case Z (t) = 0 eW (s) dW (s), we have:
E [Z (t)] = 0
and:
Z t h i
var (Z (t)) = E e2W (s) ds
0
Z t
= e2s ds
0
1 2t
= e −1
2
338 Handbook of Financial Risk Management
Rt
In the case of Y (t) = 0 eW (s) ds, we have:
Z t h i
E [Y (t)] = E eW (s) ds
0
Z t
1
= e 2 s ds
0
h 1 it
= 2e 2 s
1 0
= 2 e2t − 1
and4 :
Z t Z t
W (s) W (u)
E Y 2 (t) =
E e ds e du
0 0
Z tZ t h i
= E eW (s)+W (u) ds du
0 0
Z tZ t
1
= e 2 (s+u+2 min(s,u)) ds du
0 0
Z t Z u Z t
1 1
= e 2 (3s+u) ds + e 2 (s+3u) ds du
0 0 u
Z t u h it
2 1 (3s+u) 1
(s+3u)
= e 2 + 2e 2 du
0 3 0 u
Z t
1 2 2 1
= 2e 2 (t+3u) − e2u − e 2 u du
0 3 3
t
4 1 (t+3u) 4 2u 4 1 u
= e2 − e − e2
3 6 3 0
2 2t 8 1 t
= e − e2 + 2
3 3
It follows that:
"Z
t 2 # Z t
W (s) 2 W (s)
var (Y (t)) = E e ds −E e ds
0 0
2
2 2t 8 1 t 1
= e − e2 + 2 − 4 e2t − 1
3 3
2 2t 16 1
= e − 4et + e 2 t − 2
3 3
In Figure A.1, we have reported the correlation ρ (Y (t) , Z (t)) with respect to the
time.
Rt Rt
FIGURE A.1: Correlation between 0
eW (s) ds and 0
eW (s) dW (s)
Since g (t) is not random, we deduce that Y (t) is a Gaussian process. We have:
1 t 2
Z
E [Y (t)] = − g (s) ds
2 0
and:
"Z
t 2 #
var (Y (t)) = E g (s) dW (s)
0
Z t
= g 2 (s) ds
0
We deduce that:
Rt 2 Rt
− 21 g (u) du+ g(u) dW (u)
E [M (t) | Fs ] = E e 0 0 | Fs
R s 2 R s
−1 g (u) du+ g(u) dW (u)
= e 2 0 0 ·
1
R t 2
Rt
−2 g (u) du+ g(u) dW (u)
E e s s | Fs
R t 2 R t 2
−1 g (u) du+ 12 g (u) du
= M (s) e 2 s s
= M (s)
We conclude that M (t) is a martingale.
Technical Appendix 341
E [M (t)] = 1
We also notice that Equation (A.4) is related to the martingale representation theo-
rem: Z t
M (t) = E [M (0)] + f (s) dW (s)
0
and:
and:
|σ (t, x)| = 4
≤ 4 · (1 + |x|)
We deduce that K2 = 2. We deduce that there exists a solution to the SDE and this
solution is unique.
2. We have:
and:
3. We have:
Z t
1 1−t
dX (t) = − dW (s) dt + dW (t)
0 1−s 1−t
Z t
1 1−t
= − dW (s) dt + dW (t)
1−t 0 1−s
X (t)
= − dt + dW (t)
1−t
−1 −2 −1
4. We have f (t, x) = (1 − t) x, ∂t f (t, x) = (1 − t) x, ∂x f (t, x) = (1 − t) and
∂x2 f (t, x) = 0. It follows that:
!
X (t) X (t) 1
dY (t) = 2 − 2 dt +
1 − t
dW (t)
(1 − t) (1 − t)
1
= dW (t)
1−t
We deduce that: Z t
1
Y (t) − Y (0) = dW (s)
0 1−s
Since we have X (0) = 0, it follows that Y (0) = 0 and:
Z t
1
Y (t) = dW (s)
0 1−s
Technical Appendix 343
and:
∂ f (t, W (t)) 1 ∂ 2 f (t, W (t))
+ =0
∂t 2 ∂ x2
Then, X (t) is a Ft -martingale if this condition is satisfied.
6. In the case of the cubic martingale, we have f (t, x) = x3 − 3tx, ∂t f (t, x) = −3x,
∂x f (t, x) = 3x2 − 3t, ∂x2 f (t, x) = 6x and:
In the case of the quartic martingale, we have f (t, x) = x4 − 6tx2 + 3t2 , ∂t f (t, x) =
−6x2 + 6t, ∂x f (t, x) = 4x3 − 12tx, ∂x2 f (t, x) = 12x2 − 12t and:
We conclude that the necessary condition is satisfied for the cubic and quartic mar-
tingales.
7. We note f (t, x) = et/2 cos (x). Since we have ∂t f (t, x) = 21 et/2 cos (x), ∂x f (t, x) =
−et/2 sin (x), ∂x2 f (t, x) = −et/2 cos (x), we obtain:
1 t/2 1
dX (t) = e cos W (t) − et/2 cos W (t) dt − et/2 sin W (t) dW (t)
2 2
It follows that: Z t
X (t) = 1 − es/2 sin W (s) dW (s)
0
dX (t) = dt + dZ (t) + dt
= 2 dt + dZ (t)
and5 :
E [ X (5)| Ft ] = x + (5 − t)
If we now consider the filtration Gt generated by the Brownian motion Z (t), we obtain:
and:
E [ X (5)| Gt ] = x + 2 (5 − t)
We deduce that:
E [ X (5)| G0 ] = x + 2 (5 − 0)
= x + 10
3. We notice that:
−∂t V (t, x) + 10V (t, x) 6= At V (t, x) + 4
where At is the infinitesimal generator of X (t) with respect to the filtration Ft .
Therefore, we cannot apply the Feynman-Kac formula. However, by changing the
probability measure, we have:
1 2
−∂t V (t, x) + 3V (t, x) = ∂ V (t, x) + 2∂x V (t, x) + 4
2 x
= A0t V (t, x) + 4
where A0t is the infinitesimal generator of X (t) with respect to the filtration Gt . We
5 We note X (t) = x.
Technical Appendix 345
4
(x + 10 − 2 × 5) e3×5−15 + 1 − e3×5−15
V (5, x) =
3
= x
We also have:
= ex+12.5−2.5t
6 At the initial date t = 0, we have:
4
V (0, x) = (x + 10) e−15 + 1 − e−15
3
346 Handbook of Financial Risk Management
4
V (t, x) = e−3(5−t) · ex+12.5−2.5t + 1 − e−3(5−t)
3
4
ex−2.5+0.5t + 3t−15
= 1−e
3
We check the terminal condition:
4
ex−2.5+0.5×5 + 1 − e3×5−15
V (5, x) =
3
= ex
We also have:
V (T, x) = 1 {x = xT }
V (t, x) = E [1 {X (T ) = xT } | X (t) = x]
= P {X (T ) = xT | X (t) = x}
We have:
∂x [a (b − x) U (t, x)] = −aU (t, x) + a (b − x) ∂x U (t, x)
and:
∂x2 σ 2 U (t, x) = σ 2 ∂x2 U (t, x)
U (0, x) = 1 {x = x0 }
In Figure A.2, we have represented the probability density function P {X (1) = x | X (0) = 0}
using the two approaches. For that, we solve the two PDE using finite difference meth-
ods. Let uim be the numerical solution of U (ti , xm ). By construction, we have:
where h is the spatial mesh spacing meaning. Therefore, we have to divide the numer-
ical solution by h in order to obtain the density.
V (T, x) = 1 {x = xT }
U (0, x) = 1 {x = x0 }
because:
∂x [µxU (t, x)] = µU (t, x) + µx∂x U (t, x)
and:
∂x2 σ 2 x2 U (t, x) = 2σ 2 U (t, x) + 4σ 2 x∂x U (t, x) + σ 2 x2 ∂x2 U (t, x)
In Figure A.3, we have represented the probability density function P {X (1) = x | X (0) = 0}
using the two approaches.
348 Handbook of Financial Risk Management
2. We notice that ∂x F (x) = f (x) and ∂x2 F (x) = f 0 (x). Using Itô’s lemma, we have:
1 ∂2 F 2
∂F
dY (t) = µ (t, S (t)) + σ (t, S (t)) dt +
∂S 2 ∂ S2
∂F
σ (t, S (t)) dW (t)
∂S
We deduce that:
3. Since we have:
1
dY (t) = dV (t) + f 0 (S (t)) σ 2 (t, S (t)) dt
2
it follows that:
1
dV (t) = dY (t) − f 0 (S (t)) σ 2 (t, S (t)) dt
2
Technical Appendix 349
We deduce that:
Z T
1
V (T ) − V (0) = Y (T ) − Y (0) − f 0 (S (t)) σ 2 (t, S (t)) dt
2 0
Z T
1
= F (S (T )) − F (S (0)) − f 0 (S (t)) σ 2 (t, S (t)) dt
2 0
Finally, we obtain:
Z S(T ) Z T
1
V (T ) = V (0) + f (x) dx − f 0 (S (t)) σ 2 (t, S (t)) dt
S(0) 2 0
= G (T ) + C (T )
where: Z S(T )
G (T ) = V (0) + f (x) dx
S(0)
and: Z T
1
C (T ) = − f 0 (S (t)) σ 2 (t, S (t)) dt
2 0
The first term G (T ) can be interpreted as the option profile of the dynamic strategy
at the maturity date, whereas C (T ) is the cost associated to the continuous trading
strategy.
and:
f 0 (x) = −δ (x − S? )
where δ (x) is the Dirac delta function. By assuming that V (0) = S (0), we deduce
that:
1 T
Z
V (T ) = S (T ) + (S? − S (T ))+ − δ (S (t) − S? ) σ 2 (t, S (t)) dt
2 0
The option profile of this strategy is the underlying asset plus a put option where the
strike is equal to S ? . The cost of the stop-loss strategy is equal to:
Z T
1
C (T ) = − δ (S (t) − S? ) σ 2 (t, S (t)) dt
2 0
< 0
and:
f 0 (x) = δ (x − S? )
350 Handbook of Financial Risk Management
1 T
Z
V (T ) = S (T ) − (S (T ) − S? )+ + δ (S (t) − S? ) σ 2 (t, S (t)) dt
2 0
The option profile of the stop-gain strategy is the underlying asset minus un call
option where the strike is equal to S? . The cost of the strategy is positive, because
if we cross the gain level (S (t) > S? ), we obtain an additional positive P&L that is
equal to S (t) − S? .
6. (a) We buy the asset (n (t) > 0) when the asset price S (t) is below the price target
S? . And we sell the asset (n (t) < 0) when the asset price S (t) is above the price
target S? . This is a contrarian or mean-reverting strategy.
(b) We have:
S(T ) S(T )
S? − x
Z
x
m dx = mS? ln x −
S(0) x S? S(0)
S (T )
= mS? ln − m (S (T ) − S (0))
S (0)
and:
S?
f 0 (x) = −m
x2
We deduce that:
and:
m
C (T ) =S? IV (T )
2
where IV (T ) is the integrated variance:
Z T
IV (T ) = σ 2 (t) dt
0
(d) When the asset volatility σ (t) is low, the trend of the asset price is strong. It
means that the asset price can continuously increase or decrease. This is the bad
scenario for the strategy. The good scenario is when the asset price crosses many
times the target price S? . This is why the strategy is more performing when the
realized volatility is high. In Figure A.4, we have illustrated the strategy when
the asset price follows a geometric Brownian motion and the target price is equal
to the initial price8 . We notice that the number of times that S (t) crosses S?
increases with the volatility. Therefore, the vega of the strategy is positive.
Pr {M (t) ≥ x} = 2 Pr {W (t) ≥ x}
x
= 2 1−Φ √
t
352 Handbook of Financial Risk Management
2. Let z = x − y ≥ 0. We have:
Pr {W (t) ≥ 2x − y} = Pr {W (t) ≥ x + z, M (t) ≥ x} +
Pr {W (t) ≥ x + z, M (t) < x}
= Pr {W (t) ≥ x + z, M (t) ≥ x}
Indeed, we have:
Pr {W (t) ≥ x + z, M (t) < x} = 0
because z ≥ 0. It follows that:
Pr {W (t) ≥ 2x − y} = Pr {W (t) ≥ x + z, M (t) ≥ x}
= Pr {W (τx + t − τx ) − W (τx ) ≥ z | M (t) ≥ x} ·
Pr {M (t) ≥ x}
Using the strong Markov property and the symmetry of the Brownian motion, we
deduce that:
Pr {W (τx + t − τx ) − W (τx ) ≥ z | M (t) ≥ x}
= Pr {W (τx + t − τx ) − W (τx ) ≥ z | τx ≤ t}
= Pr {W (t − τx ) ≥ z | τx ≤ t}
= Pr {W (t − τx ) ≤ −z | τx ≤ t}
= Pr {W (t) ≤ x − z | M (t) ≥ x}
We conclude that:
Pr {W (t) ≥ 2x − y} = Pr {W (t) ≤ x − z | M (t) ≥ x} · Pr {M (t) ≥ x}
= Pr {W (t) ≤ x − z, M (t) ≥ x}
= Pr {W (t) ≤ y, M (t) ≥ x}
It follows that:
dP
f(MX ,X) (x, y) = f(M Q ,W Q ) (x, y)
W dQ
!
2
r
1 2 (2x − y) 2 (2x − y)
= exp µy − µ t exp −
2 t3/2 π 2t
!
2
r
(2x − y) 2 1 2 (2x − y)
= exp µy − µ t −
t3/2 π 2 2t
5. To compute the density of MX (t), we use the fact that it is the marginal10 of
f(MX ,X) (x, y):
Z x
fMX (x) = f(MX ,X) (x, y) dy
−∞
r x
(2x − y) µy− 1 µ2 t− (2x−y)2
Z
2
= e 2 2t dy
πt −∞ t
r x Z x !
2 µy− 21 µ2 t−
(2x−y)2
µy− 1 2
µ t−
(2x−y)2
= e 2t −µ e 2 2t dy
πt −∞ −∞
r Z x
r
2 µx− 12 µ2 t−
(2x−x)2 2 µy− 1 µ2 t− (2x−y)2
= e 2t −µ e 2 2t dy
πt −∞ πt
Z x r
2 − (x−µt)2 2 µy− 1 µ2 t− (2x−y)2
= √ e 2t −µ e 2 2t dy
2πt −∞ πt
6. We verify that:
∂ F (x) ∂ Pr {MX (t) ≤ x}
=
∂x ∂x
1 x − µt 2µx 1 −x − µt
= √ φ √ +e √ φ √
t t t t
−x − µt
−2µe2µx Φ √
t
2 x − µt −x − µt
= √ φ √ − 2µe2µx Φ √
t t t
= fMX (x)
Moreover, we have F (0) = 1 and F (∞) = 1. We conclude that F (x) is the probability
distribution of MX (t).
2. We recall that:
var (Y (ν, ζ)) = 2 (ν + 2ζ)
We deduce that:
2 4ab −at
var (X (t)) = + 2cx 0 e
c2 σ2
2
(1 − e−at ) σ 4 4ab
8a −at
= + x0 e
8a2 σ2 (1 − e−at ) σ 2
−at 2 2
b 1 −at
= 1−e σ + x0 e
2a (1 − e−at ) a
2
σ 2 x0 −at σ 2 b (1 − e−at )
= e − e−2at +
a a 2
3. We recall that: s
8
γ1 (Y (ν, ζ)) = (ν + 3ζ) 3
(ν + 2ζ)
We deduce that:
s
4ab 8
γ1 (X (t)) = + 3cx0 e−at 3
σ2 (4abσ −2 + 2cx0 e−at )
s
σ (3x0 e−at + b (1 − e−at )) 2 (1 − e−at )
= √ 3
a (2x0 e−at + b (1 − e−at ))
Technical Appendix 355
2x2 U (t, x1 , x2 )
∂x22
2
σ 2 x2 ∂x22 U (t, x1 , x2 ) + 2σ 2 ∂x2 U (t, x1 , x2 )
σ x2 U (t, x1 , x2 ) =
and:
We deduce that:
1 2 1
∂t U (t, x1 , x2 ) = x1 x2 ∂x21 U (t, x1 , x2 ) + σ 2 x2 ∂x22 U (t, x1 , x2 ) +
2 2
ρσx1 x2 ∂x21 ,x2 U (t, x1 , x2 ) +
(2x2 + ρσ − µ) x1 ∂x1 U (t, x1 , x2 ) +
σ 2 + ρσx2 − a (b − x2 ) ∂x2 U (t, x1 , x2 ) +
(a + x2 + ρσ − µ) U (t, x1 , x2 )
4ν 2 x2 ∂x2 U (t, x1 , x2 ) +
2ν 2 U (t, x1 , x2 )
and:
h i
∂x21 ,x2 νxβ1 x22 U (t, x1 , x2 ) = νxβ1 x22 ∂x21 ,x2 U (t, x1 , x2 ) +
We deduce that:
1 2β 2 2 1
∂t U (t, x1 , x2 ) = x x ∂ U (t, x1 , x2 ) + ν 2 x22 ∂x22 U (t, x1 , x2 ) +
2 1 2 x1 2
ρνxβ1 x22 ∂x21 ,x2 U (t, x1 , x2 ) +
2 βx1β−1 x2 + ρν xβ1 x2 ∂x1 U (t, x1 , x2 ) +
2ν 2 + ρβνxβ−1 1 x 2 x2 ∂x2 U (t, x1 , x2 ) +
β (2β − 1) x12β−2 x22 + ν 2 + 2ρβνxβ−1 1 x2 U (t, x1 , x2 )
3. We have reported the probability density function of Heston and SABR models in
Figures A.5 and A.6.
and:
1 1 2 2
2 2 2 2
C=
2
2 3 3
3 3 3 3
2. (a) We have represented J (k, s (k)) in the first panel in Figure A.7.
(b) In the second panel, we have reported J (1, s (k)). The maximum is reached for
s (k) = 39.
(c) In the third panel, we have reported the optimal control c? (k) when s (k) is
equal to 3, 13 and 22. We notice that c? (k) ≈ s (k) when k = 1 and c? (k) = 25
when k = 100. The case k = 1 has been explained in Question 1(c). In the case
k = 100, we have:
1 p
f (k, s (k) , c (k)) ≈ − ln s (k) + βc (k) + γ s (k)esin s(k)
s (k)
Therefore, maximizing f (k, s (k) , c (k)) implies that c? (k) = max cj = 25.
Technical Appendix 359
(c) We have:
eiA + e−iA
cos A =
2
and:
ie−iA − ieiA
sin A =
2
Therefore, we can calculate cos A and sin A from the matrix exponential. We
obtain:
0.327 −0.406 −0.391
cos A = −0.406 0.554 −0.216
−0.391 −0.216 0.756
and:
0.573 0.209 0.451
sin A = 0.209 0.661 0.036
0.451 0.036 0.155
We have:
cos2 A + sin2 A = I3
For transcendental functions f (x),
(d) √ we have f (A) = Qf (T ) Q∗ . Using f (x) =
x, we obtain:
0.836 + 0.115i 0.264 − 0.022i 0.525 − 0.173i
A1/2 = 0.264 − 0.022i 0.910 + 0.004i 0.059 + 0.033i
0.525 − 0.173i 0.059 + 0.033i 0.344 + 0.258i
2. The eigenvalues of Σ are −0.00038, 0.00866, 0.01612 and 0.05060. Σ is not a positive
2
semi-definite matrix because one eigenvalue is negative. We have Σ = (A1 + iA2 )
where:
0.19378 0.04539 0.01365 −0.01440
0.04539 0.13513 −0.03221 −0.03445
A1 =
0.01365 −0.03221 0.02740 −0.02833
−0.01440 −0.03445 −0.02833 0.08866
360 Handbook of Financial Risk Management
and:
0.00024 −0.00073 −0.00184 −0.00083
−0.00073 0.00224 0.00563 0.00255
A2 =
−0.00184 0.00563 0.01417 0.00642
−0.00083 0.00255 0.00642 0.00291
We deduce that the nearest covariance matrix is:
0.04000 0.01499 0.00196 −0.00602
0.01499 0.02254 −0.00364 −0.00745
Σ̃ = A21 =
0.00196 −0.00364
0.00278 −0.00237
−0.00602 −0.00745 −0.00237 0.01006
3. We obtain ρ (B) = C5 (−25%). This is the lower bound of constant correlation matrix.
More generally, we have:
ρ (Cn (r)) = Cn (r? )
where r? = max (r, −1/ (n − 1)). If r < −1/ (n − 1), the nearest correlation matrix is
then the lower bound.
4. We obtain:
1.0000
0.6933 1.0000
ρ (C) =
0.6147 0.4571 1.0000
0.2920 0.7853 0.0636 1.0000
0.7376 0.2025 0.7876 −0.0901 1.0000