0% found this document useful (0 votes)
18 views70 pages

Brownian Motion and Financial Analytics Solutions

The document contains exercise solutions related to Brownian motion and financial modeling, including the properties of Brownian motion, geometric Brownian motion, and calculations for expected values and variances. It discusses various exercises that involve checking properties of stochastic processes, deriving formulas, and generating plots for visual representation. Additionally, it includes mathematical proofs and code snippets for simulations related to financial risk and analytics.

Uploaded by

LauRita AranGo
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views70 pages

Brownian Motion and Financial Analytics Solutions

The document contains exercise solutions related to Brownian motion and financial modeling, including the properties of Brownian motion, geometric Brownian motion, and calculations for expected values and variances. It discusses various exercises that involve checking properties of stochastic processes, deriving formulas, and generating plots for visual representation. Additionally, it includes mathematical proofs and code snippets for simulations related to financial risk and analytics.

Uploaded by

LauRita AranGo
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Exercise Solutions

Chapter 1
Exercise 1.1 According to Definition 1.4, we need to check the following five
properties of Brownian motion:
(i) starts at 0 at time 0,
(ii) independence of increments,
(iii) almost sure continuity of trajectories,
(iv ) stationarity of the increments,
(v ) Gaussianity of increments.
Checking conditions (i) to (iv ) does not pose any particular problem since
the time changes t 7→ c + t and t 7→ t/c2 are deterministic and continuous.
a) Let Xt := Bc+t − Bt , t ∈ R+ . For any finite sequence of times t0 < t1 <
· · · < tn , the sequence

(Xt1 − Xt0 , Xt2 − Xt1 , . . . , Xtn − Xtn−1 )


= (Bc+t1 − Bc+t0 , Bc+t2 − Bc+t1 , . . . , Bc+tn − Bc+tn−1 )

is made of independent random variables. Concerning (v ), Xt − Xs =


Bc+t − Bc+s is normally distributed with mean zero and variance t + c −
(c + s) = t − s for any 0 ⩽ s < t.
b) Let Xt := cBt/c2 −, t ∈ R+ . For any finite sequence of times t0 < t1 <
· · · < tn , the sequence

(Xt1 − Xt0 , Xt2 − Xt1 , . . . , Xtn − Xtn−1 )


= (cBt1 /c2 − cBt0 /c2 , cBt2 /c2 − cBt1 /c2 , . . . , cBtn /c2 − cBtn−1/c2 )

" 323

This version: April 20, 2025


[Link]
N. Privault

is made of independent random variables. Concerning (v ), Xt − Xs =


cBt/c2 − cBs/c2 is normally distributed with mean zero and variance
c2 (t/c2 − s/c2 ) = t − s for any 0 ⩽ s < t, since

Var [cBt/c2 ] = c2 Var [Bt/c2 ] = c2 t/c2 = t, t ⩾ 0.

Exercise 1.2 The solution to (1.18) is given by


2 /2)t
St = S0 eσBt +(µ−σ , t ⩾ 0,

see the proof of Proposition 1.8 for details. The next code can be used to
generate Figure 1.23.
N=1000; t <- 0:N; dt <- 1.0/N; nsim <- 10; sigma=0.6; mu=0.001
Z <- c(rnorm(n = N, sd = sqrt(dt)));
plot(t*dt, exp(mu*t), xlab = "time", ylab = "Geometric Brownian motion", type = "l", ylim =
c(0, 4), col = 1,lwd=3)
lines(t*dt, exp(sigma*c(0,cumsum(Z))+mu*t-sigma*sigma*t*dt/2),xlab = "time",type = "l",ylim
= c(0, 4), col = 4)

Exercise 1.3
a) Those quantities can be computed from the expression of Stn as a function
of the N (0, t) random variable Bt for n ⩾ 1. Namely, we have
2
E[Stn ] = E S0n enσBt −nσ t/2+nrt
 
2
= S0 e−nσ t/2+nrt E enσBt
 
2 t/2+nrt+n2 σ 2 t/2
= S0 e−nσ
2
= S0n enrt+(n−1)nσ t/2 ,

where we used the Gaussian moment generating function (MGF) formula


(A.41), i.e.
2 2
E enσBt = en σ t/2
 

for the normal random variable Bt ≃ N (0, t), t > 0.


b) By the result of Question (a)), we have E[St ] = S0 ert and
2
E[St2 ] = E S02 e2σBt −σ t+2rt
 
2
= S02 e−σ t+2rt E e2σBt
 
2 t+2rt
= S02 eσ , t ⩾ 0.

Exercise 1.4 From the solution of Exercise 1.3, we have

324 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

 (i)  (i)
E St = S0 eµt , t ∈ [0, T ], i = 1, 2,

and
 (i)   ( i ) 2   (i) 
Var St = E St − E St
( i ) 2 2 ( i ) 2
= S0 e2µt+σi t − S0 e2µt
( i ) 2 2
= S0 e2µt eσi t − 1 , t ∈ [0, T ], i = 1, 2.


Hence, we have
 (2) (1)   (1)   (2)  (1) (2) 
Var St − St = Var St + Var St − 2 Cov St , St

with
 (1) (2)   (1) (2) (1) 2 (2) 2
E St St = E S0 S0 e2µt+σ1 Wt −σ1 t/2+σ2 Wt −σ2 t/2


(1) (2) 2 2 (1) (2) 


= S0 S0 e2µt−σ1 t/2−σ2 t/2 E eσ1 Wt +σ2 Wt


1 
 
(1) (2) 2 2 (1) ( 2 ) 2 
= S0 S0 e2µt−σ1 t/2−σ2 t/2 exp E σ1 Wt + σ2 Wt ,
2

with
(1) ( 2 ) 2  ( 1 ) 2  (1) (2)  ( 2 ) 2 
E σ1 Wt + σ2 Wt = E σ1 Wt + 2E σ1 Wt σ2 Wt + E σ2 W t
   

= σ12 t + 2ρσ1 σ2 t + σ22 t,

hence  (1) (2)  (1) (2)


E St St = S0 S0 e2µt+ρσ1 σ2 t ,
and
(1) (2)   (1) (2)   (1)   (2)  (1) (2)
Cov St , St = E St St − E St E St = S0 S0 e2µt (eρσ1 σ2 t − 1),

and therefore
 (2) (1) 
Var St − St
(1) 2 2µt σ 2 t (2) 2 2µt σ 2 t (1) (2)
= S0 e ( e 1 − 1 ) + S0 e (e 2 − 1) − 2S0 S0 e2µt (eρσ1 σ2 t − 1)
(1) 2 σ 2 t (2) 2 σ 2 t (1) (2) (2) ( 1 ) 2 
= e2µt S0 e 1 + S0 e 2 − 2S0 S0 eρσ1 σ2 t − S0 − S0 .
 

Exercise 1.5 We have


2 2 2 2
E S0 eσBt +µt−σ t/2 = S0 eµt−σ t/2 E eσBt = S0 eµt−σ t/2 eσ t/2 = S0 eµt
   

" 325

This version: April 20, 2025


[Link]
N. Privault

and
σ2 t σ2 t
 
E[log St ] = E log S0 + σBt + µt − = (log S0 ) + µt − ,
2 2

hence
σ2 t σ2 t
 
Theilt = log E[St ] − E[log St ] = log S0 + µt − (log S0 ) + µt − = .
2 2

5
Geometric Brownian motion

1
0.0 0.2 0.4 0.6 0.8 1.0
Time

Fig. S.1: Twenty sample paths of geometric Brownian motion (St )t∈R+ .

Exercise 1.6 According to (1.11), taking t = one year, we have


 
St
E = eµt = 1 + 0.0949535 = 1.0949535
S0

and  
St 2
Var = e2µt eσ t − 1 = 0.16630852 = 0.02765852,

S0
hence
µ = log 1.0949535 = 0.0907119
and
q
log 1 + e−2µt × 0.02765852

σ=
q
= log 1 + 0.02765852/1.09495352


= 15.10212%.

326 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

Exercise 1.7
a) We have

dCt = dVt − dAt


= ξt dSt + ηt dAt − dAt
Vt − (Vt − At )β
= β1{Vt >At } (Vt − At )dSt + 1{Vt >At } dAt
At
Vt
+ 1{Vt ⩽At } dAt − dAt
At
Vt Vt − At
= β1{Vt >At } (Vt − At )dSt + dAt − β1{Vt >At } dAt − dAt
At At
V t − At Ct
= β1{Vt >At } Ct dSt + dAt − β1{Vt >At } dAt
At At
Ct Ct
= βCt dSt + dAt − β dAt
At At
= βCt (µSt dt + σSt dBt ) + rCt dt − rβCt dt,

hence
dCt
= ((µ − r )β + r )St dt + βσSt dBt .
Ct
b) We have

Vt = At + Ct
2 σ 2 t/2
= A0 ert + (V0 − A0 )e((µ−r )β +r )t+βσBt −β .

N=1000; t <- 0:N; dt <- 1.0/N; sigma=0.5; mu=1; beta=2.5; r=1; A0=1; C0=0.1; S0=A0+C0;
dB <- rnorm(N,mean=0,sd=sqrt(dt));
par(mfrow=c(2,1),mai = c(0.6, 0.5, 0.45, 0.2))
plot(t*dt, exp(r*t*dt), xlab = "t", ylab = "", type = "l", ylim = c(0.8, 3),xaxs="i",yaxs="i", col
= 1,lwd=2,[Link]=1.6,[Link]=1.6)
A = A0*exp(r*t*dt)
S = S0*exp(sigma*c(0,cumsum(dB))+mu*t*dt-sigma*sigma*t*dt/2)
C = C0*exp(beta*sigma*c(0, cumsum(dB))+ (beta*mu+(1-beta)*r)*t*dt -
beta*beta*sigma*sigma*t*dt/2)
lines(t*dt, S,type = "l", col = 4,lwd=2)
lines(t*dt, A + C,type = "l", col = 2,cex=2,lwd=2)
legend("topleft", legend=c("Geometric Brownian motion", "CPPI"),col=c(4,2), lty=1:2,
cex=1.6); # grid(lwd = 2)
xi = beta*C; eta = (C+A-xi*S)/A
plot(t*dt, xi, xlab = "t", ylab = "", ylim=c(min(eta,xi),max(eta,xi)),type = "l",
xaxs="i",yaxs="i", col = 1,lwd=2,[Link]=1.6,[Link]=1.6)
lines(t*dt,eta,type = "l", col = 6,lwd=2)
legend("center", legend=c(expression(paste(xi)),expression(paste(eta))),col=c(1,6), lty=1:2,
cex=1.6); # grid(lwd = 2)

" 327

This version: April 20, 2025


[Link]
N. Privault

3.0
Geometric Brownian motion
CPPI
2.5
2.0
1.5
1.0

0.0 0.2 0.4 0.6 0.8 1.0


t
1.0
0.5

ξ
η
0.0
−0.5

0.0 0.2 0.4 0.6 0.8 1.0


t

Fig. S.2: CPPI value and allocation.

Note that the mean return of Ct is (µ − r )β + r, i.e. which is above r when


µ > r and below r when µ < r.
When µ = r,
2 σ 2 t/2
Ct = C0 ert+βσBt −β
represents the value of a leveraged investment fund such as ProShares Ultra
S&P500 or ProShares UltraShort S&P500, which are seeking daily investment
results, before fees and expenses, that correspond to β times (βx) the daily
performance of the S&P500,® with respectively β = 2 for ProShares Ultra
and β = −2 for ProShares UltraShort. Here, leveraging with a factor β : 1
aims at multiplying the potential return of an investment by a factor β.
Note that E[Ct ] = C0 ert according to absence of arbitrage. On the other
hand, we have
2 2
Var[Ct ] = C02 e2rt (eβ σ t − 1), t ⩾ 0,
which increases with |β|.

328 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

Exercise 1.8
a) We have

dV (t) dX1 (t) dXn (t)


= +···+
V (t) V (t) V (t)
dX1 (t) dXn (t)
= π1 ( t ) + · · · + πn ( t )
X1 (t) Xn (t)
= π1 (t)µ1 (t)dt + · · · + πn (t)µn (t)dt
n
X n
X
+ π1 ( t ) σ1,k (t)dBk (t) + · · · + πn (t) σn,k (t)dBk (t)
k =1 k =1
Xn
= µ̄(t)dt + σ̄k (t)dBk (t),
k =1

where
µ̄(t) = π1 (t)µ1 (t) + · · · + πn (t)µn (t)
and
σ̄k (t) = π1 (t)σ1,k (t) + · · · + πn (t)σn,k (t).
Remark: Note that from
n
dXi (t) X
= µi (t)dt + σi,k (t)dBk (t),
Xi (t)
k =1

we have
dXi (t) (dXi (t))2
d log Xi (t) = −
Xi (t) 2Xi2 (t)
n n
X 1X 2
= µi (t)dt + σi,k (t)dBk (t) − σi,k (t)dt,
2
k =1 k =1

hence the relation


n
1X 2
γi (t) = µi (t) − σi,k (t), i = 1, . . . , n.
2
k =1

b) We have

d log πi (t) = d log Xi (t) − d log X (t)

" 329

This version: April 20, 2025


[Link]
N. Privault

n
X n
X
= γi (t)dt + σi,k (t)dBk (t) − γ̄ (t)dt − σ̄k (t)dBk (t),
k =1 k =1
n
X
= (γi (t) − γ̄ (t))dt + (σi,k (t) − σ̄k (t))dBk (t).
k =1

Remark: Note that from


n
dV (t) X
= µ̄(t)dt + σ̄k (t)dBk (t),
V (t)
k =1

we have
dV (t) (dV (t))2
d log V (t) = −
V (t) 2V 2 (t)
n n
X 1X 2
= µ̄(t)dt + σ̄k (t)dBk (t) − σ̄k (t)dt,
2
k =1 k =1

hence
n
1X 2
γ̄ (t) = µ̄(t) − σ̄k (t).
2
k =1

Chapter 2

Exercise 2.1
a) i) By calculation (expected answer). We have

ρ(0) = Cov(Xn , Xn )
= Var[Xn ]
= E[Xn2 ]
= E[(Zn − aZn−1 )2 ]
= E[Zn2 − 2aZn−1 Zn + a2 Zn−1
2
]
= E[Zn2 ] − 2aE[Zn−1 Zn ] + a2 E[Zn−1
2
]
= 1 − 2aE[Zn−1 ]E[Zn ] + a2
= 1 + a2 ,

and

ρ(1) = Cov(Xn , Xn+1 )

330 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

= Cov(Zn + aZn−1 , Zn+1 + aZn )


= Cov(Zn , Zn+1 ) + a Cov(Zn−1 , Zn+1 )
+a Cov(Zn−1 , Zn ) + a2 Cov(Zn−1 , Zn )
= Cov(Zn , Zn+1 ) + a Cov(Zn−1 , Zn+1 )
+a Cov(Zn , Zn ) + a2 Cov(Zn−1 , Zn )
= a Var[Zn ]
= a,

and for k ⩾ 2,

ρ(k ) = Cov(Xn , Xn+k )


= Cov(Zn + aZn−1 , Zn+k + aZn+k−1 )
= Cov(Zn , Zn+k ) + a Cov(Zn−1 , Zn+k )
+a Cov(Zn , Zn+k−1 ) + a2 Cov(Zn−1 , Zn+k−1 )
= 0,

since n < n + k − 1. By a similar argument, we obtain ρ(k ) = ρ(−k )


for k ⩽ 0.
ii) Confirmation by simulation with an MA(1) time series constructed
by hand:

library(zoo)
N=10000;Zn<-zoo(rnorm(N,0,1))
Xn<-Zn+2*lag(Zn,-1, [Link] = TRUE);Xn<-Xn[-1]
k=0;cov(Xn[1:(length(Xn)-k)],lag(Xn,k))

or with an MA(1) time series constructed using [Link]:

n=2000;a=2;
Xn<-[Link](model=list(ma=c(a)),[Link]=100,n)
x=seq(100,100+n-1)
plot(x,Xn,pch=19, ylab="X", xlab="n", main = 'MA(1) Samples',col='blue')
lines(x,Xn,col='blue')
Xn<-zoo(Xn)
k=1;cov(Xn[1:(length(Xn)-k)],lag(Xn,k))

Using the command ccf to compute the autocovariance empirically,


we find:
ccf(Xn,Xn,lag = 5, type="covariance", plot=T, lwd=2, col='blue', axes=FALSE,
ylim=c(-1-a**2,1+a**2), main="")
axis(side = 1, at = seq(-5,5,1))
axis(side = 2, at = c(-1-a**2,-a,0,a,1+a**2), labels=c(expression(paste("-1-|a|"^"2")),
"a",0,"a", expression(paste("1+|a|"^"2"))))

" 331

This version: April 20, 2025


[Link]
N. Privault

b) We note that E[Xn ] = 0, n ∈ Z, and in addition the autocovariance


Cov(Xn , Xn+k ) depends only of |k| and not on n ∈ Z. Therefore, the
time series (Xn )n∈Z is weakly stationary by Definition 2.11. In addition,
by Theorem 2.12 this time series is strictly stationary only if |a| ̸= 1.

Exercise 2.2
a) We rewrite the equation defining (Xn )n⩾1 as

Xn = Zn + LXn = Zn + ϕ(L)Xn , n ⩾ 1.

where L is the lag operator LXn = Xn−1 and ϕ(L) = L. Taking ϕ(z ) := z,
by Theorem 2.12 we need to check whether the solutions of the equation
ϕ(z ) = 1 lie on the complete unit circle. As ϕ(z ) = 1 admits the unique
solution z = 1 which lies on the complete unit circle, we conclude that
the AR(1) time series (Xn )n⩾1 is not weakly stationary.
b) As in part (a)), we rewrite the AR(2) equation for (Yn )n⩾1 as

Yn = Zn + 0.75 × LYn − 0.125 × L2 Yn = Zn + ϕ(L)Yn , n ⩾ 2.

with ϕ(L) = 0.75 × L − 0.125 × L2 . The equation ϕ(z ) = 1 with ϕ(z ) =


0.75z − 0.125z 2 reads z 2 − 6z + 8 = (z − 2)(z − 4) = 0. This equation has
two solutions z = 2, 4 which lie outside the complex unit circle, hence by
Theorem 2.12 the AR(2) time series (Yn )n⩾2 is weakly stationary.

Exercise 2.3
a) We have

E[Xn+1 ] = E Zn+1 + αXn


 

= E[Zn+1 ] + αE Xn
 

= αE Xn , n ⩾ 0,
 

hence by induction we have E[Xn ] = αn E[X0 ] = 0 for all n ⩾ 0.


b) We have

332 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

Cov(Xn+k+1 , Xn ) = E[Xn+k+1 Xn ] − E[Xn+k+1 ]E[Xn ]


= E[Xn+k+1 Xn ]
= E[(Zn+k+1 + αXn+k )Xn ]
= E[Zn+k+1 Xn + αXn+k Xn ]
= E[Zn+k+1 Xn ] + E[αXn+k Xn ]
= E[Zn+k+1 ]E[Xn ] + αE[Xn+k Xn ]
= αE[Xn+k Xn ]
= α(E[Xn+k Xn ] − E[Xn+k ]E[Xn ])
= α Cov(Xn+k , Xn ), n ⩾ 0,

hence, since E[Xn ] = 0, n ⩾ 0, we find

Cov(Xn+k , Xn ) = αk Cov(Xn , Xn ) = αk Var[Xn ], k, n ⩾ 0.

c) We have

Var[Xn+1 ] = E[Xn2+1 ]
= E[(Zn+1 + αXn )2 ]
= E[Zn2+1 + 2αZn+1 Xn + α2 Xn2 ]
= E[Zn2+1 ] + 2αE[Zn+1 Xn ] + α2 E[Xn2 ]
= 1 + 2αE[Zn+1 ]E[Xn ] + α2 E[Xn2 ]
= 1 + α2 E[Xn2 ]
= 1 + α2 Var[Xn ].

By applying the above relation recursively and using the geometric series
identity (13.51), we obtain

Var[Xn ] = 1 + α2 Var[Xn−1 ]
= 1 + α2 (1 + α2 Var[Xn−2 ])
= 1 + α2 (1 + α2 (1 + α2 Var[Xn−2 ]))
= 1 + α2 + · · · + α2n
Xn
= α2k
k =0
1 − α2n+2

, α ̸= ±1,


1 − α2

=

 n + 1,

α = ±1, n ⩾ 0.

" 333

This version: April 20, 2025


[Link]
N. Privault

d) We check that the solution of ϕ(z ) := αz is z = 1/α, hence by Theo-


rem 2.12 there exists an AR(1) solution of (2.28) which is weakly station-
ary when α ̸= ±1. However, the present time series (Xn )n⩾0 started at
X0 = 0 is not weakly stationary because Cov(Xn , Xn ) = E[Xn2 ] is not
constant in n ⩾ 0.

Exercise 2.4
a) We have

Var[Xn ] = Var[Zn−1 − Zn−2 + αZn−3 ]


= Var[Zn−1 ] + Var[−Zn−2 ] + Var[αZn−3 ]
= Var[Zn−1 ] + Var[Zn−2 ] + α2 Var[Zn−3 ]
= 2 + α2 .

Next, since using the linearity relation

Cov(X + Y , Z ) = Cov(X, Z ) + Cov(Y , Z )

and the fact that Cov(X, Z ) = 0 when X and Z are independent random
variables, we have

Cov(Xn+1 , Xn ) = Cov(Zn − Zn−1 + αZn−2 , Zn−1 − Zn−2 + αZn−3 )


= Cov(Zn − Zn−1 + αZn−2 , Zn−1 )
+ Cov(Zn − Zn−1 + αZn−2 , −Zn−2 )
+ Cov(Zn − Zn−1 + αZn−2 , αZn−3 )
= Cov(−Zn−1 , Zn−1 ) + Cov(αZn−2 , −Zn−2 )
= − Cov(Zn−1 , Zn−1 ) − α Cov(Zn−2 , Zn−2 )
= −α − 1,

and

Cov(Xn+2 , Xn ) = Cov(Zn+2 − Zn + αZn−1 , Zn−1 − Zn−2 + αZn−3 )


= Cov(Zn+2 − Zn + αZn−1 , Zn−1 )
+ Cov(Zn+2 − Zn + αZn−1 , −Zn−2 )
+ Cov(Zn+2 − Zn + αZn−1 , αZn−3 )
= Cov(αZn−1 , Zn−1 )
= α Cov(Zn−1 , Zn−1 )
= α,

and

334 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

Cov(Xn+k , Xn ) = Cov(Zn+k−1 − Zn+k−2 + αZn+k−3 , Zn−1 − Zn−2 + αZn−3 )


= Cov(Zn+k−1 − Zn+k−2 + αZn+k−3 , Zn−1 )
+ Cov(Zn+k−1 − Zn+k−2 + αZn+k−3 , −Zn−2 )
+ Cov(Zn+k−1 − Zn+k−2 + αZn+k−3 , αZn−3 )
=0

for k ⩾ 3.
b) Since the white noise sequence (Zn )n∈Z is made of independent identically
distributed random variables, we have the identity in distribution
d
Xn = Zn−1 − Zn−2 + αZn−3 ≃ Zn − Zn−1 + αZn−2 , n ⩾ 2,

which shows that (Xn )n⩾3 has the same distribution as an MA(2) time
series the form
Yn = Zn + β1 Zn−1 + β2 Zn−2 ,
with β1 = −1 and β1 = α.

Exercise 2.5
a) We have

∇Xn = Xn − Xn−1
= Zn + α1 Xn−1 − Zn−1 − α1 Xn−2
= Zn − Zn−1 + α1 ∇Xn−1 , n ⩾ 2,

hence (∇Xn )n⩾2 forms an ARMA(1, 1) time series.


b) We have

∇2 Xn = ∇Xn − ∇Xn−1
= Xn − Xn−1 − (Xn−1 − Xn−2 )
= Xn − 2Xn−1 + Xn−2
= Zn + α1 Xn−1 − 2Zn−1 − 2α1 Xn−2 + Zn−2 + α1 Xn−3
= Zn − 2Zn−1 + Zn−2 + α1 ∇2 Xn−1 , n ⩾ 3,

which forms an ARMA(1, 2) time series.

Exercise 2.6
a) We have

" 335

This version: April 20, 2025


[Link]
N. Privault

n n
!
∂ X (2) ( 1 ) 2
X (2) (1) 
rk − a − brk = −2 rk − a − brk
∂a
k =1 k =1
n n
(2) (1)
X X
= 2an − 2 rk + 2b rk ,
k =1 k =1

and
n n
∂ X (2) ( 1 ) 2
X (1) (2) (1) 
rk − a − brk =2 rk − a + rk − brk
∂b
k =1 k =1
n n
!
X (1) (2) (1) 1 X (2) (1) 
=2 rk rk − brk − rl − brl
n
k =1 l =1
n n n n
!
X (1) (2) 2 X (1) (2) X (1) 2 1 X (1) (1)
=2 rk rk − rk rl − 2b (rk ) − rk rl .
n n
k =1 k,l=1 k =1 k,l=1

b) In order to minimize the residual (2.29) over a and b we equate the above
derivatives to zero, which yields the equations
n n n
∂ X (2) ( 1 ) 2
X (2)
X (1)
rk − a − brk |a=â, b=b̂
= 2b
an − 2 rk + 2bb rk =0
∂a
k =1 k =1 k =1

and
n
∂ X (2) ( 1 ) 2
rk − a − brk |a=â, b=b̂
∂b
k =1
n n n n
!
X (1) (2) 2 X (1) (2)
X (1) 1 X (1) (1)
=2 rk rk − rk rl − 2bb (rk )2 − rk rl
n n
k =1 k,l=1 k =1 k,l=1
= 0.

This leads to estimators b


a, bb of the parameters a and b respectively as the
(1)
empirical mean and covariance of (rk )k=1,2,...,n , i.e.

336 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

 n
1 X (2) b (1) 
a= rk − brk ,


 b

 n
k =1






 and





n n n n n
1 X (1) (2)
! !
 X (1) (2) X (1) 1 X (1) (2) 1 X (2)

 rk rk − r k r l rk − rl rk − rl
n

 n n
 bb = k=1 k,l=0

k =1 l =0 l =0
.


n n = 2
1 X (1) (1) n n
 !
1 X (1)

(1) 2
 X
( ) − (1)
X
r r r

rk − rk

 k n k l
n


k =1 k,l=0 k =1 k =1

Exercise 2.7 Since the p-value = 0.02377 is lower than the 5% confidence
level, we can reject the nonstationarity (null) hypothesis H0 at that level.

Exercise 2.8
a) We consider the equation

φ(z ) = α1 z + α2 z 2 = 1,

i.e.
α2 z 2 + α1 z − 1 = 0,
with solutions
 1

q
−α1 ± α12 + 4α2 −a ± a2 + 8a2 −a ± 3a


2a
z± = = = =
2α2 4a2 4a2 −1,

a
hence by Theorem 2.12 the time series (Xn )n⩾1 is stationary for a ∈
/
{−1, −1/2, 1/2, 1}.
b) We have

E[Xn ] = E[Zn + α1 Xn−1 + α2 Xn−2 ]


= E[Zn ] + α1 E[Xn−1 ] + α2 E[Xn−2 ]
= α1 E[Xn−1 ] + α2 E[Xn−2 ]
= α1 E[Xn ] + α2 E[Xn ],

hence
(1 − α1 − α2 )E[Xn ] = 0,
which implies E[Xn ] = 0, n ∈ Z, since 1 − α1 − α2 ̸= 0.

" 337

This version: April 20, 2025


[Link]
N. Privault

c) We have

Cov(Xn , Zn ) = Cov(Zn + α1 Xn−1 + α2 Xn−2 , Zn )


= Cov(Zn , Zn ) + α1 Cov(Zn , Xn−1 ) + α2 Cov(Zn , Xn−2 )
= Cov(Zn , Zn )
= σ2 .

d) We have

Cov(Xn+1 , Xn ) = Cov(Zn+1 + α1 Xn + α2 Xn−1 , Xn )


= Cov(Zn+1 , Xn ) + α1 Cov(Xn , Xn ) + α2 Cov(Xn−1 , Xn ),
= 16α1 + α2 Cov(Xn−1 , Xn )
1
= 4 + Cov(Xn−1 , Xn ),
2
hence
Cov(Xn+1 , Xn ) = 8, n ∈ Z.

Chapter 3
Exercise 3.1
a) Since Z1 + Z2 + · · · + Zn has the centered Gaussian N (0, nσ 2 ) distribution
with variance nσ 2 , we have
N
!
X X
P(Y ⩾ y ) = P Zk ⩾ y N = n P ( N = n )
n⩾1 k =1
n
!!
X X
= 1−P Zk < y N =n P(N = n)
n⩾1 k =1
n
!!
X X
= 1−P Zk ⩽ y N =n P(N = n)
n⩾1 k =1
X 
y

= 1−Φ √ P(N = n)
n⩾1 nσ 2
X λn  y

= e−λ Φ −√ , y > 0.
n! nσ 2
n⩾1

b) Since E[Zk ] = 0 for all k ⩾ 1, we have

338 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

N
" #
X X
E[Y ] = E Zk N = n P(N = n)
n⩾1 k =1
n
" #
X X
= E Zk N = n P(N = n)
n⩾1 k =1
X n
X
= P(N = n) E [ Zk | N = n ]
n⩾1 k =1
X X n
= P(N = n) E [ Zk ]
n⩾1 k =1
= 0,

as in (3.12).

Exercise 3.2 By (3.17), we have

λ λwy
Φ′ (y ) = Φ (y ) − Φ(y − z )dF (z )
c c 0
λ λ wy
= Φ (y ) − Φ(y − z )e−z/µ dz
c µc 0
λ w
λ y
= Φ (y ) − Φ(z )e−(y−z )/µ dz,
c µc 0
hence the differential equation
λ ′ λ λ wy
Φ′′ (y ) = Φ (y ) − Φ (y ) + Φ(z )e−(y−z )/µ dz
c µc µ2 c 0
1 λ
 
λ λ
= Φ′ (y ) − Φ (y ) + Φ (y ) − Φ′ (y )
c µc µ c
λ 1
 
= − Φ′ (y ),
c µ

which can be solved as


λµ (λ/c−1/µ)y
Φ (y ) = 1 − e ,
c
given the boundary conditions Φ(∞) = 1 and Φ(0) = 1 − λµ/c, cf. (3.19).
We conclude that
λµ (λ/c−1/µ)y
Ψ (y ) = e , y ⩾ 0,
c

" 339

This version: April 20, 2025


[Link]
N. Privault

provided that c < λµ.

Exercise 3.3
a) We have

E[RT ] = E[R0 + µT − CNT ]


= E[R0 ] + E[µT ] − E[CNT ]
= R0 + µT − CE[NT ]
= R0 + µT − CλT
= R0 + (µ − λC )T ,

and similarly

Var[RT ] = Var[µT − CNT ] = Var[−CNT ] = C 2 Var[NT ] = λC 2 T .

b) We find

P(RT < 0) = P(R0 + µT − CNT < 0)


= P(NT > (R0 + µT )/C )
X
= P ( NT = k )
k>(R0 +µT )/C
X (λT )k
= e−λT .
k!
k>(R0 +µT )/C

Exercise 3.4
a) We have E[S (T )] = λT E[Z ] and Var[S (T )] = λT E[Z 2 ].
b) We have

Var[x + f (T ) − S (T )]
P(x + f (T ) − S (T ) < 0) ⩽
(E[x + f (T ) − S (T )])2
Var[S (T )]
=
(x + f (T ) − E[S (T )])2
λT E[Z12 ]
= .
(x + f (T ) − λT E[Z1 ])2

Chapter 4

Exercise 4.1

340 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

a) Taking (U , V ) = (U , U ), we have

P(U ⩽ u and V ⩽ v ) = P(U ⩽ u and U ⩽ v )


= P(U ⩽ min(u, v ))
= min(u, v )
= CM (u, v ), u, v ∈ [0, 1].

b) Taking (U , V ) = (U , 1 − U ), we have

P(U ⩽ u and V ⩽ v ) = P(U ⩽ u and 1 − U ⩽ v )


= P(U ⩽ u and U ⩾ 1 − v )
= P(1 − v ⩽ U ⩽ u)
= 1{0⩽1−v⩽u⩽1} P(1 − v ⩽ U ⩽ u)
= 1{0⩽u+v−1⩽1} (u − (1 − v ))
= (u + v − 1) + ,

u, v ∈ [0, 1].
c) We have

C (u, v ) = P(U ⩽ u and V ⩽ v ) ⩽ P(U ⩽ u and V ⩾ 1) ⩽ P(U ⩽ u) = u,

u, v ∈ [0, 1], and similarly we find C (u, v ) ⩽ P(U ⩽ v ) = v for all


u, v ∈ [0, 1], which yields (4.9).
d) For fixed v ∈ [0, 1] we have

∂C C (u + ε, v ) − C (u, v )
(u, v ) = lim
∂u ε→0 ε
P(U ⩽ u + ε and V ⩽ v ) − P(U ⩽ u and V ⩽ v )
= lim
ε→0 ε
P(u ⩽ U ⩽ u + ε and V ⩽ v )
= lim
ε→0 P (u ⩽ U ⩽ u + ε)
= lim P(V ⩽ v | u ⩽ U ⩽ u + ε)
ε→0
= P(V ⩽ v | U = u)
⩽ 1,

u, v ∈ [0, 1], hence

∂C
h′ (u) = (u, v ) − 1 = P(V ⩽ v | U = u) − 1 ⩽ 0,
∂u

" 341

This version: April 20, 2025


[Link]
N. Privault

u, v ∈ [0, 1], and since h(1) = C (1, v ) − v = P(V ⩽ v ) − v = 0, v ∈ [0, 1]


we conclude that h(u) ⩾ 0, u ∈ [0, 1], which shows (4.10).

Exercise 4.2
a) When ρ = 1, we have

P(X = 1 and Y = 1) = pX pY + pX pY (1 − pX )(1 − pY ),


 p





 P(X = 0 and Y = 1) = (1 − pX )pY − pX pY (1 − pX )(1 − pY ) ⩾ 0,

 p

P(X = 1 and Y = 0) = pX (1 − pY ) − pX pY (1 − pX )(1 − pY ) ⩾ 0,


 p







P(X = 0 and Y = 0) = (1 − pX )(1 − pY ) + pX pY (1 − pX )(1 − pY ),
 p

hence
 (1 − pX )pY ⩾ pX pY (1 − pX )(1 − pY ),
 p

pX (1 − pY ) ⩾ pX pY (1 − pX )(1 − pY ),
 p

hence

(1 − pX )pY ⩾ pX (1 − pY ) and pX (1 − pY ) ⩾ pY (1 − pX ),

showing that (1 − pX )pY = pX (1 − pY ), which implies pX = pY , and

 P(X = 1 and Y = 1) = pX + pX (1 − pX ) = pX = pY ,
 2




 P(X = 0 and Y = 1) = 0,


P(X = 1 and Y = 0) = 0,







P(X = 0 and Y = 0) = 1 − pX = 1 − pY .

b) When ρ = −1, we have

 P(X = 1 and Y = 1) = pX pY − pX pY (1 − pX )(1 − pY ) ⩾ 0,


 p




 P(X = 0 and Y = 1) = (1 − pX )pY + pX pY (1 − pX )(1 − pY ) ⩾ 0,

 p

P(X = 1 and Y = 0) = pX (1 − pY ) + pX pY (1 − pX )(1 − pY ) ⩾ 0,


 p







P(X = 0 and Y = 0) = (1 − pX )(1 − pY ) − pX pY (1 − pX )(1 − pY ) ⩾ 0,
 p

342 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

hence
 pX pY ⩾ pX pY (1 − pX )(1 − pY ),
 p

pX pY (1 − pX )(1 − pY ),
p
pX pY ⩾

hence

pX pY ⩾ (1 − pX )(1 − pY ) and pX pY ⩾ (1 − pX )(1 − pY ),

showing that pX pY = (1 − pX )(1 − pY ), which implies pX = 1 − pY , and

P(X = 1 and Y = 1) = 0,






 P(X = 0 and Y = 1) = 1,


P(X = 1 and Y = 0) = 1,







P(X = 0 and Y = 0) = 0.

Exercise 4.3
a) We have

P(X ⩾ x) = P(X ⩾ x and Y ⩾ 0) = e−(λ+ν )x ,

and
P(Y ⩾ y ) = P(X ⩾ 0 and Y ⩾ y ) = e−(µ+ν )y ,
x, y ⩾ 0, i.e. X and Y are exponentially distributed with respective pa-
rameters λ + ν and µ + ν.
b) We have

P(X ⩽ x and Y ⩽ y )
= 1 − P(X ⩾ x) − P(Y ⩾ y ) + P(X ⩾ x and Y ⩾ y )
= 1 − e−(λ+ν )x − e−(µ+ν )y + e−λx−µy−ν Max(x,y ) , x, y ⩾ 0.

c) We note that

log u
 
P e−(λ+ν )X ⩽ u = P X ⩾ −

= u,
λ+ν

and similarly

log u
 
P e−(µ+ν )Y ⩾ u = P Y ⩾ − u ∈ [0, 1],

= u,
µ+ν

" 343

This version: April 20, 2025


[Link]
N. Privault

hence the random variables e−(λ+ν )X and e−(µ+ν )Y are uniformly dis-
tributed on [0, 1]. Therefore, a copula function C (u, v ) can be defined by
letting

C (u, v ) := P e−(λ+ν )X ⩽ u and e−(µ+ν )Y ⩽ v




log u log v
 
= P X⩾− and Y ⩾ −
λ+ν µ+ν
−1 log u+µ(µ+ν )−1 log v−ν Max(−(λ+ν )−1 log u,−(µ+ν )−1 log v ))
= eλ(λ+ν )
λ/(λ+ν ) µ/(µ+ν ) −ν Max(−(λ+ν )−1 log u,−(µ+ν )−1 log v ))
= u v e
1/(λ+ν ) ,log v 1/(µ+ν ) ))
= uλ/(λ+ν ) v µ/(µ+ν ) eν min(log u
λ/(λ+ν ) µ/(µ+ν ) log min(uν/(λ+ν ) ,v ν/(µ+ν ) ))
= u v e
= uλ/(λ+ν ) v µ/(µ+ν ) min(uν/(λ+ν ) , v ν/(µ+ν ) )), x, y ⩾ 0.

1
0.8
0.6
1
0.4 0.8
0.2 0.6
0.4 v
0
0 0.2 0.2
0.4 0.6 0.8 1 0
u
Fig. S.3: Exponential copula function u, v 7→ C (u, v ) with λ = 1, µ = 2, ν = 4.

Exercise 4.4
a) We have
1
FX (x) = P(X ⩽ x) = P(X ⩽ x and Y ⩽ ∞) =
1 + e−x
and
1
FY (y ) = P(Y ⩽ y ) = P(X ⩽ ∞ and Y ⩽ y ) = , x, y ∈ R.
1 + e−y
The probability densities are given by

344 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

′ e−x
fX (x) = fY (x) = FX (x) = FY′ (x) = , x ∈ R.
(1 + e−x )2

b) We have

−1 1−u
FX (u) = FY−1 (u) = − log , u ∈ (0, 1),
u
and the corresponding copula is given by
−1
C (u, v ) = F(X,Y ) (FX (u), FY−1 (v ))
1−u 1−v
 
= F(X,Y ) − log , − log
u v
1
=
1 + (1 − u)/u + (1 − v )/v
1
=
1 + (1 − u)/u + (1 − v )/v
uv
= , u, v ∈ [0, 1],
u + v − uv
which is a particular case of the Ali-Mikhail-Haq copula.

Exercise 4.5
a) We show that (X, Y ) have Gaussian marginals N (0, σ 2 ) and N (0, η 2 ),
according to the following computation:
w∞ 1 w∞
1 2 2 (x, y )e−x /(2σ )−y /(2η ) dy
2 2 2 2
fe(x, y )dy =
−∞ πση −∞ R− ∪R+
1 −x2 /(2σ2 ) w0
1 R− ( x )
2 2
= e e−y /(2η ) dy
πση −∞
1 −x2 /(2σ2 ) w∞
1R + ( x )
2 2
+ e e−y /(2η ) dy
πση 0
1 1
= √ e−x /(2σ ) 1R− (x) + √ e−x /(2σ ) 1R+ (x)
2 2 2 2

σ 2π σ 2π
1 2 2
= √ e−x /(2σ ) , x ∈ R.
σ 2π

b) The couple (X, Y ) does not have a joint Gaussian distribution, and its
joint probability density function does not coincide with fΣ (x, y ).
c) When σ = η = 1, for a ⩾ 0 the random variable X + Y has the probability
density function

" 345

This version: April 20, 2025


[Link]
N. Privault

∂ ∂ w ∞ w a−x e
P(X + Y ⩽ a) = f (x, y )dydx
∂a ∂a −∞ −∞
∂ w 0 w a−x e ∂ w ∞ w a−x e
= f (x, y )dydx + f (x, y )dydx
∂a −∞ −∞ ∂a 0 −∞
∂ w0 w0 e ∂ w ∞ w a−x e
= f (x, y )dydx + f (x, y )dydx
∂a −∞ −∞ ∂a 0 0
1 ∂ w a w a−x −x2 /2−y2 /2
= e dydx
π ∂a 0 0
w
1 ∂ a −(a−z )2 /2 z −y2 /2 w
= e e dydz
π ∂a 0 0
1 w a −y2 /2 1 wa 2
wz 2
= e dy − (a − z )e−(a−z ) /2 e−y /2 dydz
π 0 π 0 0
1 w a −y2 /2 1 wa 2
wa 2
= e dy − (a − z )e−(a−z ) /2 dz e−y /2 dy
π 0 π 0 0
1 w a −y2 /2 w y −(a−z )2 /2
+ e e dzdy
π 0 0
1 −a2 /2 w a −y2 /2 1 w a −y2 /2 −(a−y )2 /2 2
= e e dy + e (e − e−a /2 )dy
π 0 π 0
1 2
wa 2 2
= e−a /2 e−y /2−(a−y ) /2 dy
π 0
1 w a −((√2y−a/√2)2 −a2 /2)/2
= e dy
π 0
2 /4 w √
e−a √
a 2 −((y−a/ 2)2 )/2
= √ e dy
π 2 0
√ √
e−a /4 w a( 2−1/ 2) −y2 /2
2

= √ √ e dy
π 2 −a/ 2

e−a /4 w a/ 2 −y2 /2
2

= √ √ √ e dy
π 2π −a/ 2
2 √
= e−a /4 2Φ a/ 2 − 1 , a ⩾ 0,
 

which vanishes at a = 0.

346 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

0.20
0.15
Density
0.10
0.05
0.00

−6 −4 −2 0 2 4 6

Fig. S.4: Density of X + Y .

d) The random variables X and Y are positively correlated, as


w∞ 1 w∞
1 2 2 (x, y )ye−x /(2σ )−y /(2η ) dy
2 2 2 2
yfΣ (x, y )dy =
−∞ πση −∞ R− ∪R+
1 −x2 /(2σ2 ) w∞
1R + ( x )
2 2
= e ye−y /(2η ) dy
πση 0
1 −x2 /(2σ2 ) w0
1 R− ( x )
2 2
+ e ye−y /(2η ) dy
πση −∞
η −x2 /(2σ2 ) η
1R+ (x) − e−x /(2σ ) 1R− (x),
2 2
= e
πσ πσ
hence
w∞ w∞
E[XY ] = xyfΣ (x, y )dydx
−∞ −∞
η w ∞ −x2 /(2σ2 ) η w0 2 2
= xe dx − xe−x /(2σ ) dx
πσ 0 πσ −∞
2ση
= ,
π
and
E[XY ] 2
ρ= = .
ση π
Under a rotation
cos θ − sin θ
 
R= ,
sin θ cos θ
of angle θ ∈ [0, 2π ] we would find

E[(X cos θ − Y sin θ )(X sin θ + Y cos θ )]


= sin θ cos θE X 2 + (cos2 θ − sin2 θ )E[XY ] − sin θ cos θE Y 2
   

" 347

This version: April 20, 2025


[Link]
N. Privault

2ση
= σ 2 sin θ cos θ + (cos2 θ − sin2 θ ) − η 2 sin θ cos θ
π
σ2 2ση η 2
= sin(2θ ) + cos(2θ ) − sin(2θ ),
2 π 2
and
σ 2 η
ρ= sin(2θ ) + cos(2θ ) − sin(2θ ),
2η π 2σ
i.e. θ = π/4 and σ = η would lead to uncorrelated random variables.
e) When σ = η = 1, the random variable X 2 + Y 2 has the cumulative
distribution function
w∞ w∞
P(X 2 + Y 2 ⩽ a) = 1 2 2 fe(x, y )dydx
−∞ −∞ {x +y ⩽a}
w∞w∞
=2 1{x2 +y2 ⩽a} fe(x, y )dydx
0 0
2 w∞w∞ 2 2
= 1 2 2 e−x /2−y /2 dydx
π 0 0 √ {x +y ⩽a}
2 w π/2 w a −r2 /2
= e rdrdθ
π 0 0
w √a 2
= e−r /2 rdr
0
h 2
i √a
= −e−r /2
0
= 1 − e−a/2 , a ⩾ 0,

where we used the change of variables in polar coordinates

r 2 = x2 + y 2 , x = r cos θ, y = r sin θ, dxdy = rdrdθ.

Hence, the random variable X2 + Y 2 has an exponential distribution with


parameter 1/2.
Remark. This is also the distribution of X 2 + Y 2 when X and Y are
independent.

Exercise 4.6
a) We have

P(τi ∧ τ ⩾ s) = P(τi ⩾ s and τ ⩾ s)


= P(τi ⩾ s)P(τ ⩾ s)
= e−λi s e−λs
= e−(λi +λ)s , s ⩾ 0,

348 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

hence τi ∧ τ is an exponentially distributed random variable with param-


eter λi + λ, i = 1, 2.
b) Next, we have

P(τ1 ∧ τ > s and τ2 ∧ τ > t) = P(τ1 > s and τ > s and τ2 > t and τ > t)
= P(τ1 > s and τ2 > t and τ > Max(s, t))
= P(τ1 > s)P(τ2 > t)P(τ > Max(s, t))
= e−λ1 s e−λ2 t e−λ Max(s,t)
= e−λ1 s−λ2 t−λ Max(s,t)
= e−(λ1 +λ)s−(λ2 +λ)t+λ min(s,t)
= (1 − FX (s))(1 − FY (t)) min(eλs , eλt ),

s, t ⩾ 0.
c) We have

FX,Y (s, t) = P(τ1 ∧ τ ⩽ s and τ2 ∧ τ ⩽ t)


= P(τ1 ∧ τ ⩽ s) − P(τ1 ∧ τ ⩽ s and τ2 ∧ τ > t)
= P(τ1 ∧ τ ⩽ s) − P(τ2 ∧ τ > t) − P(τ1 ∧ τ > s and τ2 ∧ τ > t)


= P(τ1 ∧ τ ⩽ s) + P(τ2 ∧ τ ⩽ t) + P(τ1 ∧ τ > s and τ2 ∧ τ > t) − 1


= FX (s) + FY (t) + (1 − FX (s))(1 − FY (t)) min(eλs , eλt ) − 1.

d) We find
−1
C (u, v ) = FX,Y (FX (u), FY−1 (v ))
−1 −1
= FX (FX (u)) + FY (FX (v ))
−1 −1
−1 −1 (u) (v ) 
+(1 − FX (FX (u)))(1 − FY (FX (v ))) min eλFX , eλFX −1
−1
(u) λFY−1 (v )
= u + v − 1 + (1 − u)(1 − v ) min e λFX
,e


= u + v − 1 + (1 − u)(1 − v ) min e−λ log(1−u)/(λ1 +λ) , e−λ log(1−v )/(λ2 +λ)




= u + v − 1 + min (1 − v )(1 − u)1−λ/(λ1 +λ) , (1 − u)(1 − v )1−λ/(λ2 +λ)




= u + v − 1 + min (1 − v )(1 − u)1−θ1 , (1 − u)(1 − v )1−θ2 , u, v ∈ [0, 1],




with
λ λ
θ1 = and θ2 = .
λ1 + λ λ2 + λ

" 349

This version: April 20, 2025


[Link]
N. Privault

1
0.9
0.8
0.7
0.6
0.5
0.4
0.3 1
0.2 0.8
0.1 0.6
0.4 u
0 0 0.2
0.2 0.4 0.6 0.8 0
v 1

Fig. S.5: Survival copula graph with θ1 = 0.3 and θ2 = 0.7.

e) We have

C (u, v ) = u + v − 1 + (1 − u)(1 − v )1−θ2 1{(1−u)θ1 <(1−v )θ2 }


+(1 − v )(1 − u)1−θ1 1{(1−u)θ1 >(1−v )θ2 } , u, v ∈ [0, 1],

hence
∂C
(u, v ) = −(1 − v )1−θ2 1{(1−u)θ1 <(1−v )θ2 }
∂u
−(1 − θ1 )(1 − v )(1 − u)−θ1 1{(1−u)θ1 >(1−v )θ2 }

and the survival copula density is given by

∂2C
(u, v ) = (1 − θ2 )(1 − v )−θ2 1{(1−u)θ1 <(1−v )θ2 }
∂u∂v
+(1 − θ1 )(1 − u)−θ1 1{(1−u)θ1 >(1−v )θ2 } , u, v ∈ [0, 1],

350 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

3.5
3
2.5
2
1.5 1
1 0.8
0.6
0.5 0.4 u
0.2
0 0 0.2 0.4 0
0.6 0.8 1
v

Fig. S.6: Survival copula density graph with θ1 = 0.3 and θ2 = 0.7.

Remark: When λ = 0 we have θ1 = θ2 = 0 and τ = +∞ a.s., therefore


we have
min(τ1 , τ ) = τ1 and min(τ2 , τ ) = τ2 ,
hence the copula C (u, v ) is given by

C (u, v ) = u + v − 1 + (1 − v )(1 − u) = uv, u, v ∈ [0, 1],

which coincides with the copula of independence.

Chapter 5

Exercise 5.1 The payoff C is that of a put option with strike price K = $3.

Exercise 5.2 Each of the two possible scenarios yields one equation:

5ξ + η = 0
( (
ξ = −2
with solution
2ξ + η = 6, η = +10.

The hedging strategy at t = 0 is to shortsell −ξ = +2 units of the asset


S priced S0 = 4, and to put η = $10 on the savings account. The price
V0 = ξS0 + η of the initial portfolio at time t = 0 is

V0 = ξS0 + η = −2 × 4 + 10 = $2,

which yields the price of the claim at time t = 0. In order to hedge then
option, one should:
i) At time t = 0,
a. Charge the $2 option price.

" 351

This version: April 20, 2025


[Link]
N. Privault

b. Shortsell −ξ = +2 units of the stock priced S0 = 4, which yields $8.


c. Put η = $8 + $2 = $10 on the savings account.
ii) At time t = 1,
a. If S1 = $5, spend $10 from savings to buy back −ξ = +2 stocks.
b. If S1 = $2, spend $4 from savings to buy back −ξ = +2 stocks, and
deliver a $10 - $4 = $6 payoff.
Pricing the option by the expected value E∗ [C ] yields the equality

$2 = E∗ [C ]
= 0 × P∗ (C = 0) + 6 × P∗ (C = 6)
= 0 × P∗ (S1 = 2) + 6 × P∗ (S1 = 5)
= 6 × q∗ ,

hence the risk-neutral probability measure P∗ is given by


2 1
p∗ = P∗ (S1 = 5) = and q ∗ = P∗ (S1 = 2) = .
3 3

Exercise 5.3
a) Each of the stated conditions yields one equation, i.e.

4ξ + η = 1 ξ=2
( (
with solution
5ξ + η = 3, η = −7.

Therefore, the portfolio allocation at t = 0 consists to purchase ξ = 2 unit


of the asset S priced S0 = 4, and to borrow −η = $7 in cash.

We can check that the price V0 = ξS0 + η of the initial portfolio at time
t = 0 is
V0 = ξS0 + η = 2 × 4 − 7 = $1.
b) This loss is expressed as

ξ × $2 + η = 2 × 2 − 7 = −$3.

Note that the $1 received when selling the option is not counted here be-
cause it has already been fully invested into the portfolio.

Exercise 5.4
a) i) Does this model allow for arbitrage? Yes | ✓ No |

352 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

ii) If this model allows for arbitrage opportunities, how can they be real-
ized? By shortselling | By borrowing on savings | ✓ N.A. |

b) i) Does this model allow for arbitrage? Yes | No | ✓

ii) If this model allows for arbitrage opportunities, how can they be real-
ized? By shortselling | By borrowing on savings | N.A. | ✓

c) i) Does this model allow for arbitrage? Yes | ✓ No |

ii) If this model allows for arbitrage opportunities, how can they be real-
ized? By shortselling | ✓ By borrowing on savings | N.A. |

Exercise 5.5 Hedging a claim with possible payoff values Ca , Cb , Cc would


require to solve
(1) (0)




(1 + a)ξS0 + (1 + r )ηS0 = Ca

(1) (0)

(1 + b)ξS0 + (1 + r )ηS0 = Cb

(1) (0)

(1 + c)ξS0 + (1 + r )ηS0 = Cc ,

for ξ and η, which is not possible in general due to the existence of three
conditions with only two unknowns.

Exercise 5.6
a) Each of two possible scenarios yields one equation:

S1 − K

α = S −S
( 

αS 1 + β = S 1 − K

1 1
with solution
αS 1 + β = 0,  S 1 −K
 β = −S 1 .


S1 − S1

b) We have
S1 − K
0⩽α= ⩽1
S1 − S1
since K ∈ [S 1 , S 1 ].
c) We find

SRMC = αS0 + β
= α(S0 − S 1 )

" 353

This version: April 20, 2025


[Link]
N. Privault

S1 − K
= (S0 − S 1 ) .
S1 − S1

We note that when S0 < S 1 the value of SRMC is negative because in


this case, investing in the zero-cost portfolio (α, −αS0 ) that would yield a
payoff at least equal to α(S 1 − S0 ) = −α(S 0 − S1 ) > 0, which represents
an arbitrage opportunity.

Exercise 5.7
a) The payoff of the long box spread option is given in terms of K1 and K2
as

(x − K1 )+ − (K1 − x)+ − (x − K2 )+ + (K2 − x)+ = x − K1 − (x − K2 )


= K2 − K1 .

b) From Table 5.1 we check that the strike prices suitable for a long box
spread option on the Hang Seng Index (HSI) are K1 = 25, 000 and K2 =
25, 200.
c) Based on the data provided, we note that the long box spread can be
realized in two ways.
i) Using the put option issued by BI (BOCI Asia Ltd.) at 0.044.
In this case, the box spread option represents a short position priced

| {z } ×7, 500 −0.064


0.540 ×8, 000 −0.370 ×11, 000 +0.044 ×10, 000 = −92
| {z } | {z } | {z }
Long call Short put Short call Long put

index points, or −92 × $50 = −$4, 600.


Note that option prices are quoted in index points (to be multiplied
by the relevant option/warrant entitlement ratio), and every index
point is worth $50.
ii) Using the put option issued by HT (Haitong Securities) at 0.061.
In this case, the box spread option represents a long position priced

0.540
| {z } ×7, 500 −0.044 ×8, 000 −0.370 ×11, 000 +0.061 ×10, 000 = +78
| {z } | {z } | {z }
Long call Short put Short call Long put

index points, or 78 × $50 = $3, 900.


d) As the option built in i)) represents a short position paying $4, 600 today
with an additional $50 × (K2 − K1 ) = 200 = $10, 000 payoff at maturity
on March 28, I would definitely enter this position.

354 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

As for the option built in ii)), it is less profitable because it costs $3, 900,
however it is still profitable taking into account the $10, 000 payoff at
maturity on March 28.

Exercise 5.8
a) At times t = 0, 1, the value of the quantity Xt of asset X quoted in units
of Y is
Xt St = Yt ,
and we have p
LPt = Yt + Xt St = 2Yt = 2 CSt .
We note that in the CPAMM model, the dollar amounts in X and Y
remaining in the pool at times t = 0, 1 are both equal to Yt = CSt .
b) We have
 
p St
Vt = Y0 + X0 St = CS0 1 + , t = 0, 1.
S0

c) We have
  r !2
p St p p St
Vt − LPt = CS0 1 + − 2 CSt = CS0 1− ⩾ 0, t = 0, 1.
S0 S0

d) We need to satisfy the conditions

V1 − LP1 = ξ|a − S0 | if S1 = a,
(

V1 − LP1 = ξ|b − S0 | if S1 = b,

i.e.   r 2  
p
 CS0 1 − a a
= ξ 1− if S1 = a,

S0 S0



r !2  
 p b b
 CS0 1 − −1 if S1 = b,

 =ξ
S0 S0

hence √ √
p (1 − a/S0 )2 p ( b/S0 − 1)2
ξ= CS0 = CS0 .
1 − a/S0 b/S0 − 1

" 355

This version: April 20, 2025


[Link]
N. Privault

Chapter 6

Exercise 6.1
a) The expected value premium principle (6.2) is a coherent risk measure
due to the linearity property of expectation.
b) The standard deviation premium principle (6.3) is subadditive due to
Lemma 6.18, and it satisfies the positive homogeneity and translation
invariance properties. However, it is not a coherent risk measure because
it is not monotone.

Exercise 6.2
a) We have

FX ( x ) = P ( X ⩽ x )
wx
= fX (y )dy
0
wx 1
= γθγ dy
0 (θ + y )γ +1
  γ x
θ
= −
θ+y
 γ 0
θ
= 1− , x ∈ R+ .
θ+x

b) Since the distribution of X admits a probability density function, the


cumulative distribution function x 7−→ FX (x) is continuous in x and we
have P(X = x) = 0 for all x > 0. Hence the Value at Risk VXp at the level
p is given by the relation FX (VXp ) = p, i.e.
 γ
θ
= 1 − p,
θ + VXp

which gives
1
 
VXp = θ −1 .
(1 − p) 1/γ

In particular, with p = 99%, θ = 40 and γ = 2, we find



VXp = ((1 − p)−1/γ − 1)θ = 40 100 − 1 = $360.


356 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

1 0.05

p=0.9

0.8 0.04

0.6 0.03
FX(x)

fX(x)
0.4 0.02

0.2 0.01

Vxp
0 0
0 100 200 300 400 500 0 Vxp 100 200 300 400 500
x x

Fig. S.7: Pareto CDF x 7→ FX (x) and PDF x 7→ fX (x) with 99%
VX = $86.49.

Exercise 6.3
a) We have P(X = 100) = 0.02.
b) We have VXq = 100 for all q ∈ [0.97, 0.99].
c) The value at risk VXq at the level q ∈ [0.99, 1] satisfies

FX (VXq ) = P(X ⩽ VXq ) = 0.99 + 0.01 × (VXq − 100)/50 = q,

hence

VXq = 100 + 50(100q − 99) = 5000q − 4850, q ∈ [0.99, 1].

Exercise 6.4 We find VX99% = 100 according to the following cumulative


distribution function:

FX (x)
1.00
0.99
0.98
0.97
0.96
0.95
0.94
0.93
0.92
0.91
0.90
0.89
0.88
0.87

0 x
−20 −10 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160

Fig. S.8: Cumulative distribution function of X and Y .

Exercise 6.5
a) We have
1 1
VXp := inf x ∈ R : P(X ⩽ x) ⩾ p = − log(1 − p) = E[X ] log .

λ 1−p

" 357

This version: April 20, 2025


[Link]
N. Privault

When p = 95% this yields

VXp ≃ 2.996E[X ].

b) We find that the required capital CX satisfies


1
CX = VXp − E[X ] = E[X ] log − E[X ],
1−p
i.e.
CX = VX95% − E[X ] ≃ 1.996E[X ],
which means doubling the estimated amount of liabilities.

Exercise 6.6 By Proposition 6.2 and the geometric series identity (13.53), we
have
1
E[X | X ⩾ a] = E X 1{X ⩾a}
 
P(X ⩾ a)
1 X
= kP(X = k )
P(X ⩾ a)
k ⩾a
1 X
= X k (1 − p)k
(1 − p) k
k⩾a
k⩾a
(1 − p)a X
= X (k + a)(1 − p)k
(1 − p) a
(1 − p) k⩾0
k

k⩾0
1 X
= a+ X k (1 − p)k
(1 − p) k
k ⩾0
k⩾0
X
= a+p k (1 − p)k
k ⩾0
1
= a+
p
= a + E[X ].

This can be recovered numerically for example with a = 11 using the code
below.

358 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

geo_samples <- rgeom(100000, prob = 1/4)


mean(geo_samples)
mean(geo_samples[geo_samples>=10])

Exercise 6.7
a) As in the proof of the Markov inequality, for every x > 0 and r > 0 we
have

xr P(X ⩾ x) = xr E 1{X ⩾x}


 

⩽ E X r 1{X ⩾x}
 

⩽ E [|X|r ] ,

hence
1
P(X ⩽ x) ⩾ 1 − E[|X|r ], x > 0. (A.1)
xr
From the inequality (A.1), it follows that

VXp = inf x ∈ R : P(X ⩽ x) ⩾ p




1
⩽ inf x ∈ R : 1 − r E[|X|r ] ⩾ p

x
1
 
= inf x ∈ R : xr ⩾ E[|X|r ]
1−p
E[|X|r ] 1/r
 
=
1−p
∥X∥Lr (Ω)
= .
(1 − p)1/r

b) Taking p = 95% and r = 1 we get


1
VX95% ⩽ E[|X|] = 20E[|X|].
1−p
To summarize, a smaller Lr -norm of X tends to make the value at risk
VX smaller.

Exercise 6.8

" 359

This version: April 20, 2025


[Link]
N. Privault

See the attached code∗ for a solution using R.


a) i) VaR95
Ac-H = 5.
ii) VaR80
Ac-H = 4.
iii) VaR95
Pr-H = −3.
iv) VaR80
Pr-H = −2.
b) By Proposition 6.17, we have:
i) VaR95
Ac-G = 1.15+3.048× qnorm(0.95)=6.164,
ii) VaR80
Ac-G = 1.15+3.048× qnorm(0.80)=3.71551,
iii) VaR95
Pr-G = 1.15-3.048× qnorm(0.95)=-3.864.
iv) VaR80
Pr-G = 1.15-3.048× qnorm(0.80)=-1.41551,

Remark. The “Practitioner” Values at Risk can be better visualized after ap-
plying top-down and left-right symmetries (or a 180o rotation) to the original
CDF, as in the next figure.



Right-click to save as attachment (may not work on .

360 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

Chapter 7

Exercise 7.1
p
a) Noting that p = 1 − e−λVaRX and using integration by parts on VaRpX , ∞
 

with u(x) = x and v (x) = e


′ −λx , we have
1 w∞
E[X | X > VaRpX ] = p xfX (x)dx
P(X > VaRX ) VaRpX
λ w∞
= xe−λx dx
1 − p VaRpX
λ w∞
= u(x)v ′ (x)dx
1 − p VaRpX
λ

∞ w∞ 


= u(x)v (x) VaRp − p u (x)v (x)dx
1−p X VaRX
1 w∞
h 
λ x −λx i∞ −λx
= − e + p e dx
1−p λ p
VaRX λ VaRX
VaRpX −λVaRp 1 −λVaRp
 
λ
= e X + e X
1−p λ λ2

VaRpX 1−p
 
λ
= (1 − p) + 2
1−p λ λ
p 1
= VaRX +
λ
1 log(1 − p)
= − .
λ λ
b) We have
1 w1 q
TVpX = V dq
1−p p X
1 w1
= − log(1 − q )dq
λ(1 − p) p
1 w 1−p
= − (log q )dq
λ(1 − p) 0
1
1 − p + (1 − p) log
1−p
=
λ(1 − p)
1 1 1
= + log
λ λ 1−p
1
 
= E[X ] 1 + log
1−p

" 361

This version: April 20, 2025


[Link]
N. Privault

= E[X ] + VXp .

Exercise 7.2
a) We have
E X 1{X ⩾z} ⩾ E z 1{X ⩾z} = zP(X ⩾ z ),
   

hence
E X 1{X ⩾z}
 
E[X | X ⩾ z ] = ⩾ z. (A.2)
P(X ⩾ z )
Recall that E[X | X ⩾ z ] is undefined if P(X ⩾ z ) = 0.
b) Using (A.2), we have

E[X ] = E X 1{X<z} + E X 1{X ⩾z}


   

⩽ zE 1{X<z} + E X 1{X ⩾z}


   

= zP(X < z ) + E X 1{X ⩾z}


 

⩽ E[X | X ⩾ z ]P(X < z ) + E[X | X ⩾ z ]P(X ⩾ z )


= E[X | X ⩾ z ].

Note that E[X ] = E[X | X ⩾ z ] when P(X < z ) = 0, i.e. P(X ⩾ z ) = 1.


c) If P(X > z ) > 0 we have E (X − z )1{X>z} > 0, hence
 

E X 1{X>z} > E z 1{X>z} = zP(X > z ),


   

and
E X 1{X>z}
 
E[X | X > z ] = > z. (A.3)
P(X > z )
Recall that E[X | X > z ] is undefined if P(X > z ) = 0.
d) Using (A.3), we have

E[X ] = E X 1{X ⩽z} + E X 1{X>z}


   

⩽ zE 1{X ⩽z} + E X 1{X>z}


   

= zP(X ⩽ z ) + E X 1{X>z}
 

⩽ E[X | X > z ]P(X ⩽ z ) + E[X | X > z ]P(X > z )


= E[X | X > z ].

Note that E[X ] = E[X | X > z ] when P(X ⩽ z ) = 0, i.e. P(X > z ) = 1.
e) We have P(X ⩾ z ) = P(X > z ), and

362 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

E X 1{X>z}
 
E[X | X > z ] =
P(X > z )
E X 1{X ⩾z} − zP(X = z )
 
=
P(X ⩾ z )
E X 1{X ⩾z}
 
=
P(X ⩾ z )
= E[X | X > z ].

f) Using (A.3), we have

E X 1{X ⩾z}
 
E[X | X ⩾ z ] =
P(X ⩾ z )
E X 1{X>z} + zP(X = z )
 
=
P(X > z ) + P(X = z )
E X 1{X>z} + P(X = z )E X 1{X>z} /P(X > z )
   
<
P(X > z ) + P(X = z )
E X 1{X>z}
 
=
P(X > z )
= E[X | X > z ].

g) When P(X ⩽ z ) > 0, from (A.3) we find

E[X ] ⩽ zP(X ⩽ z ) + E X 1{X>z}


 

< E[X | X > z ]P(X ⩽ z ) + E[X | X > z ]P(X > z )


= E[X | X > z ].

h) By (6.10) we have P X ⩽ VXp ⩾ p > 0, hence by (g)) above we find



p p
CTEX = E X X > VX > E[X ].


Exercise 7.3
a) We have VaR0.9
X = 4 and CTEX = 6.
0.9

" 363

This version: April 20, 2025


[Link]
N. Privault

b) We have VaR0.8
X = 2 and

3+2×4+6 17
CTE0.8
X = = = 4.25.
4 4

Equivalently, we have
0.05 × 3 + 0.1 × 4 + 0.05 × 6
CTE0.8
X =
0.05 + 0.1 + 0.05
0.05 × 3 + 0.1 × 4 + 0.05 × 6
=
0.2
0.85
= = 4.25.
0.2

Exercise 7.4
a) VaR90%
X = 4.
5+6 11
b) E X 1{X>V 90% } = = .
 
X 23 23
2
c) P X > VX90% = .

23

364 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

E X 1{X>V 90% }
 
5+6 11
d) CTE90% = E X | X > VX 90%
= 5.50.
  X
=  = =
X
P X > VX90% 2 2
4+5+6 15
e) E X 1{X ⩾V 90% } = = .
 
X 23 23
3
f) P X ⩾ VX90% = .

23
1
g) ES90% E X 1{X ⩾V 90% } + VX90% 1 − p − P X ⩾ VX90% = 10 ×
  
=
X 1−p X
4+5+6 3 150 2.3 − 3 150 − 40 × 0.7
 
+ 10 × 4 0.1 − = + 40 × = =
23 23 23 23 23
122
= 5.304.
23
1 w1 q
w w 22/23 w1
1

21/23 q q q
h) TV90% = V dq = V dq + V dq + V dq
w1 − p p 1−p
X X p X 21/23 X 22/23 X
1 21/23 w 22/23 w1 
= 4dq + 5dq + 6dq
1 − p  p  21/23  22/23
1 21 5 6 84 − 92p + 5 + 6 122
= 4 −p + + = = = 5.304.
1−p 23 23 23 23(1 − p) 23
We note that ES90%
X = TV90%
X according to Proposition 7.12. The attached
code computes the above risk measures, as illustrated in Figure S.9.

> source("var-cte_quiz.R")
VaR90= 4, Threshold= 0.9130435
CTE90= 5.5
ES90= 5.304348

Fig. S.9: Value at Risk and Expected Shortfall for small data.

Exercise 7.5

" 365

This version: April 20, 2025


[Link]
N. Privault

a) The value at risk is VX98% = 100.

FX (x)

1.00
0.99
p= 0.98

0.97
0.96

x
−20 −10 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160

Fig. S.10: Cumulative distribution function of X.

b) Taking p = 0.98, we have


1 w1 q
TV98% = V dq
X 1−p p X
1
= ((0.99 − 0.98) × 100 + (1 − 0.99) × 150) = 125.
0.02
c) We have
1 h i
CTE98% = E X 1{X>V p }
X
P(X > VXp ) X

1
= × 150 × 0.01 = 150.
0.01
d) We have

1 h i Vp
ES98% = E X 1{X ⩾V p } + X (1 − p − P(X ⩾ VX ))
X 1−p X 1−p
1 100
= (100 × 0.03 + 150 × 0.01) + (0.02 − (0.03 + 0.01))
0.02 0.02
4.5 100
= + (0.02 − (0.03 + 0.01)) = 125.
0.02 0.02
Note that we also have
1 h i Vp
ES98% = E X 1{X>V p } + X (1 − p − P(X > VX ))
X 1−p X 1−p
1 100
= ( 150 × 0.01 )+ (0.02 − 0.01)
0.02 0.02
= 125,

366 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

hence the Expected Shortfall ES98%


X does coincide with the tail value at
risk T VX98% .

Exercise 7.6
a) The cumulative distribution function of X is given by the following graph:

FX (x)
1.02
1.00
0.98
0.96
0.94
0.92
0.90
0.88
0 x
−20 −10 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210

Fig. S.11: Cumulative distribution function of X.

b) The distribution of X + Y is given by

P(X + Y = 0) = 81%, P(X + Y = 100) = 18%, P(X + Y = 200) = 1%.

The cumulative distribution function of X + Y is given by the following


graph:

FX+Y (x)
1.00
0.98
0.96
0.94
0.92
0.90
0.88
0.86
0.84
0.82
0.80
0 x
−20 −10 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210

Fig. S.12: Cumulative distribution function of X + Y .

c) We have VX99%
+Y = VX +Y = VX +Y = 100.
95% 90%

Note that we have VX99%


+Y = 100 because

VX99% = inf{x ∈ R : P(X ⩽ x) ⩾ 0.99} = 100.

d) We have
1 w1 1 − 0.9
TV90% = V q dq = 100 × = 100.
X 1 − 0.9 0.9 X 1 − 0.9
e) We have

" 367

This version: April 20, 2025


[Link]
N. Privault

1 w1
TV99%
X +Y = V q dq
1 − 0.9 0.9 X +Y
w w1
1

0.99
= 100dq + 200dq
0.1 0.9 0.99
1
= (100 × 0.09 + 200 × 0.01)
0.1
= 110,

and
1 w1
TV80%
X +Y = V q dq
1 − 0.8 0.9 X +Y
1 w 0.81 w 0.99 w1
 
= 0dq + 100dq + 200dq
0.2 0.8 0.81 0.99
1
= (100 × 0.18 + 200 × 0.01) = 100.
0.2

Exercise 7.7 (Exercise 6.3 continued).


a) For all p ∈ [0.99, 1] we have
1 w1 q
TVpX = V dq
1−p p X
1 w 1
= (5000q − 4850)dq
1−p p
1 (1 − p2 )
 
= 5000 − (1 − p)4850
1−p 2
= 2500p − 2350.

In particular,

TV99%
X = 2500 × 0.99 − 2350 = 125 ⩾ VX99% = 100.

b) We have VX98% = 100 and

CTE98% = E X | X > VX98%


 
X
1 h i
=  E X 1{X>V 98% }
P X > VX98% X

1 w∞
= xfX (x)dx
0.01 100
1 w ∞ dFX (x)
= x dx
0.01 100 dx

368 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

1 0.01 w 150
= xdx
0.01 50 100
150 − 100
2 2
=
2 × 50
= 125.

Note that
0.01 1 (1 − 0.992 )
 
TV98% = × 100 + 5000 − 0.01 × 4850
X 0.02 0.02 2
= 112.50
⩾ VX98% = 100,

which differs from CTE98%


X = 125 since

P X = VX98% = P(X = 100) = 0.02 > 0.




Exercise 7.8
a) We have
p
VXp := inf x ∈ R : P(X ⩽ x) ⩾ p = log .

1−p

b) We have
1 w∞
E[X | X > VaRpX ] = xfX (x)dx
P(X > VaRpX ) VaRpX
1 w∞
= xe−λx dx
1 − p VaRpX
1 w∞ xe−x
= dx
1 − p VaRpX (1 + e−x )2
p
1 p VaRpX eVaRX
= log(1 + eVaRX ) − p
1−p 1 + eVaRX
1 1 1
 
p p p
= log 1 + − p log
1−p 1−p 1 − p 1 − p 1 + 1−p 1−p
1 1 p p
= log − log
1−p 1−p 1−p 1−p
p
=− log p − log(1 − p).
1−p

c) We have

" 369

This version: April 20, 2025


[Link]
N. Privault

1 w1 q
TVpX = V dq
1−p p X
1 w1 q
= log dq
1−p p 1−q
1 w1 1 w1
= log qdq − log(1 − q )dq
1−p p 1−p p
1 w1 1 w 1−p
= log qdq − log qdq
1−p p 1−p 0
1 w 1 1
w
1 w1 
= log qdq − log qdq − log qdq
1−p p 1−p 0 1−p
p − 1 − p log p −1 + p + (1 − p) log(1 − p)
= −
1−p 1−p
p
= − log p − log(1 − p).
1−p

Exercise 7.9
a) We have
 w∞
qP(Z ⩾ q ) = E q 1{Z ⩾q} ⩽ E Z 1{Z ⩾q} = q ⩾ 0.
  
xfZ (x)dx,
q

b) We have
w∞ w∞
xfZ (x)dx = xϕ(x)dx
q q
1 w ∞ −x2 /2
= √ xe dx
2π q
1 h −x2 /2 i∞
= −√ e
2π q
1 −q2 /2
= √ e

= ϕ(q ), q ⩾ 0,

and 1 − p = P(Z ⩾ q ), hence


w∞
(1 − p)q ⩽ xfZ (x)dx = ϕ(q ), q ⩾ 0.
q

p p
c) Taking q := qZ with 1 − p = P(Z ⩾ qZ ), we recover
σX
VXp = µX + σX qZ
p
⩽ µX + p
ϕ ( qZ ) = CTEpX ,
1−p

370 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

see Proposition 7.5.

Chapter 8
Exercise 8.1 By differentiation of (8.2), i.e.

P(τ < T | Ft ) := P(ST < K | Ft )


(µ − σ 2 /2)(T − t) + log(St /K ))
 
= Φ − √ , T ⩾ t,
σ T −t
with respect to T , we find

σ2 log(St /K )
 
dT
dP(τ ⩽ T | Ft ) = −µ+
2σ 2π (T − t) 2
p
T −t
2 !
(µ − σ 2 /2))(T − t) + log(St /K ))
× exp − ,
2(T − t)σ 2

provided that µ < σ 2 /2.

Exercise 8.2 Consider the first hitting time

τK := inf{u ⩾ t : Su ⩽ K}

of the level K > 0 starting from St > K. By Lemma 15.1 in Privault (2022),
we have  2r/σ2
K
E∗ e−(τK −t)r Ft = ,
 
St
provided that St ⩾ K.

Exercise 8.3
a) We have
 q q 
E[Xk Xl ] = E (ak M + 1 − a2k Zk )(al M + 1 − a2l Zl )
 q q q q 
= E ak al M 2 + ak M 1 − a2l Zl + al M 1 − a2k Zk + 1 − a2k 1 − a2l Zk Zl
q q
= ak al E M 2 + ak 1 − a2l E[Zl M ] + al 1 − a2k E[Zk M ]
 
q q
+ 1 − a2k 1 − a2l E[Zk Zl ]

" 371

This version: April 20, 2025


[Link]
N. Privault

q q
= ak al E M 2 + ak 1 − a2l E[Zl ]E[M ] + al 1 − a2k E[Zk ]E[M ]
 
q q
+ 1 − a2k 1 − a2l 1{k=l}
= ak al + (1 − a2k )1{k=l}
= 1{k=l} + ak al 1{k̸=l} , k, l = 1, 2, . . . , n,

b) We check that the vector (X1 , . . . , Xn ), with covariance matrix (8.11) has
the probability density function

φ ( x1 , . . . , xn )
2
n w ∞ − (x1 −a1 m ) (x −a m)2 −m2 /2
1 Y 2 − n n2 e
= (1 − a2k )−1/2 e 2(1−a1 ) · · · e 2(1−an ) √ dm
(2π ) n/2
k =1
−∞ 2π

which is jointly Gaussian, with marginals given by


w∞ w∞
xk 7−→ ··· φ(x1 , . . . , xn )dx1 · · · dxk−1 dxk+1 · · · dxn
−∞ −∞
(xk −ak m)2
1 w∞ − 2
e−m /2
2(1−a2 )
= q e k √ dm
2π (1 − a2k ) −∞ 2π
(xk −ak m)2
1 w∞ − −m2 /2
2(1−a2 )
= q e k dm
−∞
2π 1 − a2k
x2 −2ak xk m+m2
1 w∞ − k
2(1−a2 )
= q e k dm
−∞
2π 1 − a2k
(m−ak xk ) 2
e−xk /2 w ∞ − 2(1−a2 )
2

= q e k dm
2π 1 − a2k −∞
1 2
= √ e−xk /2 , xk ∈ R.

c) We have
n 2
w ∞ − (x1 −a1 m ) (x −an m)2 −m2 /2
1 Y
2(1−a2 )
− n e
φ(x1 , . . . , xn ) = (1 − a2k )−1/2 e 1 ···e 2(1−a2
n) √ dm
(2π ) n/2 −∞ 2π
k =1
 
n x2 +a2 m2 −2x1 a1 m x2 +a2 m2 −2xn an m
1 w∞ 1
−2 1 1 +···+ n n + m2 dm
1−a2 1−a2
Y
= (1 − a2k )−1/2 e 1 n √
(2π )n/2 −∞ 2π
k =1

372 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

 
1 x2 x2 n
1 n
1 −2
1−a2
+···+
1−a2
Y
= √ e 1 n (1 − a2k )−1/2
(2π )n/2 2π
k =1
   
2 a2 a2 x 1 a1
w∞ − m2 1+ 1 +···+ n +2m +···+ xn an2
1−a2 2 2(1−a2 ) 2(1−an )
e
1−an
1 1 dm
−∞
 
x2 x2
2 
 
−1 1 +···+ n2 1 x1 a1 xn an
2 1−a2 +···+
e
1−an
1 2 1−a2 1−a2n
= p exp  1 
a2 a2
(2π )n (1 − a21 ) · · · (1 − a2n )

1+ 1
1−a2
+···+ n
1−a2
1 n
 −1/2
a21 a2n
× 1+ +···+
1 − a21 1 − a2n
 
x2 x2
−1 1 +···+ n 2 !
2 1−a2 1−a2

e 1 n 1 x1 a1 xn an
= p exp +···+
(2π )n α2 (1 − a21 ) · · · (1 − a2n ) 2α2 1 − a21 1 − a2n
 
x2 x2
−1 1 +···+ n 2 !
2 1−a2 1−a2

e 1 n 1 x1 a1 xn an
= p exp +···+
(2π )n α2 (1 − a21 ) · · · (1 − a2n ) 2α2 1 − a21 1 − a2n
    
x2 a2 x2 2
an
−1 1 1− 1 +···+ n 1− !
2 1−a2 α2 (1−a2 ) 1−a2 α2 (1−a2
n)
e 1 1 n 1 X xp xl ap al
= exp
2α2 (1 − a2p )(1 − a2l )
p
(2π )n α2 (1 − a21 ) · · · (1 − a2n ) 1⩽p̸=l⩽n
1 1 −1
= p e− 2 ⟨x,Σ x⟩
,
(2π )n det Σ

where
a21 a2n
α2 : = 1 + +···+ ,
1 − a21 1 − a2n
and
α2 (1−a21 )−a21
 
−a1 a2 −a1 an
(1−a21 )2 (1−a21 )(1−a22 )
··· (1−a21 )(1−a2n )

..


α2 (1−a22 )−a22 .. 
 −a2 a1 . .

 (1−a22 )(1−a21 ) (1−a22 )2 
1  .. .. .. ..
 
Σ−1 . . .

= 2 . .
α  ..

 .. α2 (1−a2n−1 )−a2n−1 −an−1 an

 . . 
 (1−a4n−1 ) (1−a2n−1 )(1−a2n ) 
..
 
−an an−1 α2 (1−a2 )−a2
−an a1 .
 
n n
(1−a2n )(1−a21 ) (1−a2n )(1−a2n−1 ) (1−a2n )2

Exercise 8.4 We have

" 373

This version: April 20, 2025


[Link]
N. Privault

1 a1 a2
 
Σ= ,
a2 a1 1
and letting

a21 a22
α2 : = 1 + +
1 − a21 1 − a22
(1 − a21 )(1 − a22 ) + a21 (1 − a22 ) + a22 (1 − a21 )
=
(1 − a21 )(1 − a22 )
1 − a22 a21
= ,
(1 − a21 )(1 − a22 )

we find
 α2 (1−a2 )−a2 
1 
1
(1−a21 )2
1
− (1−aa21)(a1−a2
2)
Σ−1 = 1
α2 (1−a22 )−a22
2 
α2 − a2 a1
(1−a22 )(1−a21 ) (1−a22 )2
(1−a22 )a21
 2   
1  1−a21 1 − 1−a22 a21
α
− (1−aa21)(a1−a
2
2)
=  1 2
(1−a2 )a2

α2 − (1−aa22)(a1−a
1 α2
1 − 1−a12 a22
2) 1−a22
2 1 2 1
α2
 
1  1−a22 a21
− (1−aa21)(a1−a2
2)
= a2 a1
1
α2
2 
α2 −
(1−a22 )(1−a21 ) 1−a22 a21
α2
 
(1 − a21 )(1 − a22 )  1−a22 a21
− (1−aa21)(a1−a
2
2)
= 1
α2
2 
1 − a22 a21 − (1−aa22)(a1−a
1
2)
2 1 1−a22 a21
α2
 
1  1−a22 a21
− (1−aa21)(a1−a2
2)
= a2 a1
1
α2
2 
α2 −
(1−a22 )(1−a21 ) 1−a22 a21
1 1 −a1 a2
 
= .
1 − a2 a1
2 2 −a a
1 2 1

In particular, the case n = 2 is able to recover all two-dimensional copulas


by setting the correlation coefficient ρ = a1 a2 . In the general case, Σ is
parametrized by n numbers, which offers less degrees of freedom compared
with the joint Gaussian copula correlation method which relies on n(n − 1)/2
coefficients, see also Exercise 8.3.

374 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

Chapter 9

Exercise 9.1 By absence of arbitrage we have (1 − α)erd T = erT , hence


α = 1 − e(r−rd )T .

Exercise 9.2
a) The bond payoff 1{τ >T −t} is discounted according to the risk-free rate,
before taking
 expectation.
b) We have E 1{τ >T −t} = e−λ(T −t) , hence Pd (t, T ) = e−(λ+r )(T −t) .

1
c) We have PM (t, T ) = e−(λ+r )(T −t) , hence λ = −r − log PM (t, T ).
T −t

Exercise 9.3
a) We have
wt
(1)
rt = −a rs ds + σBt , t ⩾ 0,
0
hence
wt 1 (1) 
rs ds = σB − rt
0 a t
σ wt 
(1) (1)
= Bt − e−(t−s)a dBs
a 0
σ wt −(t−s)a (1)
= (1 − e )dBs ,
a 0
and
wT wT wt
rs ds = rs ds − rs ds
t 0 0
σ wT (1) σ wt (1)
= (1 − e−(T −s)a )dBs − (1 − e−(t−s)a )dBs
a 0 a 0
σ w t −(T −s)a wT 
(1) (1)
= − (e − e−(t−s)a )dBs + (e−(T −s)a − 1)dBs
a 0 t
σ −(T −t)a wt σ w T −(T −s)a
−(t−s)a (1) (1)
= − (e − 1) e dBs − (e − 1)dBs
a 0 a t
1 w
σ T −(T −s)a (1)
= − (e−(T −t)a − 1)rt − (e − 1)dBs .
a a t
The answer for λt is similar.
b) As a consequence of the answer to the previous question, we have
w wT 
T
E rs ds + λs ds Ft = C (a, t, T )rt + C (b, t, T )λt ,
t t

" 375

This version: April 20, 2025


[Link]
N. Privault

and
w wT 
T
Var rs ds +λs ds Ft
t t
w  w 
T T
= Var rs ds Ft + Var λs ds Ft
t t
w wT 
T
+2 Cov Xs ds, Ys ds Ft
t t

σ 2 w T −(T −s)a
= 2 (e − 1)2 ds
a t
w
ση T −(T −s)a
+2ρ (e − 1)(e−(T −s)b − 1)ds
ab t
η 2 w T −(T −s)b
+ 2 (e − 1)2 ds
b t
wT wT
= σ2 C 2 (a, s, T )ds + 2ρση C (a, s, T )C (b, s, T )ds
t t
wT
+η 2 C 2 (b, sT )ds,
t

from the Itô isometry.

Exercise 9.4 (Exercise 9.3 continued).


a) We use the fact that (rt , λt )t∈[0,T ] is a Markov process.
b) We use the tower property (A.33) of the conditional expectation given Ft .

c) Writing F (t, rt , λt ) = P (t, T ), we have


 rt 
d e− 0 (rs +λs )ds P (t, T )
rt rt
(rs +λs )ds (rs +λs )ds
= −(rt + λt )e− 0 P (t, T )dt + e− 0 dP (t, T )
rt rt
(rs +λs )ds (rs +λs )ds
= −(rt + λt )e− 0 P (t, T )dt + e− 0 dF (t, rt , λt )
rt rt ∂F
= −(rt + λt )e− 0 (rs +λs )ds P (t, T )dt + e− 0 (rs +λs )ds (t, rt , λt )drt
∂x
rt ∂F 1 rt ∂ 2F
+ e− 0 (rs +λs )ds (t, rt , λt )dλt + e− 0 (rs +λs )ds 2 (t, rt , λt )σ12 (t, rt )dt
∂y 2 ∂x
1 − r t (rs +λs )ds ∂ 2 F
+ e 0 (t, rt , λt )σ2 (t, λt )dt
2
2 ∂y 2
rt ∂2F rt ∂F
+ e− 0 (rs +λs )ds ρ (t, rt , λt )σ1 (t, rt )σ2 (t, λt )dt + e− 0 (rs +λs )ds (t, rt , λt )dt
∂x∂y ∂t

376 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

rt rt
(rs +λs )ds ∂F (1) ∂F (2)
= e− 0 (t, rt , λt )σ1 (t, rt )dBt + e− 0 (rs +λs )ds (t, rt , λt )σ2 (t, λt )dBt
∂x ∂y
rt 
∂F
+ e− 0 (rs +λs )ds −(rt + λt )P (t, T ) + (t, rt , λt )µ1 (t, rt )
∂x
∂F 1 ∂2F 1 ∂2F
+ (t, rt , λt )µ2 (t, λt ) + (t, rt , λt )σ12 (t, rt ) + (t, rt , λt )σ22 (t, λt )
∂y 2 ∂x2 2 ∂y 2
∂2F

∂F
+ρ (t, rt , λt )σ1 (t, rt )σ2 (t, λt ) + (t, rt , λt ) dt,
∂x∂y ∂t

hence the bond pricing PDE is


∂F
− (x + y )F (t, x, y ) + µ1 (t, x) (t, x, y )
∂x
∂F 1 2 ∂2F
+ µ2 (t, y ) (t, x, y ) + σ1 (t, x) 2 (t, x, y )
∂y 2 ∂x
1 2 ∂2F ∂2F ∂F
+ σ2 (t, y ) 2 (t, x, y ) + ρσ1 (t, x)σ2 (t, y ) (t, x, y ) + (t, rt , λt ) = 0.
2 ∂y ∂x∂y ∂t

d) We have
  w wT  
T
P (t, T ) = 1{τ >t} E exp − rs ds − λs ds Ft
t t
 w  w 
T T
= 1{τ >t} exp −E rs ds Ft − E λs ds Ft
t t
w wT
1
 
T
× exp Var rs ds + λs ds Ft
2 t t
= 1{τ >t} exp (−C (a, t, T )rt − C (b, t, T )λt )
 2w
η2 w T 2

σ T 2
× exp C (a, s, T )ds + C (b, s, T )e−(T −s)b ds
2 t 2 t
 wT 
× exp ρση C (a, s, T )C (b, s, T )ds .
t

e) This is a direct consequence of the answers to Questions (c)) and (d)).


f) The above analysis shows that
  w  
T
P(τ > T | Gt ) = 1{τ >t} E exp − λs ds Ft
t

η2 w T 2
 
= 1{τ >t} exp −C (b, t, T )λt + C (b, s, T )ds ,
2 t

for a = 0 and

" 377

This version: April 20, 2025


[Link]
N. Privault

 w
σ2 w T 2
    
T
E exp − rs ds Ft = exp −C (a, t, T )rt + C (a, s, T )ds ,
t 2 t

for b = 0, and this implies


 wT 
Uρ (t, T ) = exp ρση C (a, s, T )C (b, s, T )ds
t
 ση 
= exp ρ (T − t − C (a, t, T ) − C (b, t, T ) + C (a + b, t, T )) .
ab
g) We have


f (t, T ) = −1{τ >t} log P (t, T )
∂T
σ2 η2
 
= 1{τ >t} rt e−(T −t)a − C 2 (a, t, T ) + λt e−(T −t)b − C 2 (b, t, T )
2 2
−1{τ >t} ρσηC (a, t, T )C (b, t, T ).

h) We use the relation


  w  
T
P(τ > T | Gt ) = 1{τ >t} E exp − λs ds Ft
t

η2 w T 2
 
= 1{τ >t} exp −C (b, t, T )λt + C (b, s, T )ds
2 t
rT
= 1{τ >t} e− t
f2 (t,u)du
,

where f2 (t, T ) is the Vasicek forward rate corresponding to λt , i.e.

η2 2
f2 (t, u) = λt e−(u−t)b − C (b, t, u).
2
i) In this case we have ρ = 0 and
  w  
T
P (t, T ) = P(τ > T | Gt )E exp − rs ds Ft ,
t

since Uρ (t, T ) = 0.

Chapter 10

Exercise 10.1 It suffices to check that as λ tends to ∞, the ratio

378 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

j−1 k k
!
STi,ji
X X X
δk exp − δp rp − λ δp
k =i p=i p=i
j−1 k k
!
X X X
(1 − ξ ) 1 − e−λδk exp

− δp rp − λ δp
k =i p=i p=i

converges to 0, while it tends to +∞ as λ goes to 0. Therefore, the equation


(10.4) admits a numerical solution λ0 by continuity of the above function in
the variable λ.

Exercise 10.2 Equation (10.4) reads


j−1 k k
!
STi,ji
X X X
δk exp − δp rp − λ δp
k =i p=i p=i
j−1 k k
!
X X X
= (1 − ξ ) eλδk − 1 exp δp ,

− δp rp − λ
k =i p=i p=i

or
j−1 k
!
STi,ji
X X
δk P (0, Tk+1 ) exp −λ δp
k =i p=i
j−1 k
!
X X
= (1 − ξ ) eλδk − 1 P (0, Tk+1 ) exp δp ,

−λ
k =i p=i

since  
k
X
P (0, Tk+1 ) = exp − δp rp  , k = 0, 1, 2.
p=i

From the terminal data of Figure 10.6 we infer with

" 379

This version: April 20, 2025


[Link]
N. Privault

 i = 0,


j = 3,





0 = 03/20/2015,



 T
 T1 = 06/22/2015,




 t = 04/12/2015,


 T2 = 09/21/2015,
T3 = 12/21/2015,





δ1 = δ2 = δ3 = 0.25,





ξ = 0.4,





 1,3
ST1 = 0.1079.

Hence, from the data of Figure 10.7, Equation (10.4) rewrites as

0.1079 × 0.25
 
× 0.99952277 × e−λ×0.25 + 0.99827639 × e−λ×0.5 + 0.99607821 × e−λ×0.75
= (1 − 0.4) × eλ×0.25 − 1

 
× 0.99952277 × e−λ×0.25 + 0.99827639 × e−λ×0.5 + 0.99607821 × e−λ×0.75 ,

with solution λ = 0.0017987468. The default probability is given by p =


1 − e−λ×0.75 = 0.001348151.
Next, from the discount factors of Figure 10.7 we solve the Equation (10.4)
numerically in Table S.1 below to find the default rate λ1 = 0.0017987468
and default probability 0.0012460256, which is consistent with the value of
0.0013 in Figure 10.6, see also Castellacci (2008).

Date Delta Discount Factor Premium Leg Protection Leg


Jun 22, 2015 0.2611111 0.99952277 0.0002814722 0.0002814708
Sep 21, 2015 0.2527778 0.99827639 0.0002721533 0.000272154
Dec 21, 2015 0.2527778 0.99607821 0.0002715541 0.0002715548
Sum 0.0008251796 0.0008251796

Table S.1: CDS Market data.

Exercise 10.3
a) We have

380 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

j−1   w  
Tk + 1
1(Tk ,Tk+1 ] (τ )(1 − ξk+1 ) exp −
X
E r (s)ds Gt
t
k =i
j−1   w  
Tk + 1
E (1{Tk <τ } − 1{Tk+1 <τ } )(1 − ξk+1 ) exp −
X
= r (s)ds Gt
t
k =i
j−1   r Tk r Tk+1  r Tk+1 
= 1{τ >t} r (s)ds
X
E (1 − ξk+1 ) e− t λs ds
− e− t λs ds
e− t Ft
k =i
j−1 r Tk+1  r r Tk + 1 
Tk
= 1{τ >t} (1 − ξ ) r (s)ds
X
e− t E e− t λs ds − e− t λs ds
Ft
k =i
j−1
= 1{τ >t} (1 − ξ )
X
P (t, Tk+1 ) (Q(t, Tk ) − Q(t, Tk+1 )) .
k =i

b) We have
j−1   w  
Tk + 1
V p (t, T ) = Sti,j 1{τ >Tk+1 } exp −
X
δk E r (s)ds Gt
t
k =i
j−1   w  
Tk + 1
= Sti,j δk E 1{Tk+1 <τ } exp −
X
r (s)ds Gt
t
k =i
j−1   w   w  
Tk+1 Tk + 1
= 1{τ >t} Sti,j
X
δk E exp − λs ds exp − r (s)ds Ft
t t
k =i
j−1  w    w  
Tk+1 Tk + 1
= Sti,j 1{τ >t}
X
δk exp − r (s)ds E exp − λs ds Ft
t t
k =i
j−1
= 1{τ >t} Sti,j
X
δk P (t, Tk+1 )Q(t, Tk+1 ).
k =i

c) By equating the protection and premium legs, we find


j−1
X
(1 − ξ ) P (t, Tk+1 ) (Q(t, Tk ) − Q(t, Tk+1 ))
k =i
j−1
= Sti,j
X
δk P (t, Tk+1 )Q(t, Tk+1 ).
k =i

For j = i + 1, this yields

" 381

This version: April 20, 2025


[Link]
N. Privault

(1 − ξ )P (t, Ti+1 ) (Q(t, Ti ) − Q(t, Ti+1 )) = Sti,i+1 δi P (t, Ti+1 )Q(t, Ti+1 ),

hence
1−ξ
Q(t, Ti+1 ) = ,
Sti,i+1 δi + 1 − ξ
with Q(t, Ti ) = 1, and the recurrence relation

(1 − ξ )P (t, Tj +1 ) (Q(t, Tj ) − Q(t, Tj +1 ))


j−1
X
+ (1 − ξ ) P (t, Tk+1 ) (Q(t, Tk ) − Q(t, Tk+1 ))
k =i
j−1
= Sti,j δj P (t, Tj +1 )Q(t, Tj +1 ) + Sti,j
X
δk P (t, Tk+1 )Q(t, Tk+1 ),
k =i

i.e.
(1 − ξ )Q(t, Tj )
Q(t, Tj +1 ) =
1 − ξ + Sti,j δj
j−1
P (t, Tk+1 ) (1 − ξ )Q(t, Tk ) − Q(t, Tk+1 ) (1 − ξ ) + δk Sti,j

X
+ .
k =i P (t, Tj +1 )(1 − ξ + Sti,j δj )

Exercise 10.4 (Exercise 10.3 continued). From the terminal data of Fig-
ure 10.8, we find the following spread data and survival probabilities:

k Maturity Tk St1,k (bp) Q(t, Tk )


1 6M 0.5 10.97 0.999087
2 1Y 1 12.25 0.997961
3 2Y 2 14.32 0.995235
4 3Y 3 19.91 0.990037
5 4Y 4 26.48 0.982293
6 5Y 5 33.29 0.972122
7 7Y 7 52.91 0.937632
8 10Y 10 71.91 0.880602

Table S.2: Spread and survival probabilities.

382 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

Chapter 11

Exercise 11.1
a) We have
w∞ 1
E [ X | G ] = λG xe−λG x dx =
0 λG
and w∞ 1
E[X | B ] = λB xe−λB x dx = .
0 λB
b) We find

fX (x | B )P(B )
P(B | X = x) =
fX (x | G)P(G) + fX (x | B )P(B )
λB e−λB x P(B )
=
λG e−λ G x P(G) + λB e−λB x P(B )
1
=
λG P(G) (λB −λG )x
1+ e
λB P ( B )
1
= ,
P(G)
1 + λ(x)
P(B )

where λ(x) is the likelihood ratio

fX (x | G) λ
λ(x) = = G e(λB −λG )x , x > 0.
fX (x | B ) λB

c) The condition
DP(B | X = x) ⩽ LP(G | X = x)
rewrites as
DP(B | X = x) ⩽ L(1 − P(B | X = x)),
i.e.
(L + D )P(B | X = x) ⩽ L
or
L+D
⩽ L,
P(G)
1 + λ(x)
P(B )
or
λG (λB −λG )x D P(B )
λ(x) = e ⩾ .
λB L P(G)

" 383

This version: April 20, 2025


[Link]
N. Privault

This condition holds if and only if

1 D λB P(B )
 
x⩾ log ,
λB − λG L λG P(G)

provided that λB > λG . Therefore we have

D P(B )
 
A = x ∈ R : λ(x) ⩾
L P(G)
1 D λB P(B )
   
= log ,∞ ,
λB − λG L λG P(G)

under the condition


1 1
E[X | B ] = < = E[X | G].
λB λG

Exercise 11.2
a) We find

fX (x | B )P(B )
P(B | X = x) =
fX (x | G)P(G) + fX (x | B )P(B )
P(B )/λB
= 1[0,λB ] (x)
P(G)/λG + P(B )/λB
1
= 1[0,λB ] (x) .
λB P(G)
1+
λG P ( B )

b) We have
w∞ 1 w λG λG
E[X | G] = yfX (y | G)dy = ydy = ,
−∞ λG 0 2
and similarly
w∞ 1 w λB λB
E[X | B ] = yfX (y | B )dy = ydy = .
−∞ λB 0 2

c) The condition
DP(B | X = x) ⩽ LP(G | X = x)
rewrites as
DP(B | X = x) ⩽ L(1 − P(B | X = x)),
i.e.

384 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

(L + D )P(B | X = x) ⩽ L
or
λB P ( G )
D1[0,λB ] (x) ⩽ L1(λB ,∞) (x) + L .
λG P ( B )
This condition holds if and only if

λB D P(B )
⩾ .
λG L P(G)

when x ∈ [0, λB ], and is always satisfied when x ∈ (λB , ∞). Therefore,


we have A = R if
λB D P(B )
⩾ ,
λG L P(G)
and A = (λB , ∞) if
λB D P(B )
< ,
λG L P(G)
under the condition

E[X | B ] = λB < λG = E[X | G].

Exercise 11.3
a) We have

F G (x) = e−λG x and F B (x) = e−λB x , x ⩾ 0,

hence
−1 log y
F B (y ) = − , y ∈ (0, 1],
λB
and
log y
 
−1 
F G F B (y ) = F G −
λB
= eλG (log y )/λB
= y λG /λB , y ∈ [0, 1].

We check that, according to Proposition 11.7,


d −1  d λG /λB
F G F B (y ) = y
dy dy
d λG (log y )/λB
= e
dy

" 385

This version: April 20, 2025


[Link]
N. Privault

λG λG (log y )/λB
= e
yλB
λ
= G e(λG −λB )(log y )/λB
λB
λ −1
= G e(λB −λG )F B (y )
λB
−1
= λ F B (y ) , x ∈ [0, 1].


Figure S.13 presents three samples of exponential ROC curves, with suc-
cessively (λB , λG ) = (10, 1), (λB , λG ) = (2, 1), and (λB , λG ) = (1, 1).

1
True Positive Rate (TPR)

0.8

0.6

0.4

λB=10,λG=1
0.2
λB=2,λG=1
λB=1,λG=1
0
0 0.2 0.4 0.6 0.8 1

False Positive Rate (FPR)

Fig. S.13: Exponential ROC curves.

b) We have
x
F G (x) : = 1 − , x ∈ [0, λG ],
λG
and
x
F B (x) : = 1 − , x ∈ [0, λB ],
λB
hence
F −1
B ( y ) : = λB ( 1 − y ) , y ∈ [0, 1],
hence
−1 λB λ − λB λ
F G F B (x) = 1 − (1 − y ) = G + B y, y ∈ [0, 1].

λG λG λG
Figure S.14 presents three samples of uniform ROC curves, with succes-
sively (λB , λG ) = (1, 8), (λB , λG ) = (1, 2), and (λB , λG ) = (1, 1).

386 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

True Positive Rate (TPR) 1

0.8

0.6

0.4

λB=1,λG=8
0.2
λB=1,λG=2
λB=1,λG=1
0
0 0.2 0.4 0.6 0.8 1

False Positive Rate (FPR)

Fig. S.14: Uniform ROC curves.

Exercise 11.4
a) We have

P ( B ) fX ( x | B )
P(B | X = x) =
P ( G ) fX ( x | G ) + P ( B ) fX ( x | B )
2 2
P(B )e−(x−µB ) /(2σ )
=
P(G)e−(x−µG ) /(2σ ) + P(B )e−(x−µB ) /(2σ )
2 2 2 2

1
= , x ∈ R,
1 + eα+βx
with
µG − µB
β := >0
σ2
and
µG + µB P(G)
 
α := −β + log .
2 P(B )
b) We have

fX ( x | G )
λ(x) =
fX ( x | B )
2 2 2 2
= e−(x−µG ) /(2σ )+(x−µB ) /(2σ )
2 2 2
= e−(µG −µB −2x(µG −µB ))/(2σ )
βx−(µ2G −µ2B )/(2σ 2 )
=e , x ∈ R.

c) The condition

" 387

This version: April 20, 2025


[Link]
N. Privault

2 2 2) D (x) P(B )
λ(x) = eβx−(µG −µB )/(2σ ⩾
L(x) P(G)

is equivalent to

µ2G − µ2B D (x) P(B )


 
βx ⩾ + log
2σ 2 L(x) P(G)
µ2G − µ2B P(B ) D (x)
⩾ + log + log
2σ 2 P(G) L(x)
µ2G − µ2B P(B )
⩾ + log + x(a + b),
2σ 2 P(G)

hence
µ2G − µ2B 1 P(B )
x⩾ + log ,
2σ 2 (β − a − b) β − a − b P(G)

provided that
µG − µB
β := > a + b.
σ2
In this case, we have

µ2G − µ2B 1 P(B )


 
A ∗ = [ x∗ , ∞ ) = + log ,∞ ,
2σ (β − a − b)
2 β−a−b P(G)

where
µ2G − µ2B 1 P(B )
x∗ := + log .
2σ 2 (β − a − b) β − a − b P(G)

Background on Probability Theory


Exercise A.1
a) We have
X X λk
E[X ] = kP(X = k ) = e−λ k
k!
k⩾0 k⩾0
X λk X λk
= e−λ = λe−λ = λ.
(k − 1) ! k!
k⩾1 k⩾0

b) We have

388 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

X
E[X 2 ] = k 2 P(X = k )
k⩾0
X λk
= e−λ k2
k!
k⩾1
X λk
= e−λ k
(k − 1) !
k ⩾1

−λ
X λk X λk
=e + e−λ
(k − 2) ! (k − 1) !
k ⩾2 k⩾1
X λk X λk
2 −λ −λ
=λ e + λe
k! k!
k⩾0 k⩾0
2
= λ + λ,

and
Var[X ] = E[X 2 ] − (E[X ])2 = λ = E[X ].

Exercise A.2 We have


w∞ 2 / (2η 2 ) dy
P(eX > c) = P(X > log c) = e−y
2πη 2
p
log c
w∞ 2 /2 dy
= e−y √ = 1 − Φ((log c)/η ) = Φ(−(log c)/η ).
(log c)/η 2π

Exercise A.3
a) Using the change of variable z = (x − µ)/σ, we have
w∞ 1 w∞ 2 / (2σ 2 )
φ(x)dx = √ e−(x−µ) dx
−∞ 2πσ 2 −∞
1 2
w∞
2
= √ e−y /(2σ ) dy
2πσ 2 −∞
1 w ∞ −z 2 /2
= √ e dz.
2π −∞

Next, using the polar change of coordinates r2 = x2 + y 2 and dxdy =


rdrdθ, we find†

“In a discussion with Grothendieck, Messing mentioned the formula expressing the
2
integral of e−x in terms of π, which is proved in every calculus course. Not only did
Grothendieck not know the formula, but he thought that he had never seen it in his
life”. ?.

" 389

This version: April 20, 2025


[Link]
N. Privault

1 w ∞ −z 2 /2 1 w ∞ −y2 /2 w ∞ −z 2 /2
 2
√ e dz = e dy e dz
2π −∞ 2π −∞ −∞
w w
1 ∞ ∞ −(y2 +z 2 )/2
= e dydz
2π −∞ −∞
1 w 2π w ∞ −r2 /2
= re drdθ
w2π 0 0 ∞ 2
= re−r /2 dr
0
wR 2
= lim re−r /2 dy
R→+∞ 0
h 2 iR
= − lim e−r /2
R→+∞ 0
−R2 /2
= lim (1 − e )
R→+∞
= 1,

or w∞ √
2 /2
e−z dz = 2π.
−∞

b) We have
w∞
E[X ] = xφ(x)dx
−∞
1 w∞ 2 2
= √ xe−(x−µ) /(2σ ) dx
2πσ 2 −∞
1 w∞ 2 2
= √ (µ + y )e−y /(2σ ) dx
2πσw2 −∞
µ ∞ −y 2 /2 σ w∞ 2
= √ e dy + √ ye−y /2 dy
2π −∞ 2π −∞
µ w ∞ −y2 /2 σ wA 2
= √ e dy + √ lim ye−y /2 dy
2π −∞ 2π A→+∞ −A
µ w ∞ −y2 /2
= √ e dy
2π −∞
w∞
= µ φ(y )dy
−∞
= µP(X ∈ R)
= µ,
2
by symmetry of the function y 7−→ ye−y /2 on R.
c) Similarly, by integration by parts twice on R, we find
w∞
E[(X − E[X ])2 ] = (x − µ)2 φ(x)dx
−∞

390 "

This version: April 20, 2025


[Link]
Notes on Financial Risk and Analytics

1 w∞ 2 2
= √ y 2 e−(y−µ) /(2σ ) dy
2πσ 2 −∞
σ2 w ∞ 2
= √ y × ye−y /2 dy
2π −∞
σ 2 w ∞ −y2 /2
= √ e dy
2π −∞
=σ .
2

d) By a completion of squares argument, we have


w∞
E[eX ] = ex φ(x)dx
−∞
1 w∞ 2 2
= √ ex−(x−µ) /(2σ ) dx
2πσ −∞
2
eµ w ∞ y−y2 /(2σ2 )
= √ e dy
2πσ 2 −∞
eµ w ∞ σ 2 /2+(y−σ 2 )2 /(2σ 2 )
= √ e dy
2πσ 2 −∞
eµ + σ 2 /2 w ∞ x2 /(2σ2 )
= √ e dy
2πσ 2 −∞

σ 2
= eµ + .
2

Exercise A.4
a) We have
1 w∞ 2 / (2/σ 2 )
E[X + ] = √ x+ e−x dx
2πσ 2 −∞
σ w ∞ −x2 /2
= √ xe dx
2π 0
σ h 2
ix = ∞
= √ −e−x /2
2π x=0
σ
= √ .

b) We have
1 w∞ 2 / (2σ 2 )
E[(X − K )+ ] = √ (x − K )+ e−x dx
2πσ 2 −∞
1 w∞ 2 / (2σ 2 )
= √ (x − K )e−x dx
2πσ 2 K

" 391

This version: April 20, 2025


[Link]
N. Privault

1 w∞ 2 / (2σ 2 ) K w∞ 2 / (2σ 2 )
= √ xe−x dx − √ e−x dx
2πσ 2 K 2πσ 2 K
σ h −x2 /(2σ2 ) i∞ K w −K/σ −x2 /2
= √ −e −√ e dx
2π x = K 2π −∞
 
σ 2 2 K
= √ e−K /(2σ ) − KΦ − .
2π σ

c) Similarly, we have
1 w∞ 2 / (2σ 2 )
E[(K − X )+ ] = √ (K − x)+ e−x dx
2πσ 2 −∞
1 wK 2 / (2σ 2 )
= √ (K − x)e−x dx
2πσ 2 −∞
K wK 2 / (2σ 2 ) 1 wK 2 2
= √ e−x xe−x /(2σ ) dx
dx − √
2πσ 2 −∞ 2πσ 2 −∞
K w K/σ −x2 /2 σ h 2 2 x=K
i
= √ e dx − √ −e−x /(2σ )
2π −∞ 2π −∞
 
σ −K 2 /(2σ )2 K
= √ e + KΦ .
2π σ

392 "

This version: April 20, 2025


[Link]

You might also like