Financial Risk Analytics
Financial Risk Analytics
Notes on
Financial Risk and Analytics
0.10
0.05
0.00
−0.05
−0.10
2020 2021
Preface
Nicolas Privault
June 2023
vi "
2 Time Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.1 Autoregressive Moving Average . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.2 Autoregressive Heteroskedasticity . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.3 Time Series Stationarity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2.4 Fitting Time Series to Financial Data . . . . . . . . . . . . . . . . . . . . . 48
2.5 Application: Pair Trading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
vii
N. Privault
viii "
Part IV Appendix
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
" ix
xi
N. Privault
xii "
" xiii
∗
Animated figures (work in Acrobat Reader).
xiv "
5.1 Call and put options on the Hang Seng Index (HSI). . . . . . . . . . . . . . . . 136
xv
Part I
Stochastic Modeling
Chapter 1
Modeling Market Returns
We consider the random walk (Sn )n⩾0 , also called the Bernoulli random walk
and defined by S0 := 0 and
n
X
Sn := Xk = X1 + · · · + Xn , n ⩾ 0,
k =1
where the increments (Xk )k⩾1 form a sequence of independent and identically
distributed (i.i.d.) Bernoulli random variables, with distribution
P(Xk = +1) = p,
P(Xk = −1) = q, k ⩾ 1,
with p + q = 1. In other words, the random walk (Sn )n⩾0 can only evolve by
going up or down by one unit within the finite state space {0, 1, . . . , S}. We
have
" 3
k ∈ Z. We also have
n n
" #
X X
E[Sn | S0 = 0] = E Xk = E [Xk ] = n(2p − 1) = n(p − q ),
k =1 k =1
2n
P(S2n = 2k | S0 = 0) = pn+k q n−k , −n ⩽ k ⩽ n, (1.1)
n+k
and we note that in an even number of time steps, (Sn )n∈N can only reach
an even state in Z starting from 0. Similarly, in an odd number of time steps,
(Sn )n∈N can only reach
an oddstate
in Z starting from 0. In Figure 1.1 we
10 10
enumerate the 120 = = possible paths corresponding to n = 5
7 3
and k = 2.
7
Path number 19 out of 120
6
-1
-2
-3
0 1 2 3 4 5 6 7 8 9 10
10 10
Fig. 1.1: Graph of 120 = = paths with n = 5 and k = 2.∗
7 3
∗
Animated figure (works in Acrobat Reader).
4 "
Brownian Motion
0.8
0.6
0.4
0.2
-0.2
-0.4
0 0.2 0.4 0.6 0.8 1
Einstein received his 1921 Nobel Prize in part for investigations on the theory
of Brownian motion: “... in 1905 Einstein founded a kinetic theory to account
for this movement”, presentation speech by S. Arrhenius, Chairman of the
Nobel Committee, Dec. 10, 1922.
Einstein (1905) “Über die von der molekularkinetischen Theorie der Wärme
geforderte Bewegung von in ruhenden Flüssigkeiten suspendierten Teilchen”,
Annalen der Physik 17.
Bachelier (1900) used Brownian motion for the modeling of stock prices in
his PhD thesis “Théorie de la spéculation”, Annales Scientifiques de l’Ecole
Normale Supérieure 3 (17): 21-86, 1900.
Wiener (1923) is credited, among other fundamental contributions, for the
mathematical foundation of Brownian motion, published in 1923. In partic-
ular he constructed the Wiener space and Wiener measure on C0 ([0, 1]) (the
space of continuous functions from [0, 1] to R vanishing at 0).
Itô constructed the Itô integral with respect to Brownian motion, cf. Itô,
Kiyoshi, Stochastic integral. Proc. Imp. Acad. Tokyo 20 (1944), 519-524. He
also constructed the stochastic calculus with respect to Brownian motion,
" 5
which laid the foundation for the development of calculus for random pro-
cesses, see Itô (1951) “On stochastic differential equations”, in Memoirs of
the American Mathematical Society.
Definition 1.1. The standard Brownian motion is a stochastic process
(Bt )t∈R+ such that
1. B0 = 0 almost surely,
2. The sample paths t 7→ Bt are (almost surely) continuous.
3. For any finite sequence of times t0 < t1 < · · · < tn , the increments
are independent.
4. For any times 0 ⩽ s < t, Bt − Bs is normally distributed with mean
zero and variance t − s.
Bt3
Bt2
Bt1
0 t1 t2 t3
-1
0 0.2 0.4 0.6 0.8 1
See e.g. Chapter 1 of Revuz and Yor (1994) and Theorem 10.28 in Folland
(1999) for proofs of existence of Brownian motion as a stochastic process
(Bt )t∈R+ satisfying the Conditions 1-4 of Definition 1.1.
over the time interval [t, t + ∆t] will be approximated by the Bernoulli random
variable √
∆Bt = ± ∆t (1.2)
with equal probabilities (1/2, 1/2), hence
6 "
1√ 1√
E[∆Bt ] = ∆t − ∆t = 0,
2 2
and
1 1
Var[∆Bt ] = E (∆Bt )2 = ∆t + ∆t = ∆t.
2 2
Figure 1.4 presents a simulation of Brownian motion as a random walk with
∆t = 0.1.
3
2.5
1.5
Bt
1
0.5
-0.5
-1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
t
k−1
k
T, T , k = 1, 2, . . . , N ,
N N
0 T 2T T
N N
We can write
X X1 + X2 + · · · + XN
BT ≃ ∆Bt ≃ √ ,
0<t<T
N
√ √
where Xk := ± N ∆t = ± T with equal probabilities (1/2, 1/2) and
Var(Xk ) = T , hence by the central limit theorem we recover the fact that
BT has the centered Gaussian distribution N (0, T ) with variance T , cf. point
4 of the above Definition 1.1 of Brownian motion, and the illustration given
in Figure 1.5.
∗
The animation works in Acrobat Reader on the entire pdf file.
" 7
Remark 1.2.
i) The choice of the square root in (1.2) is in fact not fortuitous. Indeed,
any choice of ±(∆t)α with a power α > 1/2 would lead to explosion of
the process as dt tends to zero, whereas a power α ∈ (0, 1/2) would lead
to a vanishing process, as can be checked from the following code.
ii) According to this representation, the paths of Brownian motion are not
differentiable, although they are continuous by Property 2, as we have
√
dBt ± dt 1
≃ = ± √ ≃ ±∞. (1.3)
dt dt dt
−1
−2
0.0 0.2 0.4 0.6 0.8 1.0
8 "
The package quantmod can be used to fetch financial data from various
sources such as Yahoo! Finance or the Federal Reserve Bank of St. Louis
(FRED). It can be installed and run via the following command.
install.packages("quantmod")
library(quantmod)
getSymbols("DEXJPUS",src="FRED") # Japan/U.S. Foreign Exchange Rate
getSymbols("CPIAUCNS",src='FRED') # Consumer Price Index
getSymbols("GOOG",src="yahoo") # Google Stock Price
The market returns of an asset priced (St )t∈R+ over time can be estimated
in various ways.
Definition 1.3. 1. Standard returns are defined as
St+dt − St S
= t+dt − 1. (1.4)
St St
2. Log-returns are defined as
St+dt S − St
d log St ≃ log St+dt − log St = log = log 1 + t+dt , t ⩾ 0.
St St
(1.5)
The following R script allows us to fetch market price data using Quant-
mod package. Market returns can be estimated using either standard returns
(St+dt − St )/St or log-returns d log St ≃ log St+dt − log St , t ⩾ 0, which can
be computed by the command diff(log(stock)), with dt = 1/365.
getSymbols("^DJI",from="2007-01-03",to=Sys.Date(),src="yahoo")
stock=Ad(`DJI`)
chartSeries(stock,up.col="blue",theme="white")
stock.logrtn=diff(log(stock)); # log returns
stock.rtn=(stock-lag(stock))/lag(stock); # standard returns
chartSeries(stock.rtn,up.col="blue",theme="white")
n = length(!is.na(stock.rtn))
The adjusted close price Ad() is the closing price after adjustments for ap-
plicable splits and dividend distributions.
" 9
35000
0.05
30000
25000
0.00
20000
−0.05
15000
−0.10
10000
−0.15
Jan 04 Jul 01 Apr 01 Jan 04 Oct 01 Jul 01 Apr 02 Jan 02 Oct 01 Jul 01 Apr 01 Jan 04 Oct 03 Jul 03 Apr 02 Jan 02 Oct 01 Jul 01 Apr 01 Jan 03 Jan 03 Jul 01 Apr 01 Jan 04 Oct 01 Jul 01 Apr 02 Jan 02 Oct 01 Jul 01 Apr 01 Jan 04 Oct 03 Jul 03 Apr 02 Jan 02 Oct 01 Jul 01 Apr 01 Jan 03
2007 2008 2009 2010 2010 2011 2012 2013 2013 2014 2015 2016 2016 2017 2018 2019 2019 2020 2021 2022 2007 2008 2009 2010 2010 2011 2012 2013 2013 2014 2015 2016 2016 2017 2018 2019 2019 2020 2021 2022
stock<-stock[!is.na(stock.rtn)];stock.rtn<-stock.rtn[!is.na(stock.rtn)]
times=index(stock);dev.new(width=16,height=7);par(mfrow=c(1,2))
plot(times,stock.rtn,pch=19,xaxs="i",yaxs="i",cex=0.03,col="blue", ylab="", xlab="", main
= 'Asset returns', las=1, cex.lab=1.8, cex.axis=1.8, lwd=3)
segments(x0 = times, x1 = times, y0 = 0, y1 = stock.rtn,col="blue")
plot(times,100 * cumprod(1 + as.numeric(stock.rtn)),type='l',col='black',main = "Asset
prices",ylab="", cex=0.1,cex.axis=1,las=1)
The following code plots the yearly returns of the S&P 500 index from
1950 to 2022, see Figure 1.7, together with their histogram.
library(quantmod); getSymbols("^GSPC",from="1950-01-01",to="2022-12-31",src="yahoo")
stock<-Cl(`GSPC`); s=0;y=0;j=0;count=0;N=250;nsim=72; X = matrix(0, nsim, N)
for (i in 1:nrow(GSPC)){if (s==0 && grepl('-01-0',index(stock[i]))) {if (count==0 ||
X[y,N]>0) {y=y+1;j=1;s=1;count=count+1;}}
if (j<=N) {X[y,j]=as.numeric(stock[i]);};if (grepl('-02-0',index(stock[i]))) {s=0;};j=j+1;}
t <- 0:(N-1); dt <- 1.0/N;dev.new(width=16,height=7);
layout(matrix(c(1,2), nrow =1, byrow = TRUE));par(mar=c(2,2,2,0), oma = c(2, 2, 2, 2))
plot(t*dt, X[1,]/X[1,1]-1, xlab = "", ylab = "", type = "l", ylim = c(-0.5, 0.5), col = 0,
xaxs='i',las=1, cex.axis=1.6)
for (i in 1:nsim){lines(t*dt, X[i,]/X[i,1]-1, type = "l", col = i)}
m=mean(X[,N-10]/X[,1]-1);sigma=sd(X[,N-10]/X[,1]-1)
lines(t*dt,sigma*sqrt(t*dt),lty=1,col="red",lwd=3);lines(t*dt,-sigma*sqrt(t*dt), lty=1,
col="red",lwd=3)
lines(t*dt,0*t, lty=1, col="black",lwd=2)
for (i in 1:nsim){points(0.999, X[i,N]/X[i,1]-1, pch=1, lwd = 5, col = i)}
x <- seq(-2,2, length=100); px <- dnorm(x,m,sigma);par(mar = c(2,2,2,2))
H<-hist(X[,N-10]/X[,1]-1,plot=FALSE);
plot(NULL , xlab="", ylab="", xlim = c(0, max(px,H$density)), ylim = c(-2,2),axes=F)
rect(0, H$breaks[1:(length(H$breaks) - 1)], col=rainbow(20,start=0.08,end=0.6), H$density,
H$breaks[2:length(H$breaks)]); lines(px,x, lty=1, col="black",lwd=2)
10 "
0.4
0.2
0.0
−0.2
−0.4
Fig. 1.7: Statistics of S&P 500 yearly returns from 1950 to 2022.
Fig. 1.8: Clark (2000) “As if a whole new world was laid out before me.”∗
∗
Click on the figure to play the video (works in Acrobat Reader on the entire pdf file).
" 11
The evolution of a riskless bank account value (At )t∈R+ is constructed from
standard returns, as follows:
At+dt − At dAt
= rdt, = rdt, A′t = rAt , t ⩾ 0,
At At
with the solution
At = A0 ert , t ⩾ 0, (1.6)
where r > 0 is the risk-free interest rate.∗
In what follows, we will model the risky asset price process (St )t∈R+ using
standard returns, from the equation
St+dt − St dSt
≃ = µdt + σdBt , t ⩾ 0, (1.7)
St St
is given by
1
St = S0 exp σBt + µ − σ 2 t , t ⩾ 0. (1.9)
2
Proof. Using (1.7), the log-returns (1.5) of an asset priced (St )t∈R+ satisfy
dSt S − St
= t+dt = µdt + σdBt ,
St St
hence
∗
“Anyone who believes exponential growth can go on forever in a finite world is either
a madman or an economist”, K. E. Boulding (1973), page 248.
12 "
St+dt
d log St ≃ log St+dt − log St = log
S
t
S − St
= log 1 + t+dt
St
dSt
= log 1 +
St
= log(1 + µdt + σdBt )
1
≃ µdt + σdBt − (µdt + σdBt )2
2
σ2
≃ µdt − dt + σdBt , t ⩾ 0.
2
□
The next Figure 1.9 presents an illustration of the geometric Brownian pro-
cess of Proposition 1.4.
4
St
3.5
ert
3
St 2.5
2
1.5
S0=1
0.5
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
t
The solution (1.9) of (1.8) can also be simulated by the following code.
∗
The animation works in Acrobat Reader on the entire pdf file.
" 13
N=2000; t <- 0:N; dt <- 1.0/N; mu=0.5;sigma=0.2; nsim <- 10; par(oma=c(0,1,0,0))
X <- matrix(rnorm(nsim*N,mean=0,sd=sqrt(dt)), nsim, N)
X <- cbind(rep(0, nsim), t(apply(X, 1, cumsum)))
for (i in 1:nsim){X[i,] <- exp(mu*t*dt+sigma*X[i,]-sigma*sigma*t*dt/2)}
plot(t*dt, rep(0, N+1), xlab = "Time", ylab = "Geometric Brownian motion", lwd=2, ylim
= c(min(X),max(X)), type = "l", col = 0,las=1,cex.axis=1.5,cex.lab=1.6, xaxs='i',
yaxs='i')
for (i in 1:nsim){lines(t*dt, X[i, ], lwd=2, type = "l", col = i)}
The next Figure 1.10 presents sample paths of geometric Brownian motion.
2.0
Geometric Brownian motion
1.8
1.6
1.4
1.2
1.0
Fig. 1.10: Ten sample paths of geometric Brownian motion (St )t∈R+ .
library(quantmod); getSymbols("0005.HK",from="2016-02-15",to="2017-05-11",src="yahoo")
Marketprices<-Ad(`0005.HK`); myPars <- chart_pars();myPars$cex<-1.2
returns=(Marketprices-lag(Marketprices))/Marketprices
sigma=sd(as.numeric(returns[-1])); r=mean(as.numeric(returns[-1]))
N=length(Marketprices); t <- 0:N; dt <- 1.0/N;
a=(1+r)*(1-sigma)-1;b=(1+r)*(1+sigma)-1
X <- matrix((a+b)/2+(b-a)*rnorm( N-1, 0, 1)/2, 1, N-1)
X <- as.numeric(Marketprices[1])*cbind(0,t(apply((1+X),1,cumprod))); X[,1]=1;
x=seq(100,100+N-1); dates <- index(Marketprices)
GBM<-xts(x =X[1,], order.by = dates)
myPars <- chart_pars();myPars$cex<-1.4
myTheme <- chart_theme();myTheme$col$line.col <- "blue"
myTheme$rylab <- FALSE;
chart_Series(Marketprices,pars=myPars, theme = myTheme);
dexp<-as.numeric(Marketprices[1])*exp(r*seq(1,305)); ddexp<-xts(x =dexp, order.by = dates)
dev.new(width=16,height=8); par(mfrow=c(1,2));
add_TA(exp(log(ddexp)), on=1, col="black",layout=NULL, lwd=4 ,legend=NULL)
graph <- chart_Series(GBM,theme=myTheme,pars=myPars); myylim <- graph$get_ylim()
graph <- add_TA(exp(log(ddexp)), on=1, col="black",layout=NULL, lwd=4 ,legend=NULL)
myylim[[2]] <- structure(c(min(Marketprices),max(Marketprices)), fixed=TRUE)
graph$set_ylim(myylim); graph
The adjusted close price Ad() is the closing price after adjustments for ap-
plicable splits and dividend distributions.
14 "
The next Figure 1.11 presents a graph of underlying asset price market
data, which is compared to the geometric Brownian motion simulation of
Figure 1.10.
35
Feb 15 May 03 Aug 01 Nov 01 Feb 01 May 02 Feb 15 May 03 Aug 01 Nov 01 Feb 01 May 02
2016 2016 2016 2016 2017 2017 2016 2016 2016 2016 2017 2017
56 56
55
54 54
52 52
50 50 50
48 48
46
46 45
44
44
42
42
40 40
40
38
Feb 15 May 03 Aug 01 Nov 01 Feb 01 May 02 Feb 15 May 03 Aug 01 Nov 01 Feb 01 May 35
02
2016 2016 2016 2016 2017 2017 2016 2016 2016 2016 2017 2017
library("Sim.DiffProc")
fx <- expression( theta[1]*x ); gx <- expression( theta[2]*x )
fitsde(data = as.ts(Marketprices), drift = fx, diffusion = gx, start = list(theta1=0.01,
theta2=0.01),pmle="euler")
" 15
1 2 2 2
x 7−→ f (x) = √ e−(−(µ−σ /2)T +log(x/S0 )) /(2σ T ) , x > 0,
xσ 2πT
σ2
x
= P σBT + µ − T ⩽ log
2 S0
1 σ2
x
= P BT ⩽ log − µ− T
σ S0 2
w (log(x/S0 )−(µ−σ2 /2)T )/σ 2 dy
= e−y /(2T ) √
−∞ 2πT
w (log(x/S0 )−(µ−σ2 /2)T )/(σ√T )
−z 2 /2 dz
= e √
−∞ 2π
1 σ2
x
=Φ √ log − µ− T ,
σ T S0 2
where wx 2 /2 dy
Φ (x) : = e−y √ , x ∈ R,
−∞ 2πT
denotes the standard Gaussian Cumulative Distribution Function (CDF) of
a standard normal random variable X ≃ N (0, 1), with the relation
Φ(−x) = 1 − Φ(x), x ∈ R.
1.2
1
1 Gaussian CDF Φ(x)
0.8
Φ(x)
0.6
0.4
0.2
0
-4 -3 -2 -1 0 1 2 3 4
x
16 "
dP(ST ⩽ x)
f (x) =
dx
∂ w (log(x/S0 )−(µ−σ2 /2)T )/σ −y2 /(2T ) dy
= e √
∂x −∞ 2πT
1 σ2
∂ x
= Φ √ log − µ− T
∂x σ T S0 2
1 1 2
x σ
= √ φ √ log − µ− T
xσ T σ T S0 2
1 2 2 2
= √ e−(−(µ−σ /2)T +log(x/S0 )) /(2σ T ) , x > 0,
xσ 2πT
where
1 2
φ(y ) = Φ′ (y ) := √ e−y /2 , y ∈ R,
2π
denotes the standard Gaussian probability density function. □
N=1000; t <- 0:N; dt <- 1.0/N; nsim <- 100 # using Bernoulli samples
sigma=0.2;r=0.5;a=(1+r*dt)*(1-sigma*sqrt(dt))-1;b=(1+r*dt)*(1+sigma*sqrt(dt))-1
X <- matrix(a+(b-a)*rbinom( nsim * N, 1, 0.5), nsim, N)
X<-cbind(rep(0,nsim),t(apply((1+X),1,cumprod))); X[,1]=1;H<-hist(X[,N],plot=FALSE);
dev.new(width=16,height=7);
layout(matrix(c(1,2), nrow =1, byrow = TRUE)); par(mar=c(2,2,2,0), oma = c(2, 2, 2, 2))
plot(t*dt,X[1,],xlab="time",ylab="",type="l",ylim=c(0.8,3), col = 0,xaxs='i',las=1,
cex.axis=1.6)
for (i in 1:nsim){lines(t*dt, X[i, ], xlab = "time", type = "l", col = i)}
lines((1+r*dt)^t, type="l", lty=1, col="black",lwd=3,xlab="",ylab="", main="")
for (i in 1:nsim){points(0.999, X[i,N], pch=1, lwd = 5, col = i)}; x <- seq(0.01,3,
length=100);
px <- exp(-(-(r-sigma^2/2)+log(x))^2/2/sigma^2)/x/sigma/sqrt(2*pi); par(mar = c(2,2,2,2))
plot(NULL , xlab="", ylab="", xlim = c(0, max(px,H$density)),ylim=c(0.8,3),axes=F, las=1)
rect(0, H$breaks[1:(length(H$breaks) - 1)], col=rainbow(20,start=0.08,end=0.6), H$density,
H$breaks[2:length(H$breaks)])
lines(px,x, type="l", lty=1, col="black",lwd=3,xlab="",ylab="", main="")
" 17
3.0
2.5
2.0
1.5
1.0
library(quantmod)
getSymbols("^STI",from="1990-01-03",to="2015-01-03",src="yahoo");stock=Ad(`STI`);
getSymbols("^DJI",from="1990-01-03",to=Sys.Date(),src="yahoo");stock=Ad(`DJI`);
stock.rtn=diff(log(stock));returns <- as.vector(stock.rtn)
m=mean(returns,na.rm=TRUE);s=sd(returns,na.rm=TRUE);times=index(stock.rtn)
Consider for example the market returns data obtained from fetching DJI and
STI index data using the package Quantmod and the following scripts.
library(quantmod)
getSymbols("^STI",from="1990-01-03",to="2015-01-03",src="yahoo");stock=Ad(`STI`);
getSymbols("^DJI",from="1990-01-03",to=Sys.Date(),src="yahoo");stock=Ad(`DJI`);
stock.rtn=diff(log(stock));returns <- as.vector(stock.rtn)
m=mean(returns,na.rm=TRUE);s=sd(returns,na.rm=TRUE);times=index(stock.rtn)
n = sum(is.na(returns))+sum(!is.na(returns));x=seq(1,n);y=rnorm(n,mean=m,sd=s)
dev.new(width=16,height=8)
plot(times,returns,pch=19,xaxs="i",yaxs="i",cex=0.03,col="blue", ylab="", xlab="", main
= '', las=1, cex.lab=1.8, cex.axis=1.8, lwd=3)
segments(x0 = times, x1 = times, y0 = 0, y1 = returns,col="blue")
points(times,y,pch=19,cex=0.3,col="red")
abline(h = m+3*s, col="black", lwd =1);abline(h = m, col="black", lwd =1);abline(h =
m+-3*s, col="black", lwd =1)
length(returns[abs(returns-m)>3*s])/length(stock.rtn)
length(y[abs(y-m)>3*s])/length(y);2*(1-pnorm(3*s,0,s))
Figure 1.15 shows the mismatch between the distributional properties of mar-
ket log-returns vs standardized Gaussian returns, which tend to underesti-
mate the probabilities of extreme events. Note that when X ≃ N (0, σ 2 ),
99.73% of samples of X are falling within the interval [−3σ, +3σ ], i.e.
P(|X| ⩽ 3σ ) = 0.9973002.
18 "
0.05
0.00
−0.05
1.0
Empirical CDF
Gaussian CDF
0.8
0.6
0.4
0.2
0.0
−0.15 −0.10 −0.05 0.00 0.05 0.10
" 19
dev.new(width=16,height=8)
qqnorm(returns, col = "blue", xaxs="i", yaxs="i", las=1, cex.lab=1.4, cex.axis=1, lwd=3)
grid(lwd = 2)
0.10
0.05
Sample Quantiles
0.00
−0.05
−0.10
−3 −2 −1 0 1 2 3
Theoretical Quantiles
ks.test(y,"pnorm",mean=m,sd=s)
ks.test(returns,"pnorm",mean=m,sd=s)
data: returns
D = 0.075577, p-value < 2.2e-16
alternative hypothesis: two-sided
20 "
2 =E X
κX − (E[X ])2 = E (X − E[X ])2 ,
2
q
and 2 is the standard deviation of X.
κX
c) The third cumulant of X is given as the third central moment κX
3 =
E[(X − E[X ])3 ].
d) Similarly, the fourth cumulant of X satisfies
E (X − E[X ])3
κX
SkX := 3
=
(κX
2 )
3/2 (E[(X − E[X ])2 ])3/2
is the skewness of X.
ii) The excess kurtosis of X is defined as
dev.new(width=16,height=8)
x <- seq(-0.25, 0.25, length=100);qx <- dnorm(x,mean=m,sd=s)
stock.dens=density(stock.rtn,na.rm=TRUE)
plot(stock.dens, xlab = 'x', lwd=4, col="red",ylab = '', main = '', xlim =c(-0.1,0.1),
ylim=c(0,65), xaxs="i", yaxs="i", las=1, cex.lab=1.8, cex.axis=1.8)
lines(x, qx, type="l", lty=2, lwd=4, col="blue",xlab="x value",ylab="Density", main="")
legend("topleft", legend=c("Empirical density", "Gaussian density"),col=c("red", "blue"),
lty=1:2, cex=1.5);grid(lwd = 2)
" 21
Empirical density
60 Gaussian density
50
40
30
20
10
0
−0.10 −0.05 0.00 0.05 0.10
x
Form the above figure, we note that market returns have kurtosis higher
than that of the normal distribution, i.e. their distribution is leptokurtic, in
addition to showing some negative skewness.
The next code and graph present a comparison of market prices to a
calibrated lognormal distribution.
0.00012
Empirical density
Lognormal density
0.00010
0.00008
0.00006
0.00004
0.00002
22 "
We note that the empirical density has significantly higher kurtosis and non
zero skewness in comparison with the Gaussian probability density. On the
other hand, power tail probability densities of the form φ(x) ≃ Cα /xα ,
x → ∞, can provide a better fit of empirical probability density functions,
as shown in Figure 1.20.
Empirical density
60 Power density
50
40
30
20
10
0
−0.10 −0.05 0.00 0.05 0.10
install.packages("pracma")
library(pracma); x <- seq(-0.25, 0.25, length=1000)
stock.dens=density(returns,na.rm=TRUE, from = -0.1, to = 0.1, n = 1000)
a<-rationalfit(stock.dens$x, stock.dens$y, d1=2, d2=2)
dev.new(width=16,height=8)
plot(stock.dens$x,stock.dens$y, lwd=4, type = "l",xlab = '', col="red",ylab = '', main = '',
xlim =c(-0.1,0.1), ylim=c(0,65), xaxs="i", yaxs="i", las=1, cex.lab=1.8, cex.axis=1.8)
lines(x,(a$p1[3]+a$p1[2]*x+a$p1[1]*x^2)/(a$p2[3]+a$p2[2]*x+a$p2[1]*x^2),
type="l",lty=2,col="blue",xlab="x value",lwd=4, ylab="Density",main="")
legend("topleft", legend=c("Empirical density", "Power density"),col=c("red", "blue"),
lty=1:2, cex=1.5);grid(lwd = 2)
$p2
[1] 1.000000e+00 -6.460948e-04 1.314672e-05
which yields a rational fraction of the form
" 23
A solution to this tail problem is to use stochastic processes with jumps, that
will account for sudden variations of the asset prices. On the other hand,
such jump models are generally based on the Poisson distribution which has
a slower tail decay than the Gaussian distribution. This allows one to assign
higher probabilities to extreme events, resulting in a more realistic modeling
of asset prices. Stable distributions with parameter α ∈ (0, 2) provide typical
examples of probability laws with power tails, as their probability density
functions behave asymptotically as x 7→ Cα /|x|1+α when x → ±∞.
+Y tn
= log E et(X +Y )
X
κX
n
n!
n⩾1
X tn X tn
= κX
n + κYn
n! n!
n⩾1 n⩾1
X tn
= κX Y
n + κn , t ∈ R,
n!
n⩾1
showing that κX +Y = κX + κY , n ⩾ 1.
n n n
[n/3]
1 X X κX X
l1 · · · κlm
cn = , n ⩾ 3.
(κX
2 ) n/2
m=1 l
m!l1 ! · · · lm !
1 +···+lm =n
l1 ,...,lm ⩾3
κX κX
c3 = 3
and c4 = 4
.
3!(κX
2 )
3/2 4!(κX
2 )
2
" 25
(1) 1 x − κX
1
ϕX ( x ) =q φ q
κX2 κX
2
install.packages("SimMultiCorrData");install.packages("PDQutils")
library(SimMultiCorrData);library(PDQutils)
dev.new(width=16,height=8);m<-calc_moments(returns[!is.na(returns)]);
x <- stock.dens$x; qx <- dnorm(x,mean=m[1],sd=m[2])
plot(x,stock.dens$y, xlab = 'x', type = 'l', lwd=4, col="red",ylab = '', main = '', xlim
=c(-0.1,0.1), ylim=c(0,65), xaxs="i", yaxs="i", las=1, cex.lab=1.8, cex.axis=1.8)
lines(x, qx, type="l", lty=2, lwd=4, col="blue")
cumulants<-c(m[1],m[2]**2);d2 <- dapx_edgeworth(x, cumulants)
lines(x, d2, type="l", lty=2, lwd=4, col="blue")
cumulants<-c(m[1],m[2]**2,m[3]*m[2]**3);d3 <- dapx_edgeworth(x, cumulants)
lines(x, d3, type="l", lty=2, lwd=4, col="green")
cumulants<-c(m[1],m[2]**2,0.5*m[3]*m[2]**3,0.2*m[4]*m[2]**4)
d4 <- dapx_edgeworth(x, cumulants);lines(x, d4, type="l", lty=2, lwd=4, col="purple")
legend("topleft", legend=c("Empirical density", "Gaussian density", "Third order
Gram-Charlier", "Fourth order Gram-Charlier"),col=c("red", "blue", "green",
"purple"), lty=1:2,cex=1.5);grid(lwd = 2)
Empirical density
60 Gaussian density
Third order Gram−Charlier
Fourth order Gram−Charlier
50
40
30
20
10
0
−0.10 −0.05 0.00 0.05 0.10
x
26 "
Exercises
Exercise 1.1 Let c > 0. Using the definition of Brownian motion (Bt )t∈R+ ,
show that:
a) (Bc+t − Bc )t∈R+ is a Brownian motion.
b) (cBt/c2 )t∈R+ is a Brownian motion.
2.5
St
2
1.5
0.5
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
t
" 27
Time series are sequences of data points indexed in discrete time. This chap-
ter reviews the Moving Average (MA), Autoregressive (AR), Autoregressive
Moving Average (ARMA), and Autoregressive Integrated Moving Average
(ARIMA) time series models. The stationarity properties of time series are
considered via their autocovariance graph and unit root testing. Several ex-
amples are considered, including the fitting of time series models to financial
data in . We conclude with an application to a pair trading algorithm on
a financial market, which relies the Dickey-Fuller stationarity test.
White noise
Zn<-rnorm(100,0,1)
Zn
" 29
Xn := Zn + β1 Zn−1 + · · · + βq Zn−q
Xq
= Zn + βk Zn−k , n ⩾ 0, (2.1)
k =1
library(zoo)
N=5; Zn<-zoo(rnorm(N,0,1))
Zn
lag(Zn,-1, na.pad = TRUE)
Xn = Zn + β1 LZn + · · · + βq Lq Zn
Xq
= Zn + βk Lk Zn
k =1
= Zn + ψ ( L ) Zn , n ⩾ q,
where
q
X
ψ (L) = β1 L + · · · + βq Lq = βk Lk
k =1
is the moving average operator given by the function
q
X
ψ ( x ) = β1 x + · · · + βq x q = βk x k .
k =1
30 "
n=41
ma.sim<-arima.sim(model=list(ma=c(-.7,.1)),n.start=100,n)
x=seq(100,100+n-1);dev.new(width=12, height=6)
plot(x,ma.sim,pch=19, ylab="", xlab="n",main = 'MA(2) Samples',col='blue',cex.axis=1.8,
cex.lab=1.5,las=1)
lines(x,ma.sim,col='blue');grid()
The ARIMA command uses a parameter “n.start”, here taken equal to 100,
which creates a “burn-in” initial time interval which ensures sufficient ran-
domness in the behavior of Xn .
MA(2) Samples
−1
−2
−3
100 110 120 130 140
n
In the simplest AR(1) model, the current state Xn of the system is expressed
in feedback form as
Xn := Zn + α1 Xn−1 , n ⩾ 1, (2.3)
Xn = Zn + α1 LXn + · · · + αp Lp Xn
Xp
= Zn + αk Lk Xn
k =1
" 31
= Zn + ϕ(L)Xn , n ⩾ p,
where
p
X
ϕ(L) = α1 L + · · · + αp Lp = αk Lk
k =1
is the operator given by the function
p
X
ϕ(x) = α1 x + · · · + αp xp = α k xk .
k =1
Xn := Zn + α1 Xn−1 , n ∈ Z, (2.5)
defines an AR(1) process (Xn )n∈Z , and can be solved recursively in the fol-
lowing cases:
a) When |α1 | < 1, (2.5) admits the converging causal moving average solution
X
Xn = α1k Zn−k , n ∈ Z, (2.6)
k⩾0
with X 1
Var[Xn ] = |α1 |2k = ⩾ 1, n ∈ Z. (2.7)
1 − |α1 |2
k⩾0
b) When |α1 | > 1, (2.5) admits the converging non-causal moving average
solution X 1
Xn = − Zn + k , n ⩾ 0, (2.8)
αk
k ⩾1 1
with X 1
Var[Xn ] = |α1 |−2k = , n ⩾ 0. (2.9)
|α1 |2 − 1
k⩾1
Proof.
a) When |α1 | < 1 we may write, using backward induction,
Xn = Zn + α1 Xn−1
= Zn + α1 (Zn−1 + α1 Xn−2 )
= Zn + α1 (Zn−1 + α1 (Zn−2 + α1 Xn−3 ))
32 "
when the solution z = 1/α1 of the equation ϕ(z ) = α1 z = 1 satisfies |z| < 1.
□
n=41; ar.sim<-arima.sim(model=list(ar=c(.9,-.2)),n.start=100,n)
x=seq(100,100+n-1)
dev.new(width=12, height=6)
plot(x,ar.sim,pch=19, ylab="", xlab="n", main = 'AR(2) Samples',col='blue',cex.axis=1.8,
cex.lab=1.5,las=1)
lines(x,ar.sim,col='blue');grid()
" 33
AR(2) Samples
−1
−2
n=41
arma.sim<-arima.sim(model=list(ar=c(.9,-.2),ma=c(-.7,.1)),n.start=100,n)
x=seq(100,100+n-1);dev.new(width=12, height=6)
plot(x,arma.sim,pch=19, ylab="", xlab="n", main = 'ARMA(2)
Samples',col='blue',cex.axis=1.8, cex.lab=1.5,las=1)
lines(x,arma.sim,col='blue');grid()
34 "
ARMA(2) Samples
−1
−2
100 110 120 130 140
n
∇ := I − L
∇Xn := Xn − Xn−1 , n ⩾ 1.
∇2 Xn = ∇∇Xn
= ∇(Xn − Xn−1 )
= ∇Xn − ∇Xn−1
= Xn − Xn−1 − (Xn−1 − Xn−2 )
= Xn − 2Xn−1 + Xn−2 ,
and
∇3 Xn = ∇∇2 Xn
= ∇Xn − 2∇Xn−1 + ∇Xn−2
= Xn − Xn−1 − 2(Xn−1 − Xn−2 ) + Xn−2 − Xn−3
= Xn − 3Xn−1 + 3Xn−2 − Xn−3 .
The time series (Xn )k⩾1 can be recovered by integrating (∇Xk )k⩾1 using
the telescoping identity
n
X n
X
Xn = X0 + (Xk − Xk−1 ) = X0 + ∇Xk , n ⩾ 1. (2.12)
k =1 k =1
" 35
More generally, the process (Xn )n⩾0 can be recovered by successive appli-
cations of the discrete integration formula (2.12) as in the next proposition,
where we use the convention ∇0 = I.
Proposition 2.5. a) The iterated operator ∇d satisfies
d
X d
∇d Xn = (−1)k Xn−k , n ⩾ d ⩾ 0.
k
k =0
d
X d
Xn = Xn−d + ∇k Xn+k−d , n ⩾ d ⩾ 0.
k
k =1
∇d = ( I − L ) d
d
X d
= (I)n−k (−L)k
k
k =0
d
X d
= (−1)k Lk .
k
k =0
∇d Xn := Zn + α1 ∇d Xn−1 + · · · + αp ∇d Xn−p
+β1 Zn−1 + · · · + βq Zn−q
Xp X q
= Zn + αk ∇d Xn−k + βk Zn−k , (2.13)
k =1 k =1
36 "
∇d Xn = Zn + ϕ(L)∇d Xn + ψ (L)Zn ,
(I − ϕ(L))∇d Xn = Zn + ψ (L)Zn ,
n ⩾ Max(p + d, q + d). The process (Xn )n⩾0 can then be recovered by suc-
cessive applications of the discrete integration formula (2.12) as in Proposi-
tion 2.5-(b). Alternatively, we can start by recovering ∇d−1 Xn from ∇d Xn
as
n
X
∇d−1 Xn = ∇d−1 X0 + ∇d−1 Xk − ∇d−1 Xk−1
k =1
X n
= ∇d−1 X0 + ∇d Xk ,
k =1
followed by
∇d−2 Xn , ∇d−3 Xn , . . . , ∇2 Xn , ∇Xn , Xn ,
by induction on n ⩾ d.
n=41;d=2
arima.sim<-arima.sim(model=list(ar=c(0.5),ma=c(0.5, 0.5, -0.5), order=c(1,d,3)),
n.start=100,n)
x=seq(100,100+n+d-1); dev.new(width=12, height=6)
plot(x,arima.sim,pch=19, ylab="", xlab="n", main = paste("ARIMA(1,",d,",3)
Samples",sep=" "),cex.axis=1.8, cex.lab=1.5,las=1)
lines(x,arima.sim,col='blue');grid()
" 37
80
60
40
20
0
100 110 120 130 140
n
Note that the ARIMA graph of Figure 2.4 has more potential for prediction
than the ARMA graph of Figure 2.3 due to increased dependence on past
samples in the considered model, or longer memory.
Xn := σn Zn , n ⩾ 0, (2.14)
where
p
X
σn2 = α0 + 2
αk Xn−k , n ⩾ p, (2.15)
k =1
and α0 , . . . , αp ⩾ 0 is a sequence of nonnegative deterministic coefficients.
Using the lag operator L, we can rewrite (2.15) as
p
X
σn2 = α0 + αk Lk Xn2
k =1
= α0 + ψ (L)Xn2 , n ⩾ p,
where
38 "
p
X
ψ (L) = α1 L + · · · + αp Lp = αk Lk .
k =1
In particular, using the independence of σn and Zn , we have
library(fGarch)
arch.spec<-garchSpec(model=list(omega = 10E-6,alpha=c(0.2,0.4),beta = 0))
n=100; arch.sim<-garchSim(arch.spec,n); x=seq(1,n); dev.new(width=12, height=6)
plot(x,arch.sim,pch=19, ylab="", xlab="n", main = 'ARCH(2) Samples', col='blue',
cex.axis=1.5, cex.lab=1.7, las=1)
lines(x,arch.sim,col='blue');grid()
ARCH(2) Samples
0.03
0.02
0.01
0.00
−0.01
−0.02
−0.03
0 20 40 60 80 100
n
" 39
where
q
X
ϕ(L) = α1 L + · · · + αq Lq = αk Lk
k =1
and
q
X
ψ ( L ) = β1 L + · · · + βq L q = βk Lk .
k =1
In particular, we have
40 "
library(fGarch)
garch.spec<-garchSpec(model=list(omega = 10E-6,alpha=c(0.2,0.4),beta = c(0.3)))
n=100; garch.sim<-garchSim(garch.spec,n); x=seq(1,n); dev.new(width=12, height=6)
plot(x,garch.sim,pch=19, ylab="", xlab="n", main = 'GARCH(2,1) Samples', col='blue',
cex.axis=1.5, cex.lab=1.7, las=1)
lines(x,garch.sim,col='blue');grid()
ARCH(2) Samples
0.010
0.005
0.000
−0.005
−0.010
0 20 40 60 80 100
n
σn2 := α0 + α1 Xn−1
2 2
+ β1 σn−1 , n ∈ Z,
define a GARCH(1, 1) process (Xn )n∈Z , and can be solved when α1 + β1 < 1
as
X n−1Y
σn2 = α0 α1 Zl2 + β1 , n ⩾ 1, (2.19)
k ⩽n l = k
with
X α0
E[σn2 ] = α0 (α1 + β1 )k = , n ⩾ 1. (2.20)
1 − α1 − β1
k⩾0
Strict stationarity
Definition 2.10. A time series (Xn )n∈Z is strictly stationary if the equality
" 41
d
(Xn , Xn−1 , . . . , Xn−p ) ≃ (Xn+m , Xn+m−1 , . . . , Xn+m−p ),
Example. The MA(q ) time series (Xn )n⩾0 is strictly stationary since
Weak stationarity
∗
The covariance Cov(X, Y ) is defined as Cov(X, Y ) := E[XY ] − E[X ]E[Y ].
42 "
dev.new(width=12, height=6)
n=1000; ar.sim<-arima.sim(model=list(ar=c(.9,-.2)),n.start=100,n)
ar.acf<-acf(ar.sim,type="covariance",plot=T,col='blue',lwd=4)
dev.new(width=12, height=6)
ar.ccf<-ccf(ar.sim,ar.sim,type="covariance",plot=T,lwd=4,col='blue',main='',cex.axis=1.8,
cex.lab=1.5,las=1);grid()
2.0
1.5
ACF (cov)
1.0
0.5
0.0
−30 −20 −10 0 10 20 30
Lag
Fig. 2.7: Autocovariances of AR(2) Samples.
with
ϕ(z ) = α1 z + · · · + αq z q , z ∈ C.
1) Unit root test. The AR(q ) time series (Xn )n⩾0 is weakly stationary if
and only if no (complex) solution of the equation ϕ(z ) = 1 lies on the
complex unit circle {z ∈ C : |z| = 1} in the complex plane C.∗
2) Causality. The AR(q ) time series is causal if and only if the equation
ϕ(z ) = 1 has no solution inside the complex unit disk {z ∈ C : |z| ⩽ 1}.
Examples.
i) In the AR(1) example
Xn := Zn + α1 Xn−1 = Zn + ϕ(L)Xn , n ⩾ 1,
" 43
|α1 | ̸= 1. Hence, by Theorem 2.12 the time series (Xn )n⩾2 is (weakly)
stationarity if and only if |α1 | ̸= 1.
In this case, by Proposition 2.3 we have the series representations
X
Xn =
α1k Zn−k , |α1 | < 1, (2.21a)
k ⩾0
X 1
Xn = − Zn + k , |α1 | > 1, (2.21b)
αk
1
k ⩾1
satisfies
X X
Cov(Xn , Xm ) = E α1k Zn−k αl1 Zm−l
k⩾0 l ⩾0
X
= α1n−m |α1 |2k
k⩾0
α1n−m
= , n ⩾ m ⩾ 0.
1 − |α1 |2
satisfies
X 1 X 1
Cov(Xn , Xm ) = E Zn + k Zm + l
αk
k⩾1 1
αl
l ⩾1 1
α1m−n
= , n ⩾ m ⩾ 0.
|α1 |2 − 1
44 "
We note that the expressions (2.6)-(2.7) in the case |α1 | < 1 correspond
to strictly stationary times series, while (2.8)-(2.9) in the case |α1 | > 1
correspond to weakly, but not strictly, stationary times series.
ii) In the AR(2) example
ℜ(z )
−1 −0.5 0.5 1
√ √
− 3/2 1−ℑ 3
2
√
The solutions z = (1 ± i 3)/2 of the equation ϕ(z ) = 1 lie on the unit
circle, hence by Theorem 2.12 the time series (Xn )n⩾2 is not (weakly)
stationarity. The next Figure 2.8 presents a simulation of non-stationary
time series according to the attached code.∗
∗
Right-click to save as attachment (may not work on .
" 45
10
200
5
100
0 0
−100
−5
−200
−10
0 10 20 30 40 50 0 5000 10000 15000 20000
n n
Stationarity test
t=1
representing the quadratic distance between (Xt )t=1,2,...,n and (α1 Xt−1 )t=1,2,...,n .
By Ordinary Linear Regression (OLS), the value of α1 that minimizes this
distance is given by
n
X
Xt−1 Xt
t=1
ρbn := n , n ⩾ 1,
X
2
Xt−1
t=1
46 "
install.packages('tseries')
library('tseries')
adf.test(ar.sim)
adf.test(arima.sim)
0.2
0.1
p value
0
−5 −4 −3 −2 −1 0 1 2 3 4 5 6 7 8 9 10 11
Possible results
" 47
Applying the Augmented Dickey-Fuller Test to the ARIMA time series of Fig-
ure 2.4 would not allow us to reject the nonstationarity (null) hypothesis H0 .
Other stationarity tests for time series include the Kwiatkowski–Phillips–Schmidt–Shin
(KPSS) test.
arima(data,order=c(p,d,q))
For an example based on market returns, we can use the following data set.
library(quantmod)
getSymbols("1800.HK",from="2013-01-01",to="2014-11-30",src="yahoo")
stock=Ad(`1800.HK`); stock=stock[!is.na(stock)];
stock.rtn=(stock-lag(stock))/lag(stock)[-1]; dev.new(width=12, height=6)
stock.rtn=stock.rtn[!is.na(stock.rtn)];
chartSeries(stock.rtn,up.col="blue",theme="white")
n = length(stock.rtn)
48 "
stock.rtn [2013−01−03/2014−11−28]
Last 0.0128866473351509
0.10
0.05
0.00
−0.05
Jan 03 Mar 01 May 02 Jul 02 Aug 01 Oct 02 Dec 02 Feb 04 Apr 01 Jun 03 Aug 01 Oct 03 Nov 28
2013 2013 2013 2013 2013 2013 2013 2014 2014 2014 2014 2014 2014
library(forecast)
auto.arima(stock.rtn)
The output of the auto.arima command identifies these data to a white noise,
as ARIMA(0,0,0).
Series: stock.rtn
ARIMA(0,0,0) with zero mean
sigma2 estimated as 0.0003266: log likelihood=1219.37
AIC=-2436.74 AICc=-2436.73 BIC=-2432.58
We can also fit these data to an MA(3) time series using the command
arima(stock.rtn,order=c(0,0,3))
Coefficients:
ma1 ma2 ma3
0.0029 0.0470 -0.0416
s.e. 0.0452 0.0467 0.0465
and AIC=-2430.19. Sample data from this time series can be generated (up
to rescaling) from
" 49
n=length(stock.rtn);
arima.sim<-arima.sim(model=list(ma=c(0.0029, 0.0470,
-0.0416),order=c(0,0,3)),n.start=100,n)
x=seq(100,100+n-1); dates <- index(stock.rtn)
ma<-xts(x =arima.sim, order.by = dates)*sd(stock.rtn);
myPars <- chart_pars();myPars$cex<-1.4
myTheme <- chart_theme();myTheme$col$line.col <- "blue"
myTheme$rylab <- FALSE; dev.new(width=16,height=8)
par(mfrow=c(1,2));chart_Series(stock.rtn,theme=myTheme,pars=myPars)
graph <-chart_Series(ma,theme=myTheme,pars=myPars); myylim <- graph$get_ylim()
myylim[[2]] <- structure(c(min(stock.rtn),max(stock.rtn)), fixed=TRUE)
graph$set_ylim(myylim); graph
0.10 0.10
0.08 0.08
0.06 0.06
0.04 0.04
0.02 0.02
0.00 0.00
−0.02 −0.02
−0.04 −0.04
−0.06 −0.06
−0.08 −0.08
Jan 03 Apr 02 Jul 02 Oct 02 Jan 02 Apr 01 Jul 02 Oct 03 Jan 03 Apr 02 Jul 02 Oct 02 Jan 02 Apr 01 Jul 02 Oct 03
2013 2013 2013 2013 2014 2014 2014 2014 2013 2013 2013 2013 2014 2014 2014 2014
Next, we fit these data to an ARMA(2,2) time series using the command
arima(stock.rtn,order=c(2,0,2))
Coefficients:
ar1 ar2 ma1 ma2
-1.0593 -0.9048 1.0509 0.9508
s.e. 0.0679 0.0444 0.0474 0.0273
and AIC=-2432.57. Sample data from this time series can be generated (up
to rescaling) from
50 "
n=length(stock.rtn);
arima.sim<-arima.sim(model=list(ar=c(-1.0593,-0.9048),ma=c(1.0509,0.9508),order=c(2,0,2)),
n.start=100,n)
x=seq(100,100+n-1); dates <- index(stock.rtn)
ar<-xts(x =arima.sim, order.by = dates)*sd(stock.rtn);
myPars <- chart_pars();myPars$cex<-1.4
myTheme <- chart_theme();myTheme$col$line.col <- "blue"
myTheme$rylab <- FALSE; dev.new(width=16,height=8); par(mfrow=c(1,2));
chart_Series(stock.rtn,theme=myTheme,pars=myPars)
graph <-chart_Series(ar,theme=myTheme,pars=myPars); myylim <- graph$get_ylim()
myylim[[2]] <- structure(c(min(stock.rtn),max(stock.rtn)), fixed=TRUE)
graph$set_ylim(myylim); graph
0.10 0.10
0.08 0.08
0.06 0.06
0.04 0.04
0.02 0.02
0.00 0.00
−0.02 −0.02
−0.04 −0.04
−0.06 −0.06
−0.08 −0.08
Jan 03 Apr 02 Jul 02 Oct 02 Jan 02 Apr 01 Jul 02 Oct 03 Jan 03 Apr 02 Jul 02 Oct 02 Jan 02 Apr 01 Jul 02 Oct 03
2013 2013 2013 2013 2014 2014 2014 2014 2013 2013 2013 2013 2014 2014 2014 2014
These data can also be fit to a GARCH(1,1) time series using the following
command.
library(fGarch)
garchFit(~ garch(1,1), data = stock.rtn, trace = FALSE)
Sample data from this time series can be generated (up to rescaling) from
" 51
n=length(stock.rtn);
garch.spec<-garchSpec(model=list(omega = 9.124e-06, alpha=c(4.522e-02),beta =
c(9.308e-01)))
garch.sim<-garchSim(garch.spec,n);
x=seq(100,100+n-1); dates <- index(stock.rtn)
garch<-xts(x =garch.sim, order.by = dates)
myPars <- chart_pars(); myPars$cex<-1.4
myTheme <- chart_theme();myTheme$col$line.col <- "blue"
myTheme$rylab <- FALSE; dev.new(width=16,height=8)
par(mfrow=c(1,2));chart_Series(stock.rtn,theme=myTheme,pars=myPars)
graph <-chart_Series(garch,theme=myTheme,pars=myPars); myylim <- graph$get_ylim()
myylim[[2]] <- structure(c(min(stock.rtn),max(stock.rtn)), fixed=TRUE)
graph$set_ylim(myylim); graph
0.10 0.10
0.08 0.08
0.06 0.06
0.04 0.04
0.02 0.02
0.00 0.00
−0.02 −0.02
−0.04 −0.04
−0.06 −0.06
−0.08 −0.08
Jan 03 Apr 02 Jul 02 Oct 02 Jan 02 Apr 01 Jul 02 Oct 03 Jan 03 Apr 02 Jul 02 Oct 02 Jan 02 Apr 01 Jul 02 Oct 03
2013 2013 2013 2013 2014 2014 2014 2014 2013 2013 2013 2013 2014 2014 2014 2014
library(quantmod)
getSymbols("1800.HK",from="2007-01-03",to="2011-12-02",src="yahoo")
stock=Ad(`1800.HK`)
chartSeries(stock,up.col="blue",theme="white")
n = length(stock)
arima(stock,order=c(2,1,2))
52 "
stock [2007−01−03/2011−12−02]
Last 5.565
20
15
10
Series: stock
ARIMA(2,1,0)
Coefficients: ar1 ar2 0.0605 -0.0006 s.e. 0.0288 0.0288
sigma2 = 0.05082: log likelihood = 84.47
AIC=-162.94 AICc=-162.92 BIC=-147.63
We may also fit these data to an ARIMA(2,1,2) time series using the com-
mand arima(stock,order=c(2,1,2)).
Coefficients:
ar1 ar2 ma1 ma2
-0.3073 -0.9626 0.3452 0.9783
s.e. 0.0137 0.0178 0.0092 0.0155
sigma2 estimated as 0.04987: log likelihood = 94.49, aic = -178.98
n=length(stock)-1
arima.sim<-arima.sim(model=list(ar=c(-0.3133,-0.9464),ma=c(0.3535,0.9637),order=c(2,1,2)),
n.start=100,n)
x=seq(100,100+n)
dates <- index(stock); ar<-xts(x =arima.sim, order.by = dates)
myPars <- chart_pars();myPars$cex<-1.4
myTheme <- chart_theme();myTheme$col$line.col <- "blue"
myTheme$rylab <- FALSE; dev.new(width=16,height=8)
par(mfrow=c(1,2));chart_Series(stock,theme=myTheme,pars=myPars)
chart_Series(as.vector(stock[1])+ar,theme=myTheme,pars=myPars)
" 53
15
15
14
13 10
12
5
11
10 0
9
−5
8
7 −10
6 −15
5
−20
4
3 −25
2007 2008 2009 2010 2011 2007 2008 2009 2010 2011
Jan 03 Jan 02 Jan 02 Jan 04 Jan 03 Dec 01 Jan 03 Jan 02 Jan 02 Jan 04 Jan 03 Dec 01
2007 2008 2009 2010 2011 2011 2007 2008 2009 2010 2011 2011
install.packages("quantmod");library(quantmod)
symbols = c("1800.HK","KO","PEP");symbols = c("1800.HK","MSFT","AAPL")
getSymbols(symbols, from=Sys.Date()-365, to=Sys.Date());ClosePrices <- lapply(symbols,
function(x) Ad(get(x)))
getSymbols(symbols, from="2017-01-01", to="2018-01-01");ClosePrices <- lapply(symbols,
function(x) Ad(get(x)))
stock<-do.call(merge, ClosePrices);stock.price<-stock[rowSums(is.na(stock[ , 1:3])) == 0, ];
price.pair <- stock.price[,2:3]["2017-02-01::"]
chartSeries(stock.price[,2],up.col="blue",theme="white",name = symbols[2])
chartSeries(stock.price[,3],up.col="blue",theme="white",name = symbols[3])
myPars <- chart_pars();myPars$cex<-1.4;myTheme <- chart_theme();
myTheme$col$line.col<-"blue"
dev.new(width=16,height=8);par(mfrow=c(1,3))
chart_Series(stock.price[,2],theme=myTheme,name = symbols[2],pars=myPars)
chart_Series(stock.price[,3],theme=myTheme,name = symbols[3],pars=myPars)
add_TA(stock.price[,2], col='purple', lw =2, on = 1)
∗
The animation works in Acrobat Reader on the entire pdf file.
54 "
stock.price stock.price
[2017−01−03/2017−12−20] [2017−01−03/2017−12−20]
2 Last 85.519997
3 Last 174.350006
85
170
80 160
150
75
140
70
130
65
120
60
Jan 03 Mar 01 May 02 Jul 03 Sep 01 Nov 01 Dec 20 Jan 03 Mar 01 May 02 Jul 03 Sep 01 Nov 01 Dec 20
2017 2017 2017 2017 2017 2017 2017 2017 2017 2017 2017 2017 2017 2017
Linear regression
As the two assets may evolve within different price ranges, we use a linear
regression to put them both on the scale of the second asset.
AAPL 2017−01−03 / 2017−12−29 85
80 80
75 75
70 70
65 65
60 60
55 55
50
45
40
35
30
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
Jan 03 Feb 01 Mar 01 Apr 03 May 02 Jun 01 Jul 03 Aug 01 Sep 01 Oct 03 Nov 01 Dec 01 Dec 29
2017 2017 2017 2017 2017 2017 2017 2017 2017 2017 2017 2017 2017
Letting
(1) (1) (2) (2)
rt := log(St ) and rt := log(St ), t ⩾ 1,
by an Ordinary Least Square (OLS) regression using the command lm
(linear model), we derive a linear relationship of the form
(2) (1)
rt = a + brt + Xt , t ⩾ 1, (2.22)
(1) (2)
between rk k⩾1 and rk k⩾1 , where Xk is a random remainder term, by
minimization of the quadratic residual distance
n
(2) ( 1 ) 2
X
rt − a − brt (2.23)
t=1
" 55
(2) (1)
between rt t=1,2,...,n
and a + brt t=1,2,...,n
, i.e.
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 − r̃l
n
n n
bb = k=1 k,l=1
k =1 l =1 l =1
.
n n = 2
1 X (1) (1) n n
!
1 X (1)
(1) 2
X
( ) − (1)
X
r r r
r − r
k n k l k k
n
k =1 k,l=1 k =1 k =1
cf. Exercise 2.6. The coefficient a in (2.22) is called the premium, and b is
called the hedge ratio.
2017−02−01 / 2017−12−29
42 42
41 41
40 40
39 39
38 38
37 37
36 36
35 35
34 34
33 33
32 32
31 31
Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
Feb 01 Mar 01 Apr 03 May 02 Jun 01 Jul 03 Aug 01 Sep 01 Oct 03 Nov 01 Dec 01 Dec 29
2017 2017 2017 2017 2017 2017 2017 2017 2017 2017 2017 2017
This allows us to define the spread (Xt )t⩾1 via the linear relationship
(2) (1)
Xt := log(St ) − (premium + hedge.ratio × log(St )), t ⩾ 0.
56 "
0.06 0.06
0.04 0.04
0.02 0.02
0.00 0.00
−0.02 −0.02
−0.04 −0.04
−0.06 −0.06
Feb 01 Mar 01 Apr 03 May 02 Jun 01 Jul 03 Aug 01 Sep 01 Oct 03 Nov 01 Dec 01 Dec 29
2017 2017 2017 2017 2017 2017 2017 2017 2017 2017 2017 2017
Next, we model the spread Xt using an AR(1) time series and check for its sta-
(1) (2)
tionarity, in which case the log-price processes log St t⩾0 and log St t⩾0
are said to be cointegrated.
Dickey-Fuller test
Xn := Zn + α1 Xn−1 .
The Dickey-Fuller test allows us to test the null hypothesis H0 , i.e. “|α1 | = 1”,
against the alternative stationarity hypothesis “|α1 | ̸= 1”.
install.packages('tseries')
library('tseries')
adf.test(spread)
" 57
Pair trading
The trading signal is {−1, 1}-valued and determined by the alternating cross-
ing times of a threshold level by the spread.
signal<-spread;threshold <- 0.02
signal[1] = -sign(as.numeric(spread[1]));i=1
while (i<length(spread)){i=i+1;
while (i<length(spread) &&
sign(as.numeric(spread[i+1])-threshold)==sign(as.numeric(spread[i])-threshold))
{signal[i]=sign(threshold-as.numeric(spread[i-1]));i=i+1;print(i);}
signal[i]=sign(threshold-as.numeric(spread[i-1]));threshold=-threshold;print(i);}
signal[i]=sign(threshold-as.numeric(spread[i-1]));threshold <- abs(threshold)
ratio1=range(spread)[1]/threshold;ratio2=range(spread)[2]/threshold
tblue <- rgb(0, 0, 1, alpha=0.8);tred <- rgb(1, 0, 0, alpha=0.5)
dev.new(width=16,height=7)
barplot(spread,col = tblue,lwd = 3, main = "",cex.axis=1.4,cex=1.6,las=1);par(new=TRUE);
barplot(signal,offset=(range(spread)[1]+range(spread)[2])/threshold,ylim=c(ratio2,ratio1),
xpd = FALSE, col=tred,space = 0, border
="blue",xaxt="n",yaxt="n",xlab="",ylab="")
0.06
0.04
0.02
0.00
−0.02
−0.04
−0.06
Backtesting
The performance of the pair trading algorithm can be estimated by the fol-
lowing code.
58 "
return.pairtrading=(lag(signal)*(price.pair[,2]-lag(price.pair[,2]))-lag(signal)*hedge.ratio
*(price.pair[,1]-lag(price.pair[,1])))/(hedge.ratio*lag(price.pair[,1])+lag(price.pair[,2]))
return.pairtrading<-return.pairtrading[2:length(return.pairtrading)]
dev.new(width=16,height=7);par(mfrow=c(1,2))
plot(return.pairtrading,col='blue', main = "Returns",cex.axis=1,cex=1,las=1)
plot(100 * cumprod(1 + return.pairtrading),col='blue',main =
"Performance",cex.axis=1,cex=1,las=1)
where
1
(2)
ξt := signalt−1 × 1 + hedge.ratio ,
hedge.ratio
ξt(1) := (−signalt−1 ) ×
.
1 + hedge.ratio
112 112
110 110
108 108
106 106
104 104
102 102
Feb 02 Mar 01 Apr 03 May 02 Jun 01 Jul 03 Aug 01 Sep 01 Oct 03 Nov 01 Dec 01 Dec 29
2017 2017 2017 2017 2017 2017 2017 2017 2017 2017 2017 2017
" 59
112 112
110 110
108 108
106 106
104 104
102 102
Feb 02 Mar 01 Apr 03 May 02 Jun 01 Jul 03 Aug 01 Sep 01 Oct 03 Nov 01 Dec 01 Dec 29
2017 2017 2017 2017 2017 2017 2017 2017 2017 2017 2017 2017
is compared to the pair trading compounded portfolio return (2.24), see Fig-
ure 2.23 for another example of pair trading backtesting.∗
> source("pairtrading.R")
Examples of pairs: 005930.KS vs AAPL, 2600.HK vs 1919.HK
Enter Stock 1 (Ex: GOOG):2600.HK
Enter Stock 2 (Ex: AAPL):1919.HK
∗
Download the corresponding code.
60 "
350
Pair trading
0.2
300
0.1
250
Performance
Spread
0.0
200
−0.1
150
−0.2
100
−0.3
2017 2018 2019 2020 2017 2018 2019 2020
Exercises
Exercise 2.1 Consider the MA(1) time series (Xn )n⩾1 defined as
Xn := Zn + aZn−1 , n ⩾ 1,
for all k ∈ Z = {. . . , −3, −2, −1, 0, 1, 2, 3, . . .}, and plot it on the graph
below when a = 2.
Xn = Zn + Xn−1 , n ⩾ 1.
" 61
b) Check the (weak) stationarity of the AR(2) time series (Yn )n⩾1 given by
3 1
Yn = Zn + × Yn−1 − × Yn−2 , n ⩾ 2.
4 8
Hint: Consider the roots of φ(z ) = 1 where φ(z ) is the polynomial defined
by Xn = Zn + φ(L)Xn and L is the lag operator LXn = Xn−1 .
Exercise 2.3 Let α ∈ R. Consider an i.i.d. white noise sequence (Zn )n⩾0
with mean E[Zn ] = 0 and variance Var[Zn ] = 1, n ⩾ 1, and the AR(1) time
series (Xn )n⩾0 given by X0 := 0 and
Xn := Zn + αXn−1 , n ⩾ 1. (2.25)
Exercise 2.4 Consider an i.i.d. white noise sequence (Zn )n⩾0 with mean
E[Zn ] = 0 and variance Var[Zn ] = 1, n ⩾ 1, and the AR(3) time series
(Xn )n⩾3 given by
Cov(Xn , Xn ) = Var[Xn ],
Cov(Xn+1 , Xn ),
Cov(Xn+2 , Xn ),
Cov(Xn+k , Xn ), k ⩾ 3.
b) Show that (Xn )n⩾3 has same distribution as an MA(q ) time series (Yn )n⩾3
of the form
62 "
q
X
Yn = Zn + βk Zn−k ,
k =1
Exercise 2.5 Consider an AR(1) time series (Xn )n⩾0 given by X0 = 0 and
Xn := Zn + α1 Xn−1 , n ⩾ 1,
∇Xn := Xn − Xn−1 , n ⩾ 1,
a) Show that the first-order difference process (∇Xn )n⩾1 = (Xn − Xn−1 )n⩾1 .
forms an ARMA(1, 2) time series.
b) Show that the second-order difference process
(1) (2)
Exercise 2.6 Consider two sequences rk k⩾1 and rk k⩾1 of market
returns. We aim at deriving a linear relationship of the form
(2) (1)
rk = a + brk + Xk , k ∈ N,
(1) (2)
between rk k⩾1 and rk k⩾1 , where Xk is a random remainder term, by
minimization of the quadratic residual distance
n
(2) ( 1 ) 2
X
rk − a − brk (2.26)
k =1
(2) (1)
between rk k =1,2,...,n
and a + brk k =1,2,...,n
.
" 63
Exercise 2.7 Consider the following ADF test output on a time series:
Exercise 2.8 Let (Zn )n∈Z denote a white noise sequence with zero mean
and variance σ 2 , and consider the AR(2) time series (Xn )n∈Z given by
Xn = Zn + α1 Xn−1 + α2 Xn−2 , n ∈ Z.
64 "
" 65
The counting process (Nt )t∈R+ that can be used to model discrete arrival
times such as claim dates in insurance, or connection logs.
Nt
6
5
4
3
2
1
0
T1 T2 T3 T4 T5 T6 t
where
1 if t ⩾ Tk ,
k ⩾ 1, and (Tk )k⩾1 is the increasing family of jump times of (Nt )t∈R+ such
that
lim Tk = +∞.
k→∞
In order for the counting process (Nt )t∈R+ to be a Poisson process, it has to
satisfy the following conditions:
1. Independence of increments: for all 0 ⩽ t0 < t1 < · · · < tn and n ⩾ 1 the
increments
Nt1 − Nt0 , . . . , Ntn − Ntn−1 ,
are mutually independent random variables.
2. Stationarity of increments: Nt+h − Ns+h has the same distribution as
Nt − Ns for all h > 0 and 0 ⩽ s ⩽ t.
The meaning of the above stationarity condition is that for all fixed k ⩾ 0
we have
P ( Nt + h − Ns + h = k ) = P ( Nt − Ns = k ) ,
for all h > 0, i.e., the value of the probability
P ( Nt + h − Ns + h = k )
66 "
Based on the above assumption, given T > 0 a time value, a natural question
arises:
what is the probability distribution of the random variable NT ?
We already know that Nt takes values in N and therefore it has a discrete
distribution for all t ∈ R+ .
It is a remarkable fact that the distribution of the increments of (Nt )t∈R+ ,
can be completely determined from the above conditions, as shown in the
following theorem.
As seen in the next result, cf. Theorem 4.1 in Bosq and Nguyen (1996),
the Poisson increment Nt − Ns has the Poisson distribution with parameter
(t − s)λ.
Theorem 3.1. Assume that the counting process (Nt )t∈R+ satisfies the above
independence and stationarity Conditions 1 and 2 on page 66. Then, for all
fixed 0 ⩽ s ⩽ t the increment Nt − Ns follows the Poisson distribution with
parameter (t − s)λ, i.e. we have
((t − s)λ)k
P(Nt − Ns = k ) = e−(t−s)λ , k ⩾ 0, (3.2)
k!
(λt)k −λt
P ( Nt = k ) = e , t > 0.
k!
" 67
for all t > 0. This means that within a “short” time interval [t, t + h] of length
h, the increment Nt+h − Nt behaves like a Bernoulli random variable with
parameter λh. This fact can be used for the random simulation of Poisson
process paths.
The next code and Figure 3.2 present a simulation of the standard Poisson
process (Nt )t∈R+ according to its short time behavior (3.6).
lambda = 0.6;T=10;N=1000*lambda;dt=T*1.0/N
t=0;s=c();for (k in 1:N) {if (runif(1)<lambda*dt) {s=c(s,t)};t=t+dt}
dev.new(width=T, height=5)
plot(stepfun(s,cumsum(c(0,rep(1,length(s))))),xlim
=c(0,T),xlab="t",ylab=expression('N'[t]),pch=1, cex=0.8, col='blue', lwd=2,
main="", cex.axis=1.2, cex.lab=1.4,xaxs='i'); grid()
∗
The notation f (h) = o(hk ) means limh→0 f (h)/hk = 0, and f (h) ≃ hk means
limh→0 f (h)/hk = 1.
68 "
5
4
3
Nt
2
1
0
0 2 4 6 8 10
t
Fig. 3.2: Sample path of the Poisson process (Nt )t∈R+ .
λk
P(Nt+h − Nt = k ) ≃ hk , h → 0, t > 0.
k!
The intensity of the Poisson process can in fact be made time-dependent (e.g.
by a time change), in which case we have
r t λ(u)du k
w
t s
P(Nt − Ns = k ) = exp − λ(u)du , k = 0, 1, 2, . . . .
s k!
P(Nt+h − Nt = k )
r
t+h
exp − t
λ(u)du = 1 − λ(t)h + o(h), k = 0,
= exp − r t+h λ(u)du r t+h λ(u)du = λ(t)h + o(h),
t t k = 1,
o(h), k ⩾ 2.
The intensity process (λ(t))t∈R+ can also be made random, as in the case of
Cox processes.
In order to determine the distribution of the first jump time T1 we note that
we have the equivalence
" 69
which implies
tn−1
t 7−→ λn e−λt
(n − 1) !
with shape parameter n and scaling parameter λ on R+ , i.e., for all t > 0
the probability P(Tn ⩾ t) is given by
w∞ sn−1
P(Tn ⩾ t) = λn e−λs ds.
t (n − 1) !
Proof. We have
70 "
w∞ (λs)n−1
=λ e−λs ds, t ⩾ 0,
t (n − 1) !
where we applied an integration by parts to derive the last line. □
In particular, for all n ∈ Z and t ∈ R+ , we have
(λt)n
P(Nt = n) = pn (t) = e−λt ,
n!
i.e., pn−1 : R+ → R+ , n ⩾ 1, is the probability density function of the
random jump time Tn .
In addition to Proposition 3.2 we could show the following proposition which
relies on the strong Markov property, see e.g. Theorem 6.5.4 of Norris (1998).
τk := Tk+1 − Tk
" 71
6
Nt
0
0 2 4 6 8 10
i.e., the compensated Poisson process (Nt − λt)t∈R+ has centered increments.
72 "
1
Nt−t
−1
−2
0 2 4 6 8 10
Fig. 3.4: Sample path of the compensated Poisson process (Nt − λt)t∈R+ .
Since in addition (Nt − λt)t∈R+ also has independent increments, we get the
following proposition. We let
Ft := σ Ns : s ∈ [0, t]), t ⩾ 0,
(Nt − λt)t∈R+
" 73
0.4
Probability density
0.3
0.2
0.1
0
−4 −3 −2 −1 a 0 1 b 2 3 4
Definition 3.5. The process (Yt )t∈R+ given by the random sum
Nt
X
Yt := Z1 + Z2 + · · · + ZNt = Zk , t ⩾ 0, (3.8)
k =1
n
X
∗
We use the convention Zk = 0 if n = 0, so that Y0 = 0.
k =1
74 "
∆Yt := Yt − Yt- , t ⩾ 0,
where
∆Nt := Nt − Nt- ∈ {0, 1}, t ⩾ 0,
denotes the jump size of the standard Poisson process (Nt )t∈R+ , and Nt- is
the left limit
Nt- := lim Ns , t > 0,
s↗t
The next Figure 3.6 represents a sample path of a compound Poisson process,
with here Z1 = 0.9, Z2 = −0.7, Z3 = 1.4, Z4 = 0.6, Z5 = −2.5, Z6 = 1.5,
Z7 = −0.5, with the relation
YTk = YTk- + Zk , k ⩾ 1.
Yt
3
0
t
T1 T2 T3 T4 T5 T6 T7
-1
Example. Assume that the jump sizes Z are Gaussian distributed with mean
δ and variance η 2 , with
1 2 / (2η 2 )
ν (dy ) = p e−(y−δ ) dy.
2πη 2
N<-50;Tk<-cumsum(rexp(N,rate=0.5)); Yk<-cumsum(c(0,rexp(N,rate=0.5)))
plot(stepfun(Tk,Yk),xlim = c(0,10),lwd=2,do.points = F,main="L=0.5",col="blue")
Yk<-cumsum(c(0,rnorm(N,mean=0,sd=1)))
plot(stepfun(Tk,Yk),xlim = c(0,10),lwd=2,do.points = F,main="L=0.5",col="blue")
Given that {NT = n}, the n jump sizes of (Yt )t∈R+ on [0, T ] are independent
random variables which are distributed on R according to ν (dx). Based on
this fact, the next proposition allows us to compute the Moment Generating
Function (MGF) of the increment YT − Yt .
" 75
NT NT −Nt
" !# " !#
E eα(YT −Yt ) = E exp α
X X
= E exp α
Zk Zk+Nt
k = Nt + 1 k =+1
NT −Nt
" !#
X
= E exp α Zk
k =1
X NT
X −Nt
= E exp α Zk NT − Nt = n P(NT − Nt = n)
n⩾0 k =1
n
" !#
X λn
−(T −t)λ
X
=e (T − t) E exp α
n
Zk
n!
n⩾0 k =1
X λn n
= e−(T −t)λ
Y
(T − t)n E eαZk
n!
n⩾0 k =1
X λn n
−(T −t)λ
=e (T − t)n E eαZ
n!
n⩾0
= exp (T − t)λ E eαZ − 1 .
□
We note that we can also write
w∞
E eα(YT −Yt ) = exp (T − t)λ (eαy − 1)ν (dy )
−∞
w∞ w∞
= exp (T − t)λ eαy ν (dy ) − (T − t)λ ν (dy )
−∞ −∞
w∞
= exp (T − t)λ (eαy − 1)ν (dy ) ,
−∞
76 "
From the moment generating function (3.10) we can compute the expectation
and variance of Yt for fixed t. Note that the proofs of those identities require
to exchange the differentiation and expectation operators, which is possible
when the moment generating function (3.10) takes finite values for all α in a
certain neighborhood (−ε, ε) of 0.
Proposition 3.7. i) The expectation of Yt is given as the product of the
mean number of jump times E[Nt ] = λt and the mean jump size E[Z ],
i.e.,
∂ w∞
E[Yt ] = E[eαYt ]|α=0 = λt yν (dy ) = λtE[Z ].
∂α −∞
∂2
E Yt2 = E[eαYt ]|α=0
∂α2
∂2
exp λt E eαZ − 1 |α=0
=
∂α2
∂
λtE ZeαZ exp λt E eαZ − 1
=
∂α |α=0
= λtE Z 2 + (λtE[Z ])2
w∞ w ∞ 2
= λt y 2 ν (dy ) + (λt)2 yν (dy ) .
−∞ −∞
□
Relation (3.11) can be directly recovered using series summations, as
"N #
Xt
E[Yt ] = E Zk
k =1
"N #
X Xt
= E Zk Nt = n P(Nt = n)
n⩾1 k =1
" n #
X λn tn X
−λt
=e E Zk Nt = n
n!
n⩾1 k =1
" 77
" n #
X λ n tn X
= e−λt E Zk
n!
n⩾1 k =1
X (λt)n−1
= λte−λt E[Z ]
(n − 1) !
n⩾1
= λtE[Z ]
= E [ Nt ] E [ Z ] .
coincides with the dispersion index of the random jump size Z. By a multi-
variate version of Theorem 12.19, Proposition 3.6 can be used to show the
next result.
Proposition 3.8. (i) The compound Poisson process
Nt
X
Yt = Zk , t ⩾ 0,
k =1
has independent increments, i.e. for any finite sequence of times t0 < t1 <
· · · < tn , the increments
78 "
Mt := Yt − λtE[Z ], t ⩾ 0,
is a martingale.
1
Yt−t
−1
−2
0 2 4 6 8 10
Fig. 3.7: Sample path of a compensated compound Poisson process (Yt − λtE[Z ])t∈R+ .
" 79
S (t) = YNt , t ∈ R+ ,
where (Yk )k⩾1 is the sequence of random variables independent of (Nt )t∈R+
given by
Xk
Yk = Zj , k ⩾ 0,
j =1
Rx ( t ) = x + f ( t ) − S ( t ) , t ⩾ 0,
where x ⩾ 0 is the amount of initial reserves and f (t) is the premium income
received between time 0 and time t > 0.
In the next Figures 3.8 and 3.9 we take f (t) := ct with c = 0.5.
Rx
3
1
x
0
T1 T2 T3 T4 T5 t
Fig. 3.8: Sample path (without ruin) of a reserve process (Rx (t))t∈R+ .
Unlike the above figure, the next Figure 3.9 contains a ruin event.
80 "
Rx
3
x1
0
T1 T2 T3 T4 T5 t
Fig. 3.9: Sample path (with ruin) of a reserve process (Rx (t))t∈R+ .
Ψ ( x ) = P ∃ t > 0 : Rx ( t ) < 0 ,
given T > 0 a finite time horizon. The ruin probability ΨT (x) can also be
written as
ΨT (x) = P mT0 < −x , x ⩾ 0,
Cramér-Lundberg Model
" 81
λµ (λ/c−1/µ)x
Ψ (x) = e , x ⩾ 0, (3.14)
c
provided that c ⩾ λµ, with Ψ(x) = 1 if c < λµ.
Proof. a) Let
= E Φ(x + cT1 − Z1 )
w∞ w x+cs
=λ e−λs Φ(x + cs − z )dF (z )ds
0 0
λ λx/c w ∞ −λu/c w u
= e e Φ(u − z )dF (z )du, (3.15)
c x 0
where
F ( z ) : = P ( Z1 ⩽ z ) , z ∈ R+ ,
denotes the cumulative distribution function of the claim size Z1 . By differ-
entiating (3.15) with respect to x, we find
λ wx
Φ′ (x) = Φ (x) − Φ(x − z )dF (z )ds , (3.16)
c 0
82 "
λw∞
Φ (∞) = Φ (0) + Φ(∞ − z )(1 − F (z ))dz
c 0
λ w∞
= Φ (0) + Φ (∞) (1 − F (z ))dz
c 0
λ w ∞
= Φ (0) + Φ (∞) P(Z > z )dz
c 0
λµ
= Φ (0) + Φ (∞) , (3.17)
c
since
w∞ w∞
P(Z1 > z )dz = E[1{Z1 >z} ]dz
0 0
w
Z
=E dz
0
= E [ Z1 ]
=µ
λµ
Φ (∞) = Φ (0) + Φ (∞) ,
c
which yields Φ(0) = 1 − λµ/c and Φ(∞) = 1 when λµ ⩽ c, and Φ(0) =
Φ(∞) = 0 when λµ > c. In particular, the ruin probability in infinite time
starting from the initial reserve x = 0 is given by
Ψ (0) = 1 − Φ (0)
= P ∃ t ⩾ 0 : Rx ( t ) < 0
λµ
= , (3.18)
c
provided that λµ ⩽ c.
b) We refer to Exercise 3.2 for the computation of the ruin probability Ψ(x)
starting from any x > 0. when the claim sizes (Zk )k⩾1 are exponentially
distributed. □
R simulation∗
∗
Kaas et al. (2009), Example 4.3.7.
" 83
Figure 3.10 computes an estimate of the infinite time ruin probability Ψ(x)
by generating the sample paths of the reserve process (Rx (t))t∈R+ .
2 / 9 = 0.2222
60
40
R(t)
20
0
0 5 10 15 20
−20
Time t
∂ΨT
− (x).
∂x
∗
The animation works in Acrobat Reader on the entire pdf file.
84 "
have been proposed in Picard and Lefèvre (1997), see also De Vylder (1999)
and Ignatova et al. (2001), Rullière and Loisel (2004). In Privault and Wei
(2004; 2007), the Malliavin calculus has been used to provide a way to com-
pute the sensitivity of the probability
P ( Rx ( T ) < 0 )
that the terminal surplus is negative with respect to parameters such as the
initial reserve or the interest rate of the model.
Integral expressions
where we used the fact that Poisson jump times are independent uniformly
distributed on the square [0, T ]n given that {NT = n}.
" 85
w T w tk w t2
1{y<inf 1⩽l⩽k (f (tl )−Yl )} dt1 · · · dtk
X
−λT
=e E λ k
···
0 0 0
k⩾1
w T w tk + 1 w t2
1{f (t1 )>Y1 +y} · · · 1{f (tk+1 )>Yk+1 +y} dt1 · · · dtk+1
X
= λe−λT E λk ···
0 0 0
k⩾0
Analytic expressions for ruin probabilities have been obtained in case (Yk )k⩾1
are independent, exponentially distributed random variables with parameter
µ > 0 and f (t) = ct is linear, c ⩾ 0, Theorem 4.1 and Relation (4.6) of Dozzi
and Vallois (1997) show that
P mT0 < x
wT X (λµt(x + ct))n X (λµt(x + ct))n e−µ(x+ct)−λt
=λ x + ct dt,
n!(n + 1)!
0 (n!)2 x + ct
n⩾0 n⩾0
see also Theorem 3.1 of León and Villa (2009) for other related expressions.
Random drift
inf Xt , 0 ⩽ a < b,
t∈[a,b]
1 w∞ 2
w∞ 2 1 w ∞ −z 2 /(2a)
= p e−(x−y ) /(2a) e−z /(2(b−a)) dzdy + √ e dz.
π a(b − a) 0 y 2πa x
86 "
Mt := mFt t ∈ R+ .
(G − FT )+ 1{τx >T }
Exercises
x ∈ R+ .
" 87
b) Find E[Y ].
Exercise 3.2 Show that when the claim size distribution is exponential with
mean µ > 0, i.e. when F (z ) = 1 − e−z/µ , z ⩾ 0, the ruin probability is given
by
λµ x(λ/c−1/µ)
Ψ ( x ) = P ∃ t ∈ R + : Rx ( t ) < 0 = e , x ⩾ 0, (3.20)
c
provided that c ⩾ λµ.
88 "
b) Using the Chebyshev inequality (3.21), provide an upper bound for the
ruin probability P(x + f (T ) − S (T ) < 0) at time T > 0, provided that
x + f (T ) − λT E[Z1 ] > 0.
Hint: By the Chebyshev inequality inequality, for any random variable X
with mean µ > 0 and variance σ 2 we have
σ2
P(X ⩽ 0) = P(X − µ ⩽ −µ) ⩽ P(|X − µ| ⩾ µ) ⩽ . (3.21)
µ2
" 89
and correlation
E[XY ] − E[X ]E[Y ] P(X = 1 and Y = 1) − pX pY
ρ := = p .
Var [X ]Var [Y ] pX (1 − pX )pY (1 − pY )
p
∗
Correlation does not imply causation. Try “Spurious Correlations”.
" 91
Let
Cov(X, Y ) E[XY ] − E[X ]E[Y ]
ρ = corr (X, Y ) := p = .
Var [X ]Var [Y ] Var [X ]Var [Y ]
p
with determinant
2
det Σ = E X 2 E Y 2 − E[XY ]
2
= E X 2 E Y 2 1 − corr (X, Y )
⩾ 0,
92 "
!
1 1 x ⊤ −1 x
fΣ (x, y ) = √ exp − Σ (4.2)
2π det Σ 2 y y
⊤ E X 2 E[XY ] −1
1 1 x x
= √ exp − ,
2 y
2π det Σ E[XY ] E Y 2
y
0.08
0.06
0.04
0.02
4
0 2
-3
-2 0
-1 -2
0 y
1 -4
2
x 3
Fig. 4.1: Joint Gaussian probability density.
The probability density function (4.2) is called the centered joint (bivariate)
Gaussian probability density with covariance matrix Σ.
Note that when ρ = corr (X, Y ) = ±1 we have det Σ = 0 and the joint
probability density function fΣ (x, y ) is not defined.
1 1
f Σ ( x1 , . . . , xn ) = p exp − (x1 , . . . , xn )T Σ−1 (x1 , . . . , xn ) ,
(2π )n det Σ 2
" 93
The next remark plays an important role in the modeling of joint default
probabilities, see here for a detailed discussion.
Remark 4.1. There exist couples (X, Y ) with of random variables with
Gaussian marginals N (0, σ 2 ) and N (0, η 2 ), such that
i) (X, Y ) does not have the bivariate Gaussian distribution with proba-
biliy density function fΣ (x, y ), where Σ is the covariance matrix (4.1) of
(X, Y ).
ii) the random variable X + Y is not even Gaussian.
Proof. See Exercise 4.5. □
Examples.
i) The copula corresponding to independent uniform random variables
(U , V ) is given by
94 "
The next lemma is well known and can be used to generate random sam-
ples of a cumulative distribution function FX based on uniformly distributed
samples, see Proposition 3.1 in Embrechts and Hofert (2013) for its general
−1
statement. Here, FX denotes the generalized inverse of the Cumulative Dis-
tribution Function FX of X. By e.g. Proposition 2.3-(2) in Embrechts and
−1
Hofert (2013), since FX is non-decreasing in x ∈ R, FX is non-decreasing,
left-continuous, and admits limits on the right.
Lemma 4.3. Consider a random variable X with continuous and strictly
increasing distribution function
FX ( x ) : = P ( X ⩽ x ) , x ∈ R.
FU ( u ) = P ( U ⩽ u )
= P ( FX ( X ) ⩽ u )
−1
= P(X ⩽ FX (u))
−1
= FX ( FX (u))
= u, 0 ⩽ u ⩽ 1.
b) Similarly, we have
−1
P ( FX (U ) ⩽ x) = P(U ⩽ FX (x)) = FX (x), x ∈ R.
□
As a consequence of Lemma 4.3, given (X, Y ) a couple of random variables
with joint cumulative distribution function
" 95
U : = FX ( X ) and V := FY (Y )
satisfies
−1
= P X ⩽ FX (u) and Y ⩽ FY−1 (v )
−1
(u), FY−1 (v ) , 0 ⩽ u, v ⩽ 1,
= F(X,Y ) FX
is a copula.
= P U ⩽ FX (x) and V ⩽ FY (v )
= C(X,Y ) FX (x), FY (y ) , x, y ∈ R.
96 "
x1 , x2 , . . . , xn ∈ R.
The following proposition is a consequence of Sklar’s Theorem 4.5.
Proposition 4.6. Assume that the marginal distribution functions FXi are
continuous and strictly increasing. Then the joint cumulative distribution
function F(X1 ,...,Xn ) defines a n-dimensional copula
−1 −1
C (u1 , . . . , un ) := F(X1 ,...,Xn ) FX (u1 ), . . . , FX (un ) , (4.3)
1 n
C (1, . . . , 1, u, 1, . . . , 1)
−1 −1 −1 −1 −1
( 1 ) , . . . , FX (1), FX ( u ) , FX ( 1 ) , . . . , FX (1)
= F(X1 ,...,Xn ) FX 1 i−1 i i+1 n
−1
= F(X1 ,...,Xn ) + ∞, . . . , +∞, FXi (u), +∞, . . . , +∞
= FXe F −1 (u)
i Xei
= u, 0 ⩽ u ⩽ 1.
□
The following is a converse to Theorem 4.5.
∗
“The author considers continuous non-decreasing functions Cn on the n-dimensional
cube [0, 1]n with Cn (0, . . . , 0) = 0, Cn (1, . . . , 1, α, 1, . . . , 1) = α. Several theorems are
stated relating n-dimensional distribution functions and their marginals in terms of
functions Cn . No proofs are given.” M. Loève, Math. Reviews MR0125600.
" 97
F Ce en ) (x1 , . . . , xn ) := C FX
e1 (x1 ), . . . , FXen (xn ) , x1 , x2 , . . . , xn ∈ R,
(X1 ,...,X
e1 , . . . , X
defines a joint cumulative distribution function with marginals X en .
Proof. We note that the marginal distributions generated by F C ( x , . . . , xn )
(X en ) 1
e1 ,...,X
coincide with the respective marginals of (X1 , . . . , Xn ), as we have
e e
= C 1, . . . , 1, FXe (u), 1, . . . , 1
i
= FXe (u), 0 ⩽ u ⩽ 1.
i
Gaussian copulas
The choice of (4.2) above as joint probability density function, see Figure 4.1,
actually induces a particular dependence structure between the Gaussian ran-
dom variables X and Y , and corresponding to the joint cumulative distribu-
tion function
1ρ
Σ= ,
ρ1
FX ( x ) : = P ( X ⩽ x ) and FY (y ) := P(Y ⩽ y ),
CΣ (u, v ) := P FX (X ) ⩽ u and FY (Y ) ⩽ v
−1
= P X ⩽ FX (u) and Y ⩽ FY−1 (v )
−1
= Φ Σ FX (u), FY−1 (v ) , 0 ⩽ u, v ⩽ 1. (4.4)
C(x,y)
C(x,y)
0.4 0.4 0.4
y
0.4 0.4 0.4
0.6 0.6 0.6
" 99
1.0 100
2.0
0.8 80
0.6 1.5
c(x,y)
60
c(x,y)
c(x,y)
0.4 1.0 40
0.2 0.5 20
0.0 0.0 0
1.0 1.0 1.0
y
0.4 0.4 0.4
0.6 0.6 0.6
Fig. 4.3: Different Gaussian copula density graphs for ρ = 0, ρ = 0.35 and ρ = 0.999.
∂ 2 CΣ
cΣ (u, v ) = (u, v )
∂u∂v
∂2 −1
ΦΣ FX (u), FY−1 (v )
=
∂u∂v !
∂ 1 ∂ΦΣ −1 −1
,
= F X ( u ) FY ( v )
∂u FY′ (FY−1 (v )) ∂y
!
∂ 1 ∂ΦΣ −1 −1
FX (u), FY (v )
=
∂u fY (FY−1 (v )) ∂y
1 ∂ 2 ΦΣ
F −1 (u), FY−1 (v )
=
fX (FX−1
(u))fY (FY−1 (v )) ∂x∂y X
−1
(u), FY−1 (v )
f Σ FX
= −1 ,
fX (FX (u))fY (FY−1 (v ))
100 "
from the Gaussian copula CΣ (x, y ) and the respective cumulative distribu-
tion functions FX (x), FY (y ) of X and Y .
In that sense, the Gaussian copula CΣ (x, y ) encodes the Gaussian depen-
dence structure of the covariance matrix Σ. Moreover, the Gaussian copula
CΣ (x, y ) can be used to generate a joint distribution function F(CX,Y ) (x, y )
by letting
Gumbel copula
" 101
1.0
1.0
1.0
● ●●●●
●
●●● ●
●●● ●●● ●
●
● ●
●
●
●
● ●
●● ● ● ● ●●● ● ●●
● ●● ●●● ● ●●
●●
●●● ● ●
● ●●
●
● ●
● ● ●● ● ●●
●●●
● ●●
●
●
●
● ●● ●
●● ●
●
●
●●
●
●
●●
●
● ● ● ●
●● ●●●●
● ● ●
● ● ● ●●
●●● ● ● ● ●● ●●●
●●●●● ● ●● ●● ● ● ●
● ● ● ● ● ●●● ● ●●●●●●● ● ●●●
●
●
● ●●
●●
●
● ●●
● ● ● ●●●● ●
●● ● ● ●●
●●●● ●● ● ●
●
●●●
●
●●● ●
● ● ●
● ●● ● ●● ●● ● ●●●● ●
● ●
● ● ● ●●● ●●
● ●●●
●● ●●●● ● ●
●● ●●●● ●● ● ● ● ●● ●●●●●●
●●●
●●● ● ●● ●
● ● ●●●●
● ● ● ● ● ●● ● ● ● ● ●● ●● ● ●
●● ●● ● ●●
● ●● ● ● ● ● ● ● ●
●● ● ●● ● ●● ●
●●●●
●●●●
●
●
●
●
●●●●
●
● ● ●● ● ●●● ●● ● ● ● ●● ● ●●●●●●●● ● ● ● ●● ● ●● ● ●
●
●●●
● ●●
●
●
● ● ● ●● ● ● ●● ● ● ● ●● ● ●●● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ●● ●●● ●● ●●●●● ● ●●●●
● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ●●● ● ●● ●
● ●
●
● ●● ●● ● ● ●● ●●●●
●●● ● ●
●●
● ● ● ● ● ●
● ● ●●●
● ● ● ●● ● ● ● ● ● ● ● ●
● ●
●
● ● ● ● ● ● ●●● ●● ● ●● ●● ● ●● ● ●●
●● ● ●
●●●●
● ● ●●●
●
●●●●
● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ●● ● ●
●● ● ●● ●● ● ● ● ●● ● ● ● ● ●●●
●●●●●
●●●●
●●● ●●
● ● ● ● ● ● ● ●●●●● ● ●
● ● ●● ●● ●● ●
● ● ● ●● ● ● ● ● ●● ● ●● ● ● ●●●●●● ● ●●●●●● ● ●●
● ●
● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ●●●●
● ● ● ● ●● ●● ●●●
●●● ●● ●● ● ●
● ● ●
●
● ●
●
● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ●
●● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ● ●
●●●●●●
● ●●●●●
●● ● ●
● ● ● ●● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ●●● ● ● ● ● ● ● ●● ● ●●●●
●●
● ● ● ● ●●● ●
● ● ●
●● ● ●● ● ●
● ●●● ● ● ●
● ● ● ●
● ● ● ● ● ● ● ● ●● ●
● ●● ● ● ● ●●● ● ● ●● ●
● ● ● ● ●●
●● ● ●●●
●● ●●
●●●
●●●● ●
●
●●
● ●
●● ●● ●● ● ●
●● ● ● ●
●
●
●● ● ● ● ● ● ● ● ● ● ●● ● ●●●● ● ● ● ● ● ●
●●●●● ● ● ● ●● ●●
●
●●●● ●
●●●
● ●●
●
●●
●
● ● ● ● ● ● ● ● ●● ●● ● ●● ● ●● ●● ● ● ● ● ●● ● ●●● ● ● ● ●● ● ● ● ● ● ●● ● ●●
● ● ● ● ● ●●
● ● ● ●● ● ● ● ● ● ●● ● ●● ● ●●
●
●●
● ●● ● ● ● ●●● ●● ● ●● ●
●● ●●
●● ● ●
● ● ●
●
● ● ● ● ● ● ● ●● ● ● ●● ● ●
●●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ●●● ●● ● ● ●● ●●●● ● ●●●● ●● ● ● ●● ● ● ●●● ● ●● ●● ●
●
● ●
●●●● ●●
●
●
●● ● ● ● ●● ●
●●●● ●● ●● ● ● ● ●● ● ● ● ● ● ● ●
● ● ● ●● ● ●●● ●
●
●● ●● ●
● ●● ● ●● ● ●● ●●● ● ●●● ●●●
●
●●●
●●●●● ●●● ● ●
●● ● ● ● ● ●
● ● ● ● ●● ● ●
● ● ● ● ●●● ● ● ●● ● ●● ●●● ● ● ● ● ●●●● ● ● ● ● ● ●●
●● ● ● ●● ●● ● ●●●● ● ●●●●●●●●●● ●● ●
● ● ● ●
●● ● ● ● ● ● ● ● ●● ●
● ● ● ● ●● ● ● ● ●●● ●● ●
● ● ●● ● ● ● ● ●
● ● ● ● ● ● ● ●● ● ●● ● ●●●● ● ● ● ● ● ● ● ●● ● ● ●●●● ● ●●
● ● ● ● ● ● ● ● ● ● ●●● ● ● ●●
● ●● ●● ● ● ●● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ●
●
●● ● ● ●
●● ● ●
● ● ●● ●● ● ●●● ● ●● ●●●● ●
●● ●
● ● ● ●● ● ● ●● ● ● ● ● ● ●
●● ● ● ● ● ● ● ●
●● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ● ●●●● ● ●● ●● ● ● ●●● ●●●
● ● ●
● ● ● ● ●● ● ●● ● ● ● ● ●●● ●● ● ● ● ● ● ● ●
● ●● ●●● ● ●
●
●●●● ● ● ● ● ●● ● ●●● ● ● ● ●● ●● ● ●●● ●
●
●
● ●● ● ●
● ●● ● ● ● ● ● ●
●
● ●● ● ● ●● ●● ●● ● ● ●●●● ● ● ● ● ● ● ● ● ●● ● ●●
●
●
● ● ●● ● ● ●● ● ●●
●● ● ● ●● ●
● ● ●●● ●● ● ●
● ● ● ●● ● ●● ● ●
● ●
● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ●● ● ● ● ●● ●● ● ● ● ●●●●
● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●●
●
●●●●● ●●● ● ●
● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ●
● ●
● ● ● ● ● ● ● ●●● ●●●● ●
● ● ● ●
● ● ● ● ●● ● ● ● ●●● ●● ●
● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ●●● ●●● ● ● ●●● ● ●● ● ● ● ● ● ● ●●
● ●● ●
●● ●●●●
● ● ● ● ● ● ● ● ● ●● ● ●●●● ● ● ● ● ● ●● ● ● ●● ● ● ●●● ●
● ●● ● ● ●● ● ● ● ● ● ● ●
● ● ● ●
● ●●
● ● ● ●●
● ● ● ● ●
●●
● ●● ● ● ●●●● ● ● ● ● ● ●● ● ● ● ● ● ● ●●●●● ● ● ● ● ● ● ● ●● ●● ● ●●●● ●●
●
● ● ●● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ●● ● ● ●● ● ●●●●
● ●● ●●● ● ● ●
● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●●●●● ●● ● ● ● ● ●● ● ●● ● ● ● ● ●● ● ●
0.8
●
0.8
0.8
●● ● ● ● ●
●●● ● ●● ●
● ●● ● ●
●● ● ● ●
●●
●
● ● ● ● ● ● ● ● ● ●● ● ●●
●
● ●● ● ● ● ●● ● ● ●● ● ●●● ● ● ●● ●● ● ● ● ● ●● ●
●
● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●●
● ● ● ● ● ● ●● ● ●
●● ● ● ●● ● ● ●● ●● ●
● ● ● ● ●● ●● ●
● ● ●● ●● ● ●● ●● ●●
● ● ● ● ● ● ● ● ● ●● ● ● ●● ●●●●● ●
●
● ● ● ●● ●●
●
● ● ●● ● ● ● ● ●●● ● ●● ● ● ● ● ● ●
● ● ● ●
● ● ● ●
●
● ● ●● ● ●● ●● ● ● ●● ●● ●
● ● ● ●
●●
● ● ●●●● ●●●● ● ●●●
●● ●
●
● ●
● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ●
● ●
● ● ● ● ●● ● ●●● ● ●●
● ● ● ● ● ●
● ● ●
●● ●● ● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ●●● ●● ● ● ● ● ●
● ● ● ● ●
● ● ●
● ● ● ● ● ●● ●● ● ● ●●
● ● ● ● ●● ● ●
● ● ● ● ●● ● ●● ●● ●
● ● ● ●
● ● ●●● ●
●●● ●● ● ● ● ● ● ● ● ● ●● ●● ● ●
● ● ● ● ● ● ● ●
● ● ●
●
●
● ● ● ● ● ● ●
● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●
● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●●●● ●●
●
● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ●● ● ●
● ●● ●● ● ● ● ● ●
● ● ● ● ● ●● ● ●
● ● ● ● ● ● ● ● ●
● ● ●● ● ● ● ●
●● ●●● ●●● ● ● ●● ●●● ● ●● ●
● ● ● ●
●
●
● ●● ●● ● ●
●● ● ● ● ●●● ● ● ● ● ● ● ●
●
●● ● ● ● ●
● ● ● ● ● ● ● ● ●● ● ● ● ● ●
●● ● ● ● ● ●
● ●
● ●●●●●●● ● ● ●
●● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ●● ● ● ●● ● ●
● ● ● ● ●● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ●●● ●● ● ●● ● ●● ●● ●
●●
●
● ●
●● ●● ● ● ● ●
● ● ●● ● ●● ●
● ● ● ●
●
●● ● ● ● ●●●●●● ● ● ●●● ● ●● ● ● ●
●● ● ● ● ● ● ● ● ●●●● ●● ● ●●
●● ● ● ● ● ●
● ● ●● ● ● ●
●● ●● ● ● ● ●● ● ●● ●
●
● ●● ●
● ● ●● ● ● ●
●
● ● ● ●● ● ● ● ●● ● ● ●● ●
●
● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ●● ● ● ● ●
● ● ● ● ● ●● ● ●● ● ●● ●● ●
● ● ● ● ● ● ●● ● ● ●● ● ●● ● ● ●● ● ●● ●● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ●●● ●
●
●
●
● ●●
● ●● ● ● ● ● ● ●●●
● ● ●● ● ● ● ● ●● ● ● ● ● ●●
● ● ●
● ●● ● ● ● ●● ● ●● ● ● ●● ● ●● ●● ●
● ● ●
●
●● ●● ● ●
●●●● ● ●● ● ● ● ●● ●● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ●
●
●● ● ● ●● ● ● ●● ● ● ●●● ● ●● ● ● ●● ● ● ● ● ● ●
● ●
● ●
●● ● ● ●● ● ●
● ●●● ● ●●● ●●
●
● ●● ● ●
● ● ●
● ● ●● ● ●● ● ●●●
● ● ●● ● ● ●●● ● ● ● ● ● ● ● ● ●
● ● ●●
●
● ● ● ●
● ●
● ●●
● ● ●● ● ● ●● ● ● ● ● ●● ● ●● ● ●● ● ●
● ●●●
● ●● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ●
● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ●●● ● ● ● ● ● ● ● ●● ● ● ●● ●
●● ● ● ●
●
● ●
● ●●
● ●
●
●● ●
● ●
● ● ●● ●● ●
●● ●● ● ● ● ● ● ●
● ●● ●● ●●● ● ● ●●● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ●● ●●● ● ●● ● ● ● ● ● ●● ●● ● ● ● ●●
● ●●●
● ● ● ●● ● ●● ●● ● ● ● ●● ● ● ●● ● ●
● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ●●
●
● ●● ● ● ● ● ● ● ●
● ● ●● ●●● ● ● ●● ● ● ●
●● ● ● ●● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ● ●● ● ●● ● ●● ●
● ●●● ●● ● ●● ● ● ●●
● ● ● ● ●
● ● ● ● ●●
● ●● ●● ●● ● ●●● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ●●● ●● ● ● ● ● ●● ● ●● ● ● ●● ● ● ● ●●
● ●●●●●●
●
●● ●● ● ● ● ●
●
●
● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●
● ●●
● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●● ● ● ● ●● ● ●● ● ● ● ●●
● ● ● ● ● ● ●● ● ●● ●● ●
● ● ●● ● ● ● ● ●
● ● ● ● ● ● ●●
●● ●● ●● ● ● ●●
● ● ● ●● ● ●● ●● ●
●● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ●● ●
● ● ●
●● ● ●● ●
●● ● ● ●● ● ● ● ●● ●● ● ● ●● ●
●● ●●●
● ● ● ● ● ●● ●●
● ● ●●
● ● ● ● ●●●
●● ●● ● ● ●● ● ●● ● ●●
● ●
● ● ● ●● ● ●
●● ● ● ●●●
●●●● ● ● ●● ●
● ● ● ● ●● ● ●● ●●● ● ● ● ● ●
●● ●● ● ●● ●●●● ●● ● ● ●● ● ● ● ● ● ●
●● ●
● ● ● ●● ● ● ● ●
● ● ●
● ● ● ●● ●●
● ●● ● ●● ●●● ●● ● ●● ● ●
● ●● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ●● ●
● ●
● ● ● ● ●● ● ● ●● ● ● ●● ●
● ●
● ●
● ● ● ● ● ●
● ●● ● ● ●●
● ●● ●●● ● ●
● ● ● ● ● ● ● ●
● ● ●● ●● ● ● ●
● ● ●●● ●●● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●
●● ● ●● ●●●●● ● ●● ● ● ● ●●
● ● ●
●●
●● ●● ● ● ● ● ● ● ●●
● ● ● ● ●● ● ● ● ● ● ● ●●●● ● ● ●● ●
● ● ● ● ● ●● ● ●● ● ●● ● ●● ●
● ●
● ●● ● ●●● ●
● ● ● ●● ●● ● ● ● ● ●● ●● ● ●● ●
●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ●●
● ● ● ● ● ●
● ● ● ●● ● ●● ● ●● ●
●● ● ●
● ● ● ● ● ● ●● ● ●
●● ●
● ● ● ●
● ● ● ●
● ● ●
● ●● ● ● ● ● ● ●●●● ●● ● ● ● ●● ● ● ●● ● ●●● ●● ● ● ●● ●
● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ●● ● ●●● ● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ●
●● ● ●
●
● ●
●● ●
● ● ●● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ●
●● ●
● ● ●● ● ●
● ●●
●● ●
●
● ●●● ● ● ●● ●● ● ● ●
●
●
●● ● ● ● ●● ● ●
● ● ●● ●
●● ● ● ● ● ● ● ● ● ●● ●● ●● ● ● ● ● ●●●●●● ●●
0.6
●
0.6
0.6
● ●● ● ● ●● ● ●
● ● ● ● ●● ● ● ●● ● ● ●● ●● ●●
● ● ● ● ● ● ● ●
●
●
● ● ● ● ●
●● ● ●● ● ●● ●● ● ● ● ● ● ● ● ●●
● ●●
●●● ●● ● ●● ● ● ● ●● ●● ● ● ●● ● ● ●● ●
●
● ●
●
●●
● ●● ●
● ● ● ●●●● ● ● ● ● ●●● ●●●
● ● ●●● ● ●●●● ●
●● ● ●●● ● ● ● ● ●● ● ● ●● ● ● ● ● ●●●●● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ●
● ● ●
● ● ● ● ●● ● ●● ● ● ●● ● ●● ● ●● ● ● ● ● ●● ●
●● ● ● ● ● ●●
●● ● ● ● ● ● ● ● ● ●
●● ● ● ● ●
● ● ● ● ●● ●●
● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●
●● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●
● ● ● ● ●● ● ● ●
● ●● ●●
● ●● ● ● ● ●●
● ● ●
● ●● ● ●
● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●
● ● ● ● ● ●● ● ● ● ● ●
●● ● ● ● ●● ● ● ●● ● ● ●● ●●●● ● ● ● ● ●
● ● ● ● ● ● ● ● ● ● ●
● ● ● ●●●
● ●
● ●● ●● ● ●
● ●
● ● ● ● ● ● ● ● ● ● ●●
● ●● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ●● ●
● ● ● ● ●● ● ● ●
● ● ● ● ● ● ●● ● ●● ●
● ●● ● ●● ● ●●
● ●
● ● ● ●
●● ●●● ● ● ●●● ●●● ● ● ● ● ● ● ● ● ●● ● ●● ●●● ● ●●
●
● ● ●● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●●● ● ● ● ●● ●
● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ●● ●
● ●●●● ●● ●● ●● ● ●● ● ●● ● ●● ● ●● ● ●● ●
●● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ● ●● ● ●
● ●
●
●● ●
● ● ● ● ● ●● ● ● ●● ● ● ● ●● ● ●
●● ● ● ● ● ● ● ● ● ●
● ●
● ● ●
● ●● ● ● ● ● ●● ● ●● ●● ● ●● ● ●
● ● ●
● ● ●● ●● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ●
● ● ● ● ● ●●●
●
● ●● ● ● ● ● ● ●●
●
● ●● ●●● ●●● ● ●●
● ● ●● ●●
● ● ● ●
● ● ● ● ●
●
● ● ●●
● ● ● ●● ●● ●● ● ●● ●
● ●●
●● ● ● ●● ●● ●● ● ●● ●
● ● ● ● ● ●● ●● ●●● ●● ●
● ●●● ●●●
● ●●
● ● ●
● ●●● ● ●●● ●●● ● ●● ● ●
● ●● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ●
● ●● ●●● ● ● ● ●●
● ●● ●●
● ●
● ● ●● ● ● ●● ● ●●
● ●●●●● ● ● ● ●● ●
● ● ● ● ● ●
● ● ●● ●● ●
● ●● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ●● ● ● ● ●
●● ● ● ● ● ● ●
●
● ●● ● ● ●● ● ●● ●●●
● ● ● ● ●● ● ●● ●
●
● ● ●
●
●
● ●
● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ●
● ● ● ●●
● ●● ● ● ● ● ● ● ● ●● ● ●● ●● ● ●
●●
●
●●● ● ● ●● ●●● ●●● ● ●
● ● ● ●● ●
● ● ● ● ● ● ● ● ● ●● ● ●
●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
● ● ● ● ●● ●●
●
● ●
● ●
● ● ● ● ● ●● ●●● ●● ● ● ●● ● ●● ● ●
●● ●●
● ●● ● ● ● ●
● ● ●
● ● ●●● ● ●● ● ● ● ● ● ● ● ●
● ●●
● ● ●● ● ● ● ● ● ●● ● ●●
●● ●
● ● ● ● ●● ● ● ● ●● ●
●
● ● ● ● ● ● ● ● ●
● ● ● ●
● ● ● ● ● ● ● ●
●
● ● ● ● ●● ●●●● ● ●
● ● ●● ●
● ● ● ●● ● ●● ● ●
● ● ●
● ● ●
● ● ● ●● ● ●● ● ●
● ● ● ● ● ● ● ● ●
●
● ● ●
● ● ●
●● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ●
● ● ● ●●
● ● ● ● ● ● ● ● ●
● ●●●● ● ● ●● ● ● ● ●● ● ●
●
● ● ● ●
● ● ● ●
●● ●●● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ●●● ● ●● ● ● ● ● ● ● ● ●●●● ● ● ● ●
●● ●
● ●●
● ● ● ●● ●
● ●
● ● ●● ● ● ● ●● ● ● ● ●
●● ● ●● ● ● ● ●● ● ● ●● ●● ● ●
●● ● ● ●● ●
● ● ● ● ●
● ●●● ● ● ●● ●
● ● ● ● ● ●
●● ● ● ● ●● ● ● ● ● ●● ●● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ●●
●
● ● ● ●● ● ●●●
●● ●● ●
● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ●
●● ● ●● ● ● ● ● ● ● ● ● ●● ● ●
● ●●●
● ● ● ●● ●●● ● ● ● ● ● ● ●● ● ● ●● ●
● ● ● ● ● ●
● ●● ●● ● ● ● ● ● ● ● ● ●
● ● ●
●
● ● ● ●
● ● ●
●● ● ● ● ● ● ● ●● ● ●● ●● ● ● ●
● ●
● ● ● ● ● ●● ●
● ● ●
●
● ● ● ●●
● ● ●●
● ●● ● ●
●● ● ● ● ●
● ●● ●●●
● ●
●● ● ● ● ●● ●● ●●● ● ●● ●● ● ● ● ● ● ● ● ● ●● ●● ●● ● ● ●● ●●● ●●
● ●● ● ● ●
●●
● ● ● ● ● ● ●● ●● ● ● ●● ● ● ● ● ●
● ● ● ● ● ● ● ● ● ● ● ● ● ●
● ●
●
● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ●● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ●●●● ● ● ●
● ●
● ●●● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ●● ●● ● ● ● ● ● ●
● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
● ● ●●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●
●● ●● ● ● ●●● ●
● ● ● ● ● ● ● ● ●●
●●
● ● ●● ● ● ● ●● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●
● ● ● ●● ●
● ●● ● ● ●
● ● ● ● ● ●● ● ● ● ● ● ● ●
●
●● ● ● ●● ● ●●● ● ●
●
● ● ● ●● ●● ●
● ● ● ●● ● ● ●
● ● ● ●
● ● ● ●● ● ● ●●● ●● ● ● ●
●● ●● ● ● ● ● ●
● ● ●●
● ●
● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●
●● ● ● ●
●●●● ● ●● ●●●
● ●● ● ●● ●
● ●
● ● ●● ● ●● ● ● ● ●● ● ●● ● ●● ● ● ●
● ● ● ●
● ● ● ● ● ● ●● ● ● ●● ● ●● ● ● ● ● ● ●
● ● ● ● ● ● ● ● ●● ● ●●● ●● ●● ● ●
● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ●
● ● ● ●
● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ●
●
● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ●● ● ●● ●
● ●● ● ● ● ● ● ●●● ● ●
● ● ●● ●●
●
●● ● ●● ●●●●● ●
● ● ● ●
● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ●
● ● ● ●
● ●● ● ● ● ● ● ●● ●● ●●● ●● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ●● ●● ● ● ●● ●
● ● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ● ● ●
● ● ● ● ● ●● ● ● ●● ● ● ● ●
●● ● ● ●
● ●● ●● ● ● ● ● ●● ●● ● ●● ●● ● ● ●● ●
●● ● ● ● ● ● ● ● ●
0.4
● ●
0.4
0.4
● ● ● ●● ●●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●●
● ● ● ● ●● ● ● ●● ●● ●
● ● ● ●● ● ●● ●● ● ● ● ● ●
● ● ● ● ●●
●●● ● ● ●● ● ●● ●
● ● ● ● ●● ● ● ●● ● ●●●●
● ● ● ●
● ●● ● ● ●
● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●
● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●●● ●● ●● ●● ● ● ●● ● ● ● ● ●● ● ● ●
●● ● ● ●●● ● ● ● ● ● ● ● ●
● ●●● ● ● ● ●● ● ● ● ● ●
● ● ● ●●
●● ● ●● ● ● ● ● ● ● ●
● ●● ●●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ●● ●
● ● ●
● ● ● ● ● ●● ● ● ●●● ● ●
●● ●● ● ● ●● ● ●● ● ● ●● ● ●● ● ●● ● ● ●● ● ●●● ●● ●
● ● ●
● ● ● ●
● ● ● ●
● ●
● ●
● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ●
● ● ●
●●
●●●●●● ● ● ● ● ● ●
●● ● ● ● ● ●
●●● ● ●
●
● ● ● ● ● ● ●● ●
● ● ● ● ● ● ● ● ● ● ●● ●● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ●
● ●● ● ● ● ●
● ●
● ● ● ● ●● ● ●● ●
● ● ●● ●● ● ● ● ● ● ●● ● ●
● ● ● ●●● ● ●
●
● ● ● ● ● ●
● ● ●●
● ● ●
●● ● ● ●
● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ●●● ● ● ● ● ●●● ● ● ● ● ● ●
● ●● ● ● ●
● ● ● ●● ●● ● ● ●● ● ●● ● ● ●● ● ● ● ●
● ● ●
●● ● ● ● ● ● ● ●● ● ●● ●
● ●
● ● ● ● ● ● ● ●● ● ● ●●● ● ● ● ● ● ●●
● ● ●●●● ● ● ● ● ●
● ● ●● ● ● ●● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ●● ●●
●
●
● ● ● ● ●●● ● ● ● ●● ●
● ●● ● ● ● ● ●
● ● ●● ● ● ● ● ●
● ●● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ●● ●● ● ● ● ●● ●● ●
●● ●● ● ● ●● ●
● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ●● ● ●
● ● ● ● ● ●● ●
● ● ● ● ● ●●● ●
●●● ●● ●
● ●●
● ● ●● ● ●● ● ●
●
● ●
● ● ● ●
●●
● ● ●● ●● ●
●● ● ● ● ● ● ●● ● ● ● ● ● ●
● ● ●
● ● ● ●
● ●● ● ●● ● ●●● ● ● ● ● ●● ● ●● ● ● ●●● ●
●
●
●● ● ● ● ●● ● ● ●● ● ●● ● ●● ● ● ●
● ●
● ● ● ● ● ● ● ●●● ● ●● ● ● ● ●● ● ● ● ●
● ●● ●
●
● ●● ● ● ●● ● ●● ●● ● ● ● ● ●
● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ●● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●●
● ●
●● ● ● ● ● ●●●
●
●● ●● ● ●
● ●
● ●● ●● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●●●●● ● ● ● ● ● ●● ● ● ● ●●●
● ● ●
● ● ● ● ●●
● ● ● ●
●●
●● ●● ●● ● ●
● ●● ●
● ● ● ● ● ● ● ●● ●
● ● ●●
●
● ●● ● ● ● ●● ● ● ●● ● ●●● ● ●●● ● ●● ●● ●● ● ● ● ● ●●● ●
●● ● ●
● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ●● ●●●● ●● ●● ● ● ● ● ●
● ●● ● ●● ●● ● ● ●●● ● ● ● ●
● ● ● ● ● ● ● ● ●
●● ● ●● ● ● ● ● ● ● ● ● ●
● ●
● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●
● ● ●●● ● ●●
● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●●● ● ●● ● ● ● ●
●
● ● ●● ● ● ●● ● ●●● ●
● ● ● ●●● ● ●● ●● ●
●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●
● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ●● ● ● ● ● ● ●●
●
● ●
● ● ●
●● ●
●
● ●●
●
● ● ● ● ●● ● ● ● ●● ● ● ●● ●●
●
● ●●
●●
● ● ● ●● ● ● ●
● ● ●● ● ●●●● ● ●● ● ●●●●
●
●●●●●●●● ●● ● ● ● ●● ● ●●● ● ● ● ●●● ● ●● ●● ●
●● ● ●
● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ●● ● ● ● ● ●● ●●● ● ● ●
●
●● ● ● ●● ● ● ● ● ●●●● ● ● ●● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ●● ● ● ●●
● ● ● ● ● ●● ●● ●●● ●● ● ●● ●
● ● ● ● ●
●● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ●●● ● ●●● ● ●
● ●
●● ●● ● ● ● ● ● ● ● ●● ● ●
● ● ●
● ● ● ● ● ●● ● ● ●●●● ● ●
●● ● ● ● ● ●●●● ● ● ●● ● ● ● ● ●
●
● ● ● ● ● ● ●● ● ●
●● ● ● ●●● ● ● ●
● ● ● ● ● ● ● ● ● ● ● ●
● ● ● ● ● ● ●● ● ● ●
● ● ● ● ● ●
● ● ●● ●● ●● ● ● ●● ● ● ●● ● ●● ● ● ●
●● ● ● ● ●● ● ● ● ● ●
●
●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●
● ● ●
● ● ● ●● ● ● ●● ●
●●
●● ● ● ●● ● ● ● ● ●
● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ●
● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ●
● ● ● ● ●● ●
● ●●● ● ●● ●
●● ●● ● ● ● ●
● ● ●
●●
● ●● ●● ● ● ● ● ●
●●
● ● ● ●
● ●
● ● ●● ● ● ● ● ● ● ●
● ● ● ●●● ●●●●
●● ● ●
●● ●● ● ●
●● ● ● ●
●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ●● ●● ● ● ● ● ●● ● ●
● ●
● ● ● ●● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ●● ● ● ● ● ●
● ●
● ●● ● ● ●● ●●
●
●● ●● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ● ● ● ● ● ● ●●
●
● ● ●● ● ● ●
●●● ● ● ●●● ●
●●
● ● ● ● ●● ● ● ● ● ●
●
●
● ●
●●
● ● ● ● ● ● ● ●
● ●
● ● ● ● ●● ●● ● ● ●●● ● ● ● ● ●● ● ● ● ● ●
● ● ● ●
● ● ● ●● ● ●●
●
● ● ● ● ●● ●●
● ● ●
●
● ●
● ● ●● ●●●● ● ● ● ●● ●
● ● ●● ● ● ●● ● ●● ● ● ●●●●● ● ● ●
●● ● ● ● ● ● ●● ● ● ●● ● ●●● ● ● ●● ●●
● ●● ●●
● ● ● ● ● ● ● ●●●● ● ● ● ● ● ● ● ●● ● ● ● ●● ●
● ● ●●● ● ● ● ● ●● ● ● ● ● ●● ●● ● ●● ●● ● ● ● ● ●
●● ● ● ● ●● ● ● ●
● ● ● ● ●
● ● ● ● ●● ● ● ● ● ●● ● ● ●
●● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ●●
●
●● ● ●
● ● ●●● ●
● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ●● ●
● ● ● ●●
●● ●● ●
● ●●● ●●
●
● ●
●
● ● ●● ● ●●●
●● ● ● ●● ●●●
● ● ● ●● ● ●
● ●●● ● ● ●● ● ●● ● ● ● ● ●● ● ●● ● ● ●● ●● ● ● ●●● ●● ● ● ● ● ● ●
● ●● ● ● ● ● ● ●
● ● ● ● ● ● ●
●●● ●● ● ●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●●
● ●● ●●●
0.2
● ●●●
0.2
0.2
● ● ●● ● ● ● ● ● ● ● ●
● ●●● ● ● ●
● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
● ●●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ● ●
●● ●● ● ● ● ● ●
● ● ● ●● ● ● ● ●● ●● ● ● ●● ● ● ● ● ● ● ●
●●
● ● ● ● ● ●● ● ● ● ● ● ● ●
● ●
● ●
●
● ●● ●●
● ● ● ● ● ● ● ● ● ●
● ● ● ●● ● ● ●●
● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●
●● ● ● ●● ● ●●● ●●
● ● ●●
●● ● ●● ●
● ●●● ●● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ●● ● ● ●
● ●● ● ●
●● ● ● ●
●● ● ●● ●● ●● ● ●
●● ●
● ● ● ● ●●● ●●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●●●●● ● ● ●● ● ●
● ●● ● ●● ● ● ● ● ●● ●●●● ●
● ●● ● ● ● ●● ● ●● ●● ● ●
● ● ● ●
●●●● ●● ● ●
● ● ●● ●● ● ● ● ●
●
● ● ● ● ●●● ● ● ● ● ● ● ● ● ●
●
● ●●● ● ●●
●● ● ●
● ● ● ● ● ● ● ●● ●● ● ●● ●
●
● ●● ● ● ●●
● ●
●● ● ●● ● ●
● ●● ● ●
● ●● ● ● ● ●● ●● ●●● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ●
●
● ●●
● ●●
● ● ● ● ● ●● ● ●● ●● ● ● ●● ● ●●
● ●● ●
● ● ● ● ● ● ●● ●●● ●● ● ● ●
● ●● ● ● ● ●● ● ●●● ● ● ● ● ● ●
●● ● ●●
●
● ● ●●●● ● ● ●
● ●● ●
●
● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●●
● ● ● ●●
●●
● ● ●● ● ● ● ●● ● ●●● ● ●●● ●●● ● ● ●● ●
● ● ● ● ● ● ● ●● ● ● ● ● ●●● ● ● ● ●● ● ●● ●
●● ● ● ●●● ● ● ●● ● ●● ● ● ● ● ● ●
● ●● ● ●● ●●
● ●
● ● ●● ● ●● ●●●●● ● ●●
● ● ●● ●● ●
● ● ● ● ●●● ●●● ● ● ● ● ●
●
●
● ● ● ● ●● ●●● ● ●
●● ●
●
●
● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ●●● ● ● ● ● ●● ● ●
●● ● ●● ●
●
●● ● ● ●● ●● ● ●● ●
● ●
● ● ● ● ●●● ● ● ●●
● ●● ● ● ●●● ●
● ● ● ●● ●● ● ● ● ● ● ● ●
● ● ●● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ●
● ●●
● ● ● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ●● ●
● ● ●●● ●
● ● ● ● ● ● ● ● ● ●● ●● ● ●
●● ● ●● ● ●
● ●● ●●
● ● ● ● ● ● ● ● ● ●●
●● ● ●● ● ● ● ● ●● ●● ● ●● ● ●● ● ●
● ●●
● ● ● ● ● ● ● ●
●● ● ●
●
● ● ●● ● ●
●● ●●●● ● ● ● ● ● ● ●●● ● ●● ● ●● ●● ● ●● ●● ● ● ● ●●● ●● ● ● ● ● ●● ● ●
● ● ●● ● ● ●● ●● ●● ● ● ● ● ●● ● ● ●●● ● ●●●● ● ● ●● ● ●● ● ● ●● ● ●●
●●
● ● ●●
●
●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ●● ● ●
●
● ●●● ●
● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ●●● ● ●● ● ● ● ● ●●● ●●● ● ●● ●● ●●●● ●● ●● ● ● ●● ●
● ●● ●● ● ● ●
●
● ●●
●●
● ●● ● ● ● ●●
● ● ●●● ● ● ●● ● ● ● ● ● ●
● ● ●
● ● ● ●● ●
●●●
● ●● ● ●● ● ●● ● ●● ● ● ●●
●● ● ● ● ●
● ● ●● ●
● ●● ● ● ●● ● ● ● ● ●
● ● ● ●
● ●●● ●● ● ● ●● ● ●
● ● ● ● ● ● ●● ● ●●●
● ●● ● ● ●●●● ●● ●●
● ●● ● ● ●● ●
●
●● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ●
● ●● ● ● ● ● ● ● ●●
● ● ● ●● ● ● ●● ●●● ● ● ●
●● ●
● ● ● ●● ●● ● ●
● ● ●● ●● ● ● ●● ● ● ●● ●
●●● ●● ● ● ●● ● ● ● ●
● ●
● ● ● ● ● ● ● ●●●● ● ● ●● ● ●
● ● ● ●● ● ●
●● ● ●● ●
● ●●●● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ●● ● ●● ● ●●● ● ●● ● ● ● ●
●●●
● ●●● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●
● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ●●● ●● ● ● ●●● ● ●●
●●● ● ●● ●● ● ●●
● ●●● ● ●
● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●●
● ● ●●●●● ● ●
● ●●
● ● ● ● ● ●●● ● ●● ●
● ● ●● ●
● ● ●● ● ●● ●● ● ● ● ● ●
●● ● ● ●● ●
● ● ● ● ● ●
●● ●
●● ● ● ● ● ● ●●●●● ●● ●
●●●● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●
●● ●● ●● ● ●●
● ● ●
● ● ●● ● ● ● ●
● ● ● ● ● ● ●●●● ● ● ● ●● ● ●
● ● ● ● ● ●● ● ● ● ● ●●
● ● ● ● ●●
● ● ●● ● ● ● ● ●
●● ● ● ●●●●
● ● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●● ●● ● ● ● ● ●● ● ●● ● ● ●●●●●
●
● ● ●● ● ●
● ●
●●● ●●
●
● ● ●● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●
●●● ● ● ● ●● ● ●● ● ● ●
●●● ● ● ●● ● ● ● ●● ● ●● ●●● ● ● ● ● ●●
● ● ● ● ●● ●●●
●● ●●●●● ● ●● ●● ● ● ● ●● ● ● ● ●
●●●● ●●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ●● ●●●
● ●● ● ●●● ● ● ●● ●●●● ● ● ●● ● ● ● ●
● ● ● ● ● ●● ● ● ● ● ● ●● ●
● ● ● ●● ●● ● ● ●● ●
● ● ● ●● ●●
●● ● ●● ●
● ● ●●● ● ●● ● ●●
● ● ●● ● ● ● ● ● ● ● ● ● ●● ●●
●● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ●
● ● ● ● ●●●
● ● ●●
● ●
●● ● ●
● ●●● ●● ● ● ● ●●●●●● ●
●
●●● ● ● ● ●
●
● ●
●● ●● ● ●● ● ● ●● ● ● ● ● ● ● ●●● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ●●●●●●●●●
●● ● ●●
● ● ●● ● ●● ● ●
● ● ●
●●● ●● ●● ● ● ●
●● ●
●
●● ● ● ● ● ● ●● ● ●● ● ●● ●● ● ● ● ● ●● ● ● ● ●● ●●● ● ● ●● ● ● ●
● ●● ● ●
●● ●● ● ● ● ●●● ● ●●●●● ●●● ● ● ● ● ●●● ●
● ●● ●● ●● ● ● ●●● ● ●
●
●● ● ●●
●● ● ●
●
●● ● ● ●
● ●●● ● ●● ●●● ● ● ● ●● ● ●
●●●● ●● ● ●●
● ●●●● ●● ● ●● ● ● ●
● ●● ●●●●● ●● ●●
● ●● ●● ●● ● ● ● ●● ● ● ●●
● ●●●●● ●● ● ● ● ●● ● ● ● ● ●●
●● ●●●
●● ●● ●● ● ● ●●●● ●●
● ●
● ● ● ● ● ●● ●● ● ●● ● ● ●
● ● ●● ●●●●● ●● ●●●● ●●
● ● ●
● ● ●●●
● ● ● ● ●●
0.0
●●●●
0.0
● ●● ●
0.0
●●●
●● ● ● ● ● ● ● ● ●●
●●●● ● ● ● ● ● ●●●● ●● ● ●●●●●
● ●
● ● ●
●●●●●●● ● ●● ● ● ●● ● ● ● ●●●
● ●● ● ● ● ●● ● ● ●
●●●● ●
●●●●● ●● ● ●● ●
● ● ● ● ● ●
●
●● ● ●●●● ● ●● ●● ● ●● ● ●● ●● ● ● ● ● ● ● ●
●
●
●●
●
●
● ●● ● ● ● ● ● ● ●● ●● ● ● ●
●● ●●
● ● ●
● ● ● ● ● ●
●●● ●● ●●●●●● ● ● ●● ● ● ● ●
●
●
●
●
●
●
●● ● ●●●● ● ●
●
●
●●
●
●●
●●
●●
● ●●
0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0
102 "
The next code generates random samples according to the Gaussian, Stu-
dent, and Gumbel copulas with Gaussian marginals, as illustrated in Fig-
ure 4.5.
set.seed(100);N=10000
gaussMVD<-mvdc(normalCopula(0.8), margins=c("norm","norm"),
paramMargins=list(list(mean=0,sd=1),list(mean=0,sd=1)))
norm <- rMvdc(N,gaussMVD)
studentMVD<-mvdc(tCopula(0.5,dim=2,df=1), margins=c("norm","norm"),
paramMargins=list(list(mean=0,sd=1),list(mean=0,sd=1)))
stud <- rMvdc(N,studentMVD)
gumbelMVD<-mvdc(gumbelCopula(param=4, dim=2), margins=c("norm","norm"),
paramMargins=list(list(mean=0,sd=1),list(mean=0,sd=1)))
gumb <- rMvdc(N,gumbelMVD)
plot(norm[,1],norm[,2],cex=3,pch='.',col='blue')
points(norm[,1], -0.01+rep(min(norm[,2]),N), xlab="", ylab="",col="black",pch=18,cex=0.8)
points(-0.01+rep(min(norm[,1]),N), norm[,2], xlab="", ylab="",col="black",pch=18,cex=0.8)
plot(stud[,1],stud[,2],cex=3,pch='.',col='blue')
points(stud[,1], -0.01+rep(min(stud[,2]),N), xlab="", ylab="",col="black",pch=18,cex=0.8)
points(-0.01+rep(min(stud[,1]),N), stud[,2], xlab="", ylab="",col="black",pch=18,cex=0.8)
plot(gumb[,1],gumb[,2],cex=3,pch='.',col='blue')
points(gumb[,1], -0.01+rep(min(gumb[,2]),N), xlab="", ylab="",col="black",pch=18,cex=0.8)
points(-0.01+rep(min(gumb[,1]),N), gumb[,2], xlab="", ylab="",col="black",pch=18,cex=0.8)
joint_hist(norm);joint_hist(stud);joint_hist(gumb)
0.00 0.0
3 3 3
2 2 2
1 1 1
3 3 3
0 0 0
2 2 2
x2
x2
x2
−1 1 −1 1 −1 1
0 0 0
−2 −1 x1 −2 −1 x1 −2 −1 x1
−2 −2 −2
−3 −3 −3
−3 −3 −3
Fig. 4.6: Joint densities with Gaussian marginals and given copulas.
The following code is plotting joint densities with Gaussian marginals and
given copulas, as illustrated in Figure 4.6.
persp(gaussMVD, dMvdc, xlim = c(-3,3), ylim=c(-3,3),col="lightblue")
persp(studentMVD, dMvdc, xlim = c(-3,3), ylim=c(-3,3),col="lightblue")
persp(gumbelMVD, dMvdc, xlim = c(-3,3), ylim=c(-3,3),col="lightblue")
" 103
3
2
2
0.06 0.06
1
1
0.05
0.16 0.15 0.16
0.12 0.12
4 0.2 4 0.2
0.0 2 0.0 2
2 4 2 4
0.0 0.1 0.0 0.1
0
0
Y
Y
25
4
4
0.2
0.2
0.
0.2
0.2
0.2
0.18 0.18
−1
−1
−1
0.1
0.1
0.1
0.0 0.0
8 8
−2
−2
−2
−3
−3
−3
−3 −2 −1 0 1 2 3 −3 −2 −1 0 1 2 3 −3 −2 −1 0 1 2 3
X X X
Fig. 4.7: Joint density contour plots with Gaussian marginals and given copulas.
The following code generates countour plots with Gaussian marginals and
given copulas, as illustrated in Figure 4.7.
contour(gaussMVD,dMvdc,xlim=c(-3,3),ylim=c(-3,3),nlevels=10,xlab="X",ylab="Y",cex.axis=1.5)
contour(studentMVD,dMvdc,xlim=c(-3,3),ylim=c(-3,3),nlevels=10,xlab="X",ylab="Y",cex.axis=1.5)
contour(gaussMVD,dMvdc,xlim=c(-3,3),ylim=c(-3,3),nlevels=10,xlab="X",ylab="Y",cex.axis=1.5)
104 "
8
● ● ●
8
●
● ●
●
●
● ●
●
●
● ●
● ● ●
● ●
●
●
6
● ● ●
6
●
● ●
●
● ●
●
● ● ●
● ● ●
● ● ●
● ● ●
●
● ● ●
● ● ●●
●
● ● ●
● ● ● ● ●
● ●
● ●● ●
● ●● ● ● ● ●
●
●● ●● ●
● ● ● ● ●
● ● ●
● ●● ●
● ● ●
● ● ● ●
●
● ● ● ●●
● ● ● ● ● ●
● ● ● ●
● ●
● ● ● ● ●
● ● ● ●
● ● ●
● ● ● ● ● ●
● ● ● ● ● ●● ●●
● ● ● ● ● ● ● ● ●
● ● ● ● ●
● ● ● ●● ●
● ● ● ● ● ●
● ● ●●● ● ●
● ● ● ● ● ● ●
● ● ● ● ● ● ● ● ●● ●
●● ● ● ● ●●
● ● ● ● ● ● ● ●
●
4
● ● ●● ● ● ●
● ● ● ● ● ● ●
4
● ●●
4
● ● ● ● ● ● ●●
● ● ● ● ● ●
●● ●●
● ● ● ● ● ● ●●
● ● ● ●● ● ● ● ● ● ●
● ● ● ● ● ● ●●
● ● ● ● ● ●● ● ●
● ●
●● ● ● ●●
●● ● ● ● ● ● ● ● ● ● ● ● ●
● ● ●
● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ●● ●
● ● ● ● ● ● ● ●● ● ● ●●
● ● ●
● ● ● ●●
● ● ● ● ● ● ● ●●
● ● ● ● ●● ●
●● ●
●
● ● ●
● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●
● ●
●
● ● ● ● ● ● ●
● ● ● ● ●
● ● ● ● ● ●● ● ●
● ● ● ● ● ● ●● ● ● ● ●● ● ● ●
● ● ● ● ● ● ● ●
●● ●
●
● ●
●●
●
●
● ●● ● ●● ●
● ●●
● ● ● ● ● ● ●●● ●
● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●
● ● ● ● ● ● ● ● ● ● ●
●
●
● ● ●● ● ● ● ● ●
● ● ● ● ● ● ●● ●
●●
●
●
● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●
● ●● ● ●● ●●● ● ● ● ● ● ● ● ● ●
● ●● ● ●
● ● ● ● ● ● ●● ●● ● ● ●● ●● ● ●
● ● ●
●● ● ● ●● ●
● ● ● ●● ●
● ● ●● ● ● ●●●
● ● ●●
● ● ●● ● ● ●● ● ● ● ● ● ● ●
● ●●
● ● ● ●
● ● ● ●●● ● ●
●●
● ●● ● ● ● ●● ● ● ●● ●
● ● ● ● ●
● ●● ●
●
●● ● ● ● ● ● ● ●● ● ● ● ●
●● ● ●●
●
● ● ●●●●
● ●● ●
● ● ●
●●● ●● ● ●● ● ● ● ● ● ●
● ● ● ● ●●● ● ● ● ●● ●
● ● ●● ● ● ● ●● ●
● ● ● ●
● ●
●
● ● ●●
● ● ●● ● ● ●
● ●● ● ●●● ● ●● ●●
●● ● ●
● ● ● ● ● ● ● ● ●● ● ● ● ●
● ●● ●●● ●
● ● ●● ● ●
● ●
● ●
● ●●●
● ●●
● ●●● ● ● ● ●● ●● ● ● ●
● ● ● ● ●● ● ● ● ● ● ●● ●● ● ●● ●●
●● ●● ●● ● ● ●
● ●
● ●● ● ●● ●● ● ● ● ●●
●
● ●● ● ●● ● ● ●
●● ●
●●●
● ●
● ● ● ● ● ● ● ●● ● ● ●
●●
● ● ●● ●●
● ●●
● ● ● ● ● ● ● ●● ●
●
● ● ● ●● ●● ● ●
●
●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ●●● ● ●
● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ●
● ● ● ● ● ● ● ● ●
● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
●●●
● ●●● ●●● ● ● ●
● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ●● ●● ● ● ●
● ● ● ● ● ● ●●●
●
● ● ●●
● ●●
●
● ● ● ● ● ● ● ●
●●●● ● ● ● ● ●●
● ●● ● ●● ●
● ● ●●● ●●● ● ● ●● ●
●
● ● ●● ●● ● ● ●● ● ● ●●● ●●●
● ● ● ● ●● ●● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ●●●●● ● ●●● ●● ●● ● ●
●●●● ● ●
●
● ●● ● ● ● ●
● ●
● ●●
● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ● ●●● ●●
● ●●● ●●●
●
●●
●
●● ● ●●●
● ●
● ● ● ● ● ● ●● ●● ● ● ●
● ● ● ● ●● ● ● ● ● ●● ● ● ●●
●● ● ●●● ●● ●
● ● ● ● ●● ● ●● ●●● ●● ● ● ●● ● ●
●● ● ● ● ●● ● ●● ●● ● ●● ●● ●●
●● ●● ●● ●●
●
●● ● ● ● ● ●● ● ●● ● ● ●● ● ● ●
●● ● ●● ● ● ●
●
● ●●
● ●
●● ● ●
●
● ●● ● ● ●●●● ●●●● ● ●
● ●
● ● ●● ● ●● ● ● ● ● ● ● ● ● ●● ●● ●● ●● ● ● ● ●● ● ●
●● ● ● ● ●●● ●●●●●● ●●● ● ● ● ●
● ●● ●●● ● ● ●●● ● ● ●● ● ●● ● ● ● ●●●● ● ●● ● ● ● ●●●
● ● ●●● ●● ● ● ● ● ● ●
● ● ● ● ●● ● ●● ● ● ● ● ●●●● ●●●● ● ● ● ● ●
2
●
●
● ●● ●● ● ● ●● ● ●
●● ● ● ● ●● ● ● ● ● ●● ●● ● ● ● ●● ●
● ●● ● ●● ● ● ● ●● ●●● ● ● ●● ●● ● ● ●● ●
●● ●● ●● ●●●● ●● ●
● ●● ●
● ●● ● ●●
2
●● ● ● ● ●●● ●● ● ● ●
2
● ●
●●
●● ● ●
●● ● ● ●● ● ●● ● ● ●●● ●●● ● ● ●● ● ● ● ● ●
● ● ● ● ●●●●●● ● ●●●●● ● ● ● ●● ●
● ● ●● ●● ● ● ● ● ●
● ●●● ●
● ●●
● ● ● ● ● ●● ● ● ● ● ●● ●●● ●●● ● ●● ● ● ● ● ● ●●● ● ● ● ● ● ● ●●●● ●
●● ● ● ●
● ●
●● ●● ●●●
●● ● ●● ● ● ● ● ● ● ●
●● ● ●●● ● ●● ●
● ●● ● ● ● ●● ● ●● ● ●● ●●● ●●●
● ● ● ●● ●●●●● ●●●●● ●●
●
●●●● ●● ● ● ●
● ● ● ●● ●●
●●● ●●
● ●● ●● ● ● ● ●● ● ● ● ●●● ● ●● ● ●● ●●● ●● ● ●● ● ●
●● ●
●●● ● ●● ●●●●● ●●●● ● ● ●● ● ● ●●
● ● ● ●● ●● ●
● ●●● ● ● ● ● ●●
●
●● ● ● ● ● ● ●● ●● ●●
●
● ●● ●●● ●●
●●● ●
●●
● ●● ●
● ●● ●●● ● ●●● ● ● ●● ● ●●●● ● ●● ●
●● ●
● ● ●●●
● ●● ●●● ●●● ● ●●
● ●● ●●●
● ● ● ● ● ● ● ●
● ●●●● ●● ●● ● ● ● ● ● ●● ● ● ●●●● ● ●● ● ● ●● ●
● ● ●●●● ● ●● ● ● ●● ●● ●● ●●●● ●●● ● ● ● ● ●
● ●●●●● ●●
● ●
● ● ●● ● ● ●● ● ● ●●● ● ● ●●
● ●●● ●●●● ●● ●
● ●● ● ● ●●● ● ● ●● ● ●
●●
●●
●
● ●●
●●
●
● ●● ● ●● ●●●●●●● ● ●● ● ●●● ●● ● ● ● ● ●● ● ●
● ●●● ● ● ●●● ● ●●● ●●●
●● ● ●●●● ● ●● ● ●●●●●●●●● ●● ●
● ●● ● ● ●● ● ● ●●●●● ●●
● ● ●● ● ●
● ●● ● ●
●● ● ● ●● ●● ●● ●●
● ●●
● ●● ● ●●●● ● ●
●● ● ●●
● ● ●●● ●
●●
●● ●●● ●
●● ● ●● ● ● ●●● ● ● ● ● ● ●●● ●●● ● ●●●●● ● ●●
● ●● ● ● ●●●●● ●●●●
●● ●
● ●● ● ● ● ● ●
● ● ●
● ● ●●
●●● ●● ●●● ● ●●●●● ●
●●● ●● ●●● ● ●
●
●●● ●
●● ●●
●●●
●●●●● ● ●●
● ●● ●● ●● ●● ● ●
●●● ● ●● ●● ● ● ●● ● ● ● ● ● ● ●● ●● ● ● ● ● ●● ● ●● ● ● ●● ●● ● ● ●●● ● ● ● ●● ● ● ● ● ●● ● ●
● ●●
● ●● ●●●●●● ●● ● ●● ●●●● ● ● ●● ●● ●●● ●●
● ● ● ● ●●● ● ●
● ● ● ● ● ● ● ● ●
● ● ● ●● ● ●
● ●●● ●●
● ● ●●
●●●
●● ● ●● ● ● ● ● ●● ●● ● ●●●● ●● ●●● ●●●●● ● ● ● ● ● ●
●● ● ● ● ● ● ● ●
● ●
● ● ● ● ●● ●●
●
●● ● ●●● ● ●
●●
●● ●● ●●● ●
●
● ●●●● ● ● ● ●● ●
● ●● ●● ● ●● ●●● ●
●●●●●●● ●●● ●
● ● ●● ● ● ●●
●●
●● ●● ●● ●● ● ● ●● ●● ● ●●● ● ● ● ●● ●
● ● ●
● ● ● ● ●●●
●● ●●
●● ● ●● ● ●●●
● ●●● ● ● ● ●●● ●●●● ● ● ● ● ●
● ● ●● ●●● ●● ●●
●●
● ●●●●● ●
●● ●●●●●
● ●● ●●●●●● ●● ●
●●● ●●
● ●● ● ● ●
● ● ● ● ● ● ● ● ●● ● ● ● ● ●
● ● ●● ● ●● ● ● ● ● ● ●●● ● ●●● ●●●
● ●●●
●●●● ●●●
●● ●●● ●●
● ●●●●●
●●●●
● ●●
●●
● ●● ● ●●● ● ●● ● ●● ●●● ● ● ●●● ● ●●●●
●● ●
● ●● ●
● ● ●● ●● ● ● ●●
●
● ●● ● ● ● ● ● ● ●● ●● ●● ● ● ● ●● ●●
● ● ●● ● ●
● ●
●● ●● ●● ● ●
● ●● ●● ● ●● ●
● ● ● ● ● ● ● ●●● ●
● ● ●
● ●●●
●●
● ●●● ●● ● ●
●● ●● ● ●●●● ●● ●●●● ●
●● ●● ●
● ●● ●● ●●●
●● ●●● ●● ●●●●●●● ●● ●
● ● ●
● ● ● ●● ● ● ●●●●● ●● ● ●●●
● ●●● ●●●
● ●●●● ● ●●●
●● ●●● ● ●
●
●●● ● ● ● ●● ●
● ● ● ●●●
●● ● ● ● ●● ● ●● ●● ● ● ● ● ●● ●
●●
● ●●●● ● ● ● ●● ● ● ●● ●●● ●● ● ●● ●● ●●●●● ●● ● ● ●
● ● ●● ● ● ● ● ● ● ● ●●● ●
●●
●●
●
●●
● ● ●
●●● ●●●
● ●
●●● ●●
●
●●●
●
●●●●● ● ●● ●
●
●●●● ●●●● ●●●●● ● ●●●●●● ● ● ●●● ●●
● ●●● ● ●● ● ●
● ● ●●
● ●● ● ● ● ● ●●●● ● ●● ●●●●● ●●●
●●● ● ● ●● ●● ●● ● ●● ● ● ● ● ● ●
●●
●●
● ●●
●● ● ● ●●●●●● ●●●● ●
● ●● ●●● ●
● ●● ● ●●
● ●● ●●● ● ●●
●
● ●● ● ● ●● ●●
● ●● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ●●●● ● ● ●● ● ●●● ● ●● ●●
●
●●● ● ● ●● ● ● ● ● ● ● ●●
●●
●●
● ●● ●●●● ●●
●●●● ●●
●●●●●● ●● ●●●●●●● ●●● ● ●
●●● ● ●● ●● ● ●●●●
●●● ● ● ●● ● ●●
●● ● ● ●●●●
● ● ● ●●● ●●●●● ●● ●● ● ●●●●● ●● ●● ● ●●●●●● ● ● ●
●●●
●● ●● ●●●
● ● ●● ●
●● ●●● ●● ● ●● ●●● ● ●● ● ●●●●●●●
●●● ●●● ● ●
●●●●●
● ●● ●● ●●
● ● ●●● ●● ● ● ●● ● ●●● ●● ●
● ● ● ● ● ●● ● ●●● ● ●● ● ●●●
● ● ● ● ● ●● ●
● ● ● ●
●
●●●● ●●● ●●●●●● ●●●● ● ●●
●●● ●●●●
● ●● ●● ●
●● ● ●
●
●● ●●●● ● ● ●●●●● ● ●●● ●●●● ● ●● ●●● ●●● ● ●●
●● ● ● ●● ●● ● ●
● ●
●● ● ● ●
● ● ● ● ●●
● ●●
● ●● ●●● ●●●●
●●●●●
●● ●● ●●
●● ●
●
●●●●
● ●●●● ●● ● ●●●● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ●●●●● ●●● ●●●●●
● ●
●●●
●● ●
●● ●
●●●
●
●●
●●● ●●● ●●
●●
● ●●
●●●●●● ●●●●● ●● ● ●●●● ● ●● ●●● ● ● ● ● ●● ● ●● ●●● ● ●●●●●
●●●
● ● ● ● ● ● ● ● ●● ● ●
● ● ●
● ●
● ●●
● ●●● ● ●
●●●●
●
● ●●
● ●●● ● ●● ●
● ●●●●●●●●●
● ●● ●
●
● ●
●● ● ●●● ● ● ● ●● ● ● ● ● ● ●●● ●● ●●
● ● ● ●●●
● ●●● ●●● ● ●
●● ● ●
●● ●●●●●●●● ●●●●● ●●● ●● ●● ● ● ●●● ●● ●● ●●●●●● ●
●●
●●●●
●●●●●
●●● ●
●●
●
● ●●●
●●● ●●● ● ● ● ●
●●● ● ●●●●● ● ●●● ●●
●●● ● ●●●●
● ●● ● ● ●● ●●
●● ● ●● ● ●●●● ●● ●
●●
●● ●●●● ●●●
● ● ●● ●
● ●● ●● ● ● ● ●● ● ● ●
●●●● ●●●● ●●●
●● ●●●●
● ●
● ● ●
●●●●
●
● ●● ● ●●●● ●● ● ●
●● ●
●●●● ●●●
● ●●●
● ●●●
●● ●
●
●●●● ●●●●● ● ●●● ● ●●
● ●● ●●● ●● ●●●● ●●● ● ●● ●●● ● ●● ●●●● ●●● ●●●● ● ● ● ●● ● ●● ● ●
● ●●● ● ● ●
●●● ●● ● ● ● ● ●
● ●● ●●●● ●
● ● ●● ●● ●●
● ●●
● ●●● ●●
● ●●●● ●●●●●● ● ● ●
●● ● ●
● ● ●● ●● ●●●●
● ●● ●●
●●● ● ●● ●● ●●●● ●● ●●● ●● ●
● ● ● ● ● ● ●● ●●
●● ●● ● ● ●
● ● ● ● ●
●
●●● ●● ●● ●● ●●●
● ●●● ●●●● ●●●● ●●●● ●● ●
●●●
●
●●●●●
● ● ● ●●●● ●
● ●●● ●●● ●● ● ● ● ●●●●
●● ●●
●●
●●
●● ●
●● ●●●● ●
●●●
● ●●●●●● ● ●●●
●
● ●● ●
●
● ● ● ●
●
● ●●
●●
●
●
●●●● ●●● ● ●
●● ●●
● ●● ●●
● ●
●
●●
● ●●●● ● ●●●
●
●● ●
● ● ● ● ● ● ● ● ●
● ●●
● ●
● ● ● ● ● ● ●
● ●●
● ●●
●●
● ●
● ●
●● ●●
●
●●
●●
●●●● ●
●●
● ●●
● ● ● ● ●●
●●
●
●●
●
●●
●●
●
●
●● ●
●● ●●● ●●● ●●● ●●●
●● ● ● ● ● ● ● ● ● ● ● ●●
●●● ●
● ●● ●●●●
●
●●
●●
●●
●●●
●
●●
●
●●
●●●
●
●
●
●
●●
●
●●●
●●●●
●
●●●●
●
● ●●
● ●● ●
● ● ● ● ● ●●● ● ●●●●● ● ●● ●● ●●● ●●●● ●● ●● ●● ●
● ● ●●● ●● ●●● ● ●●●
● ●●● ●●
●● ●●●●●●●● ●●
● ●●
●
● ●
●● ●●● ●
●●●● ●●
● ●● ● ● ●●● ● ●● ● ● ● ● ● ●● ●●●●●● ●●
●● ●●
● ●●●●● ● ●● ●●●●
●●
●●● ●● ●●● ● ● ●●● ●●●● ● ● ● ● ●● ● ● ●● ● ● ●●
● ●
●●
● ●●
● ●●
● ●●●●●
● ●
● ● ●●●●● ● ●● ● ●
●● ●●
●●●●●● ●●● ●
●
●●●
●● ●●
●
●● ● ● ●● ●●
●
● ●● ●● ●●●●● ● ●
● ● ●
● ● ●●● ● ● ● ●● ●●●● ●●●●●●●●● ● ● ●●
●
● ●●
●● ●● ●●● ●●● ● ●●
● ● ● ●●●
●
●
● ●●●
●●● ●
●●●●
● ●●●●
●
●●
●●
● ●●
● ●●
●●●
●● ●
●●●
● ●● ●
● ●● ●● ●● ●
●●● ● ●●
● ●●●●● ● ● ● ●● ● ● ● ● ● ●● ● ●
● ●●● ●
●●●● ●●
● ●● ●●● ●●
●● ●
●
●●●● ●●● ●●●●●●● ●●●
●● ●
● ●●● ● ●
● ●●●● ●● ● ●● ● ● ● ●● ● ● ●●●●● ●●● ● ● ●
●●
●●● ●● ●●●●●●●
● ●●
● ●●
●●
●●● ●● ●● ●●●●●●●●●
● ● ●●
●●
● ●● ●●● ●●● ●
●●
● ●●
●●
●●
●●●
●●
●●●
●●●
●
●●●
● ●
●
●
●●●●
●●●● ●
●●
●
●●● ● ●●
●
●●
●●●●
●● ● ●●● ●
● ●●
●●
● ● ●●● ●
●
●●● ●
● ● ●●
●●●
●●
● ●● ●● ● ● ● ● ●●● ●● ● ● ● ●●● ●●● ●
● ●
●●●
●●● ●●●
● ●●● ●
●
●● ●
● ●● ●● ●
●
●●
●●
●●● ● ● ● ●●
●● ● ●● ● ● ●● ●●●●
● ●●
● ●●
●●
●●
● ●● ●
●●
●
●● ●●● ●
●●●●
●●●●●●●●
●● ●● ● ●
● ●●●
●● ●●
● ●●●●●● ●
●●● ● ●●●●● ●● ●● ● ●
● ●●●●●
● ● ●●
●● ● ●●●● ●
●● ●●● ● ● ●●
● ●● ●●● ● ● ● ●
● ●
● ●● ●●●●
●● ●●
● ●●●
● ● ● ●● ●● ●●●
●
● ●●●● ●● ●● ● ● ● ● ● ● ●●●● ● ●●●●● ●●●●
● ●●● ● ●
●● ● ●
●
● ● ● ●
●●
●● ●
● ● ●
●● ● ●●● ●● ●● ●● ● ● ●● ● ●
●●● ●●●●●●● ●● ● ●● ●●
●● ● ●● ●● ● ●● ●
● ● ●
● ●●●
● ●
●●
●●●● ●
●
●●●●
● ●● ●●● ● ●●
●● ●●●●● ● ●
●●
●●●
● ●●●
●
●
●●●●●●●●●● ●● ●● ● ●●●
● ●●
●●● ●
●●
●● ●●●
●● ●● ●● ● ●● ● ●●● ●● ● ●●● ● ●
●● ●●●● ● ● ● ● ●●● ●● ●
●
●●●●
● ●● ●
●
●●●
●● ●
●●●●●●●
●●●
●●●● ●
●●●● ●●●●●●● ● ●●●●● ● ●
● ●●●●●● ●●●●● ● ● ●●●
●●
● ●
● ●
●●
●
●●●
●
●
●●
●
●●●●●
●
●
●●●
●●● ●
●
●●
●
● ●●
●●●
●
●
● ●
●●●● ●●● ●
● ●● ● ●● ● ●
●●
●●● ●
●● ●●●
●●●●●● ●
●●●
●
●● ●●● ●
●
●●● ●●●●●
●
●● ●● ● ●●●
● ●● ●
●
● ●●
●●● ● ● ● ● ● ● ● ● ● ●● ● ●●
● ●● ● ●●
●●●
●●●
●●
●●●●●●●
●
●
●
●●
●● ●
●
●●
●
●
●● ● ●
● ●●●
●●●●●●
●
●●
●
●
●●●●●●
● ●● ●●● ●●●● ● ● ● ● ●● ●● ●●
●●
●
●
●●●
● ●
●●
●
●●
●
● ●
●●
●●●
●●
●
●●
●●●●●●
●●
●
●
●●
●●
●●●
●● ●●● ●●
●
●● ●●●●● ●
●● ● ●● ●● ● ●● ●●●
● ●● ●● ●● ●● ● ●
●
●
●●● ●●● ● ● ● ● ● ●●●●●●●● ● ●●● ●● ● ● ● ● ●● ●●● ●●●
● ●●●●
● ●●●●●●
● ● ●● ●●
● ●●● ● ●●
● ● ● ●● ●●●● ● ● ●● ●● ●●●
●
●
●●
●●
●●●●●
●
●●●●●
●● ●●● ●●●
● ● ●
●●● ● ●● ●
● ●
●●●●● ● ●
●●●
● ● ● ●●● ●● ●●● ●●● ●● ●● ● ●● ●●●● ● ●
● ●●● ●●● ●●●● ●
● ● ● ●
●●●● ●●
●
●●
●
● ●●
●● ●
● ● ●● ●
●
●●
●
●●
●●
●
● ●
●● ●●
●●●●
●● ●●●●●●● ●● ● ●
●● ● ●● ●
●● ●
●● ●●
●
●●●●●●●
●
● ●
●●
●● ●●
●
● ●● ●
●●
●●●
●
●●
●●● ● ●
●
●●
●●
●●●● ● ● ● ●● ● ● ●●
●●
●● ● ● ● ●
● ●●● ●● ●● ● ●● ● ● ●●● ● ●● ●● ●●● ● ● ● ●●● ● ●● ● ●● ● ●● ● ● ● ● ●
●●●●●
●●●●●●●
●
● ●
● ●●●
●●●●●● ●● ●●
●●
●●● ●
●●●
●
● ●●● ●●● ●●
●● ●
●●
●●●
●●●
●● ●● ●● ●
●●●●
● ●●●●●
● ●●●
● ● ●●
●
●●●● ●
●●
●●●●●●
●
● ●
●
●●●
●●● ●
●
●●
● ●
●●
●●●●
●●● ●●
●● ●●●
● ● ●
●
●●●● ● ●●
● ●●●
● ●
● ●● ●●● ● ●● ●●
●
●
●
●
●●●●●
● ●●●
●
● ●●
●●●
●●
●
●
●
●
●
●
●
●
●
●●●●●●●
●
●●
●●● ●●
●
●
● ● ●●●●
●● ●●●●● ● ●
●●●●
●●●●● ●●●● ● ●●● ●● ● ● ●
●● ● ●● ● ●● ● ●● ●
● ●●● ●●●
● ●● ● ● ● ● ●● ● ●
●● ● ●●●● ●●●
● ● ●● ● ● ● ●●●
●●●
●●●
●● ●
●●●
●● ●●
●●●●●
● ●● ●●●
●●●
●●
●● ● ●●● ● ●●●
●●
● ●
●
●
● ●● ● ●●
●●● ●● ●●
● ●
●
●●●●●● ● ●● ●●●● ●● ● ●●●
● ●● ● ● ● ● ●●●● ● ● ●● ●● ●
●●●
●●
●●● ●
●●
●●●●●
●●
●
●●●
●●
●● ●
●
●●●●
●●●
●●●
●●●
●●●●
●●
●●●●
● ●● ●● ●● ● ●●
● ●
●●●●●
● ● ● ● ● ●● ● ●
● ●
● ●
●●●● ●
●●●●
●●● ●●
●●●●
●●
●
●
●●
●●
●●
●●
●
●●
●
●●
●●●
●
●
●●
●
●●●
●●●
●●●●●
●●●●●● ●
●●
●●●●● ●
● ●
●● ●
● ● ●●● ●
●●●●
●●●●●●
●
●●
● ●
●●
●
● ●
●●
●
●●
●
●●●●
●●●●●●●●
●●
● ●
●
●●●●●
●●●
●
●●
● ●● ●
●● ●●
●●●●●
●
●●● ●●● ●●●●
●●●● ●●●●● ●● ● ● ●
●● ● ● ● ●●●●●●●●●●●●
●
●●●
●●
●●
● ●●●
●●●
●●
●
●●
●●●●
● ●
●● ●●●
●●
●●
●●
●●
●
●●
●●
●●
● ●
●● ●●●● ●●● ●●
●● ●● ● ●● ●
●
●
●
●
●●
● ●
●
●●●
●
●●
●
●
●
●
●
●
●●●●
●
●
●
●
●
●
●
●
●
● ●
●●
● ●
●
●
●
●●
●
●●●●●
●●
●
●●●
●
●
●●●●●
● ● ●
●●● ●● ●●●
●
●
● ●●
●●
●●●
●● ●● ●●●
●●
●
●●
●●
●●●
●●
●
●●●
●● ●
●
●●● ●
●●●●
● ●●●
●●●●●
●●●●
●
●●
●
●●●●
●●●●●
●●●
●●
●● ●● ●●●●● ●●●●●● ●
●● ●
● ●●●●
● ● ●● ● ● ● ● ●●
●
●
●
●●
●●●
●
●●●●
●●●
●●
●
●●●●
●●●●
●
●●●●
●●
●
● ●
● ●
●
● ●●●
● ●
● ●
●
●●● ●●●
●
●●●
●●●● ●● ●
● ●● ● ●●●●●●
● ●●
● ● ●●
●● ● ●●
● ●
●●
●●●
●
●●
●
●
●●
●●
●
●
●●●
●
●
●●●
●
●
●
●
●●
●
●●
●●
●
●
●●
●
●●
●
●
●
●●
●
●
●●
●
●
●
●●●
●
●●
●●
● ●
● ●
●● ●
●●
● ●
●
●●
●●
●●
●●● ●●
●●
●●●
●●
●●●●
●● ●●
● ●
●● ●●●●●●
● ●● ● ● ● ●● ●
● ●●
●●● ●
●●● ●●● ● ●●●● ● ● ●● ● ●●
●●●
●●
●
●●
●
●●●●
●● ●●●
●●●
●
●●● ●●
●● ●
●● ●● ●
●●●●●●
●●
●● ● ●● ●●● ●●●
●●●●● ● ●●● ●
●●
● ●● ● ● ● ● ●●●●
●
●●●
●●●
●
●●
●●●
●●●
●●
●●
●
●●
●●
●●
●
●●
●●●
●
●
●●
● ●
●●
●●●●●
●●● ●
●●●●●● ●● ● ●
●●●
●● ●●●●
● ●
●● ●●● ● ● ●
●●● ● ● ●●●
● ● ● ● ● ● ● ● ● ● ●
●●
●
●● ●● ●●● ●●●
●●
●
●●
●●
●● ●● ●●●
●●●
●●
●
●●● ●
●
● ●
● ●●●
● ●
● ●●● ●●
●
●● ●●● ●●●● ● ●
● ● ●●● ● ● ● ●●
● ●●
●
●●
● ●●● ● ●
● ●● ● ●● ● ● ●
●●
● ● ●●● ● ● ● ● ● ● ● ● ● ●● ●●
●●
●●
●●
●●
●●
●
●
●●
●
● ●
●
●●
●●
●
●●●
●●●
●
●●
●
●● ●●
●●●●
● ●● ●● ● ● ● ●
●●● ● ● ●
●● ● ●● ● ● ●● ● ● ● ● ●● ● ● ● ●● ●● ● ●
●
●●●●
●
●
●●
●●●
●● ●●●
●
●●●●●●●●
●●●
● ●
●●● ●●
●● ●●●●
●● ●
●
●●
●●●
●● ●● ● ●● ● ●● ●●● ● ● ● ● ● ●● ●●●
● ●
●
●●●
●●
●●●●●
●●
●●
●●●●
●●
●
●
●●
●●
●●●●●●
●
●●●●
●● ●
● ●●● ● ●● ●● ● ● ●●● ●● ● ●●●●● ● ● ●●●● ● ● ● ● ● ●
●●
●
●
●●
●●
●●
●
●●●●●
●●
●●
●
●●
●●
●●●
●
●●
●
●
●●
●●
●
●
●●
●
●
● ● ● ●●● ● ●
●● ● ● ● ● ●
●●
●
●●●●
●●
●
●
●
●
●
●
●●●
●
●
●●
●●●
●
●●
● ●●
●
●●●●
●
●●
●
●
●●
●●
●● ●
●
●●
●● ●
● ●● ●
●●●
●●●●●●●●●
● ●
●
● ●● ●●●●
● ● ● ●
●●
●
●●
●
●●
●
●
●●
●●
●
●
●
●
●●●
●●●
●●●
●●●●
●●
● ●
●
●●●
●●●
●●
● ●
● ●●●●
●
●●
●●
●●●● ●●
●
●
●
●
●
●
●● ●● ●●● ● ●●●●●● ●● ● ●● ● ●●●●● ●
● ● ● ●●
●
●
●
●●
●●
●
●
●
●
●
●
●●
●
●
●
●●
●●
●
●
●●
●
●
●
●
●
●●
●
●
●
●
●
●●
●●
●
●
●●
●●
●
●
●
●
●
●●
●●
●
●●
●●●●●●
●
●●● ●
●●●
●●
●●●
● ● ● ●●
● ● ● ● ● ● ● ● ●
● ● ● ●● ●●● ● ● ●●●●● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ●●●●
●● ●●●●● ● ● ●
●● ●●
● ●
●
●●
●
●
● ●
●
●●
●●
●●
●
●
●●
●●●
●
●●●●●
●●
●
●●●●●
●
●● ●●
●●●
●●
●●
●●
●
●●●●
●
●●●
●●
●●●●●● ●●●● ●●●●●●● ● ●● ● ● ● ●
●●
●
●
●
●
●
●●
●
●
●●
●●
●●
●
●● ●
●
●●
●
●●●
●●●
● ●●
●●●
●●
●
●●●
●●●●
● ●● ●● ● ●●●●●●● ●● ● ● ●
● ●● ●
● ● ● ●●● ● ●● ● ●●●●● ● ● ●
●
●●
●●
●
●●
●●
●
●
●●
●●
●
●●
●
●
●●
●
●●
●●
●●●●
●●●
●●
●
●
●●
●● ●●
●●●
● ● ●●●● ● ●
●
● ●
●●
●●
●
●
●●
●●
●●
●●
●
●●
● ●
●●
●
●●
●●
●●
●
●●
● ●
●●
●●
●
●●
●
● ●● ●
●
●
●● ●
● ●
●●●● ●
●●●● ●●●●● ● ●● ●● ●● ●
●● ●● ● ● ●●● ● ● ●
●●
●
●●
●●
●
●
●●
●
●●
●
●●
●
●●
●
●●
●●
●
●●●●
●
●●
● ●●
●
●●●●●
●
●
● ●
●●
●
●●● ●● ● ●● ●● ●●●● ● ●●●●● ●●●
● ●●●
● ●●●● ●
●
● ●●
●● ●
●● ●● ● ●● ●
●
●
●
●●
●
●
●
●
●
●
●●
●●
●●
●●
●
●
●●
●●
●
●
●●
●
●
●●
●●
●
●●
●
●●
●
●●
●●●
●
●
●●
●●
●●
●● ●●●
● ●● ● ●
●●
●●
●●
●●
●
●●
●
●●
●
●
● ●
●
●●
●●
●●
●
●
●●
●●
●
●●
●●●
●●
● ●
●
●● ●●
● ● ●●
● ●●
● ●
●●●
●
●● ● ● ●
● ● ● ● ● ●●●
●
●
●●
●
●●
●●
●●
●
●●
●●●●
● ●
●●●●● ● ●● ●● ●●●● ● ●●●● ● ●●● ● ●● ●● ●● ● ●● ●● ● ●●●● ● ● ● ●
●
●●
●
●
●
●
●●
●
●●
●
●
●●
●
●●
●
●
●●
●
●●
●●
●●
●●
●●●
●
●●●●
●●
●
●●
●
●● ●●
● ●●
●
●
●
●
●
●
●
●
●
●●
●●
●
●
●
●
●
●
●
●
●
●
●
●
●
●●
●
●●
●●
●
●
●
●
●●
●
●
●
●
●
●
●
●
●
●
●●
●
●
●
●
●
●
●
●
●
●●
●
●● ●●
●
●
●
●●●●
●
●●●●
●●● ●
●
● ●
●● ●●● ● ●
●
●
●
●
●●
●
●●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●●
●
●
●
●●
●
●
●
●●
●●
●
●●
●●
●●●●●●●
●
●●●● ●
●
● ●●●●●●
●● ● ● ● ●● ●
●● ●● ● ●●●● ●
● ●● ●● ● ● ● ● ● ● ●● ● ●● ● ●● ● ● ● ●● ● ●
● ● ● ●
●
●
●
●
●
●
●
●
●
●
●
●●
●
●
●
●
●
●
●
●
●
●●
●
●
●
●
●
●
●
●
●
●
●
●
●●
●●
●
●
●●
●
●
●
●
●
●
●
●
●
●●
●
●
●
●
●
●
●●
● ●●
●
●
●
●
●
●●● ●● ● ●
●●
●
●●
●●
●
●● ● ●● ● ●●
● ●●● ●●● ● ● ● ● ●● ●●
● ● ●●● ●● ● ● ●●● ● ●●●●●● ● ●●
0
0
● ●
●●● ●●● ●
● ●●
0
●●
●●
●● ● ● ●● ●
●●●● ● ● ●●●● ●●● ● ●●
●●
●●●
●
● ● ● ●●
●
●
●
●●
●
●
●
●
●●
●●
●●
●
●●
●
●
●
●
●●
●
●●●
●
●●
●●
●
●
●
●●●● ●
● ●● ● ● ●● ● ● ● ●
●
●
●
●
●●
●
●
●
●●
●●
●●
●●●
● ● ● ● ● ● ● ●● ● ●● ●● ● ●● ●
● ●
●●● ● ● ●
●
●
●
●
●
●
●●
●
●
●
●●
●
●
●●
●
●●
●●●
●
●
● ●
●●
●● ●
●● ● ●
0 1 2 3 4 5 6 0 2 4 6 8 0 2 4 6 8
Exercises
CM (u, v ) = min(u, v ), 0 ⩽ u, v ⩽ 1,
correspond?
b) Show that the function
Cm (u, v ) := (u + v − 1)+ , 0 ⩽ u, v ⩽ 1,
d) Show that for any copula function C (u, v ) on [0, 1] × [0, 1] we also have
Hint: For fixed v ∈ [0, 1], let h(u) := C (u, v ) − (u + v − 1) and show that
h(1) = 0 and h′ (u) ⩽ 0.
" 105
P(X = 1 and Y = 1) = pX = pY ,
P(X = 0 and Y = 1) = 0,
P(X = 1 and Y = 0) = 0,
P(X = 0 and Y = 0) = 1 − pX = 1 − pY ?
where λ, µ, ν > 0.
a) Find the marginal distributions of X and Y .
b) Find the joint cumulative distribution function F (x, y ) := P(X ⩽
x and Y ⩽ y ) of (X, Y ).
c) Construct an “exponential copula” based on the joint cumulative distri-
bution function of (X, Y ).
Exercise 4.5 Consider the random vector (X, Y ) with the joint probability
density function
106 "
1 1
1 2 (x, y )e−x /(2σ )−y /(2η ) + 1 2 (x, y )e−x /(2σ )−y /(2η ) ,
2 2 2 2 2 2 2 2
fe(x, y ) :=
πση R− πση R+
plotted as a heat map in Figure 4.9b.
1.5
0.3 1
●
● ●
●
●
3
●
● ●
●
●●
0.5 ● ●● ● ● ● ●
● ●
● ● ●
● ●
●● ● ●● ● ● ●●
●
● ● ●
● ●● ●
● ●● ● ●● ● ●
● ●
● ● ● ● ● ● ● ●
● ● ●
● ● ●● ● ●● ● ● ●●
● ● ● ● ● ● ● ●
● ● ● ● ● ●● ● ●
● ● ●● ● ●● ●
●● ●● ● ●●● ● ● ●
●
● ●● ● ● ●● ● ● ● ●
2
●
● ● ● ● ● ●● ●● ● ● ●● ● ● ●
● ● ●● ● ● ● ●
● ● ●●● ●●●● ● ●● ● ●
● ●● ● ● ●●●● ● ● ● ● ● ● ● ●
●● ● ●● ● ●●●●● ●●●
●
● ●● ● ● ●● ●● ●
● ●●● ●● ●● ●
●●●
●
●
0.2
● ●● ●●● ● ● ●●
● ● ●
●
●● ● ●●●● ●● ● ● ● ● ● ● ●●
● ●
● ●● ●● ●● ● ●
● ● ●
● ●●● ● ●●● ● ● ● ● ● ●
●● ● ● ●●●● ● ●●● ●● ●● ● ●● ● ● ● ●● ● ● ● ● ●
● ● ●● ●●
●
●
● ● ●● ● ●
● ●● ●● ● ● ●● ●● ●
0
●●● ●● ● ●●●●●
● ●●● ● ● ● ● ● ●
●● ● ●● ● ●● ● ●●●
y
●●●
● ● ● ● ●●● ●● ●
●
●● ●● ●
●● ●● ●●●● ● ● ●● ●● ●●● ● ● ●● ● ● ●
● ●● ●●● ● ●● ●● ● ●●●● ●● ● ●
●●● ●●
● ● ●● ●●●●●● ● ● ●●● ●●●● ● ● ●● ● ● ● ●
●●●●●●● ● ●●
● ●
●● ●●●● ●●
● ● ●●
● ● ● ●● ●●
●●
●● ●● ●●
● ●●
● ●● ● ●
● ● ●● ● ● ●
● ●● ●● ●● ● ● ● ●●● ●● ●● ●●● ●●●●● ●● ●● ● ● ●
●●
●● ●●● ● ●● ● ● ●●●● ●●●●
● ●
● ●
●●●● ●● ●● ●
● ●
● ● ●● ● ● ●●●
●
●●●● ● ● ●● ● ●●
●● ● ● ●● ● ● ●
●
●
●●●●●● ●●● ● ●●● ● ● ● ●● ● ● ● ●● ●●●● ●●●● ● ●● ●● ●● ● ●
●●●● ●● ● ●●
●● ●● ●●● ● ● ●● ● ●●● ● ●● ● ●● ● ● ●
● ●● ● ●●
●
●●●●● ● ●
● ●●
● ● ● ●●●● ●●●● ●● ●
● ●● ● ● ●● ● ●● ●
●
● ● ●●
● ● ●
● ●●
1
●● ● ●● ● ●● ● ●● ● ● ● ●● ● ● ● ● ●● ●● ●●● ●●●●
● ●● ● ● ● ● ●● ● ●
●● ●
● ●●●● ●●●● ●● ●● ●● ●● ●●● ●●●
● ● ●●●● ● ● ● ●●●●● ●
● ●●● ●
●
●●● ● ● ● ●● ●● ●●●● ●
●● ●
●●●● ● ●●●
●●●●●●●● ●● ●● ● ● ● ●
●● ●● ●●●●●● ●
● ●
● ● ●●● ●●● ● ●● ● ● ● ● ●
2
● ●●●●● ●● ●● ● ● ●●● ● ●● ● ● ●
●●● ● ● ●
●● ● ● ● ●● ●●● ●
● ● ●●●●
●
●●●●●●● ● ● ● ● ● ● ● ● ● ●
●● ●●
● ●● ●●● ● ●●●●●● ● ●● ●● ●● ● ●● ●● ●● ●
● ●● ●●● ● ●●
●●●● ●●● ●●
●●● ●●●● ● ●●
● ●● ●
●●●●
●●●●●●●
●
● ●●● ●●● ● ●●●● ● ● ● ● ● ● ●
●● ●●
●● ●● ●●●● ● ●●● ●●● ●● ●●● ● ● ●
●● ●● ●●● ● ●● ●●●● ● ● ● ●● ●●●●●● ● ●●● ●● ●●
● ●●●
●● ● ● ● ● ●
● ●
●●●● ●● ●●● ●●●●● ●
●●●● ●● ● ●●●●
● ●● ●●●
● ●● ●● ●●● ● ●●● ●● ● ● ●● ● ●● ● ●●
● ●● ●●●
● ● ● ●●●● ●●●
●●● ●●● ● ● ● ●●● ●●● ●● ● ● ●●●●●● ● ●● ● ● ●
●●●● ●
●●
●●
● ●● ●● ●
●●● ●●●●●●
● ●●
●●
●●●● ●●● ● ● ●
●● ● ●● ●
●●●● ● ●● ●● ● ●● ●● ● ●●● ● ● ●
●
●●
●●●●● ●●● ●●●●● ●●●●●●● ●
●● ●●● ●● ●●●●● ●● ●● ●
● ●●● ● ●
● ● ● ● ●
●● ●●● ●● ● ● ●●● ●●● ● ● ●●● ●● ● ● ● ●
●● ●● ●●●● ●●●
● ● ●
●●●
●●●●●●● ● ●●●●● ●●
● ●●● ●● ●
●●
●●● ● ● ●●●●● ●●●● ● ●●● ● ● ●● ● ● ●●
●●●●●●●
●●●●●●●
● ●●
●●●● ●●●● ●●● ●● ● ●
●●●● ●●
●●
●●
●
●●●● ●●●●●
●●● ● ●● ● ● ● ● ●● ●● ●●●●
●
● ● ● ● ●● ●●●● ●● ● ●●●●● ●●●● ●●● ●●●●
● ● ● ●●● ●●●●●●
● ●
● ●● ● ●● ●● ● ● ● ●●
●●● ●
●●●
●●●
●●●●●●●● ●●●● ●●● ●●●●
●●● ●●● ●●
● ●● ●● ●
●●● ● ●●
●● ● ● ●●
●●●
●
●●●●●●● ●●●● ● ●● ●●●●●
● ● ● ●●
●●
●● ●●● ●●●●●●●● ● ●● ● ●● ● ● ●●
●● ●●● ●●●●●● ●● ●●●● ●●●●● ●● ●● ● ●●● ●●●●● ● ●●● ● ● ● ●●● ●● ● ●● ●
●●
●● ●●●
●● ●● ●●●● ●● ●●●●● ●●
●●● ●●● ●
●●●●
●
●●● ● ●●●
●
●●
●● ●●● ● ● ●
●
●●●●●
●
●● ●●●
●●
●● ●●●●●●● ● ●●
● ● ● ●●●
●●●●● ●●● ●● ●● ●●
● ● ●●
●●
●● ● ●●●● ●●●●● ● ● ● ●●
-0.5
●●● ●● ●●●● ●● ● ●● ● ●● ●● ● ●●● ●●
●● ●
●● ●●●●●●● ● ●
● ●
● ●●●● ●● ●●● ●● ● ●● ●● ● ● ●●●●● ●●● ● ●●● ● ● ● ● ●
●● ●
●●●
●●●●●
● ●●● ●● ●●●●●● ●
●
● ●
● ●●● ●●● ● ● ●
●● ●
●● ●●● ●●●●● ● ● ● ●
●
●●●
● ● ●●●● ●●●● ●
●●●●● ● ● ● ●● ●●● ●● ● ●
●●● ●●●●● ●●
●●
● ●● ●● ●●
●●●● ●●● ● ●● ●●●●●
●
●● ● ●●●●
●●●●
●● ●●●●●● ●
●● ●● ●● ●● ●● ● ● ●●● ●
●● ● ●●●● ●●●●
● ●● ●
●●●●
●●●● ●●●
●●● ●● ●●
●
●●
●● ●●●
● ● ●●● ●●● ● ●● ●
● ● ●
●● ●
●●● ●●●● ●●●●
●
●● ●● ● ●● ●● ● ●● ● ● ● ●
●●● ●●● ● ●
●●● ●●●
● ●●●●● ●●● ●
●● ●●● ●●●●
● ●●●
●●●●
●● ●● ● ●●
●● ● ● ●● ●
●● ● ●● ●● ●● ●● ● ●● ● ●
0
●● ● ● ●● ● ● ●
●● ● ● ● ● ● ●● ● ● ● ●
● ●●●●●●● ● ●●●●●●● ●●●● ●●
●●●
● ●●● ● ● ● ●● ●
● ● ● ●
● ● ●
●● ● ●● ●●●●●● ● ●●●●
● ●●
●● ● ● ●● ●● ●
●● ●● ●● ●
●
● ●● ●●
●●●●● ●●●●●●●
●●●●● ●● ●● ●● ● ● ●●● ●●●● ●●●●
●●●● ●● ●● ●● ● ●●●
●
●●●●● ●● ● ●
●
● ●●● ● ● ●● ● ●●●●● ●●● ●●● ●● ● ●●●● ●● ●● ● ● ●●●●
●● ●● ●● ●●● ● ● ●●● ●●
● ●●●●● ●● ● ●●
● ● ●● ●
●●●●●● ● ●●
●● ●
●
●●
●
●● ● ●
●
●●●
●●
●
● ●●●●
● ●●●●
● ●
●
●●● ●
● ● ●●●●
●
● ● ●● ●●● ●
● ● ●● ● ●●● ●● ●● ●
●●●●● ●●● ●●● ● ● ●
●●
●
● ● ● ●● ● ●●●
● ●● ● ● ●
● ●● ● ●●●● ●
●● ● ●● ●●
●● ●
●● ●● ●
●●●
● ● ●●●
●● ●●
●●●
●
●●
●● ● ● ● ●●● ● ●●● ● ●● ● ● ● ●●● ●
● ●●●
●● ●●●●●
● ●●● ●●●●
●●●● ● ●●
● ●
● ●●● ●● ●●● ●●●●●● ●
●
● ●● ●●●● ●●●●●
●●●●●● ● ●● ●● ● ●
●● ●●● ●
●● ●●●
● ●● ●● ● ●●● ●● ●
● ● ●●●●● ● ● ● ●●
● ●●
● ●● ●●●●●
● ●●●●● ●●●
● ●●● ●● ● ●●●●
1
● ● ●
● ● ● ● ● ● ● ●●● ● ●●●●●● ● ●●
● ●●●● ●
● ●● ●●●● ●
●●● ●● ● ●● ●● ● ● ●
●●
●●● ●●● ●●
●
●● ● ●●
●● ● ●● ● ● ●● ●● ●
● ●● ● ● ●●●
●● ● ●●
●
●●● ●● ●● ●●●● ●●● ●
●● ●● ●
●●●●●● ●●●
● ●
●●●
● ● ● ● ● ● ● ●● ●●●●●●●
●● ●
●● ● ●●
●●●●●● ● ●●●●
●●● ● ●● ● ●●●●●
●
●
●
●●
●
●●● ●●●
● ● ● ● ● ●●●●●●●
● ● ● ● ●●
● ●
●● ●
● ●●●
●●● ●
● ●●●●
●●● ●●
●
●●●●
●●●
●● ●●
● ●● ● ● ● ● ● ●●● ●
● ● ●●●● ●●
●
●
●● ●● ●●● ● ●●● ●● ●● ●
● ●●●●●
●●● ●●
●●
●●● ●●●●●●●● ●
●● ●●● ●● ● ●●●● ● ●● ● ●
●
●● ● ● ●●● ● ●●● ●●● ● ● ● ●●●●● ●●● ●● ●● ●
●●●
● ● ●●●●●●● ● ●●● ●●● ●●● ●●●
●● ● ●● ● ●
● ● ●●●● ● ●●● ● ●● ●●●●
● ●● ●● ●●● ●● ●●● ●●●●
● ●
●
●●●● ●●●●● ●
● ●● ●●●● ● ●● ●●● ● ●● ●● ●● ● ●●●● ●● ●●●
● ●●●●
● ●●●●● ●● ●●
●● ●●● ●●●● ●● ●●● ●
● ●●●●●● ●● ●● ● ●
0.1
● ● ● ● ●● ● ●●●●● ● ●● ● ●●●●
● ●
●● ●● ●●●
●● ● ● ●●●●●
● ● ● ●
● ●●● ●
● ● ● ●
●●● ● ●
● ●● ●●
● ●● ● ● ● ●●●
●● ● ● ●
● ● ●● ●● ● ●●● ● ●● ● ● ●●●● ●● ●●● ● ● ● ●●●●
● ●●
●● ● ● ●●● ●● ●●●●● ● ●●
●●
● ●● ●● ●●●●● ●●
●●● ● ● ●●● ●●●●● ●
●● ● ●
● ●● ● ● ● ●● ●● ●● ●●●
●●● ●●●●● ●
● ● ●●● ●● ●● ●● ● ● ●● ●●●● ●
●●●●● ●
●●●●
●
●●●●● ●●● ●●●●
●●●●●●●
● ●●●●●
●
●● ● ● ● ●●● ●
●
● ●●●●●●
● ●●● ● ●● ● ●● ●
●● ●
●●●●● ●
● ●●●●
● ● ● ● ● ● ● ● ●● ● ●● ● ●● ●●●● ● ●
●●●●●●● ●● ●●●●● ●● ●●●● ● ●●● ●●●●●● ●●●●
●
●
● ● ● ● ●● ● ●●
● ● ●●●● ●● ●●
● ●●● ●●
● ●●●
●●● ● ●●●●
●●●●●●● ●
●●● ● ●● ●
●●
−1
● ● ● ● ● ●●●●●●● ●● ● ●● ● ● ● ●
●● ●●●●
● ●● ●● ● ● ● ●●
●● ● ● ● ● ● ●●●● ●● ●●● ●
●●●● ● ●● ●
-1
● ●● ● ● ●●●● ● ●●● ●● ●● ● ●●
● ● ● ● ● ●●
● ● ● ● ●● ● ● ●● ● ● ● ● ●● ●●● ●● ● ● ●● ●●●● ●●● ●●● ●●●
● ● ●● ●●● ●● ●
● ●●●
● ● ● ● ● ● ●● ●●● ● ● ●● ● ● ● ●●●●●●● ●● ● ●●●
●● ●● ●
● ●●● ● ● ●●●●
● ●
●● ●●●● ●● ●● ●●●● ●●●● ●●●●●
● ●●●●● ●●
●● ●
●●● ● ● ●●●
●●
● ● ●● ●● ● ● ● ● ●●●● ●●●
● ●● ●● ● ●●●●
● ● ● ● ● ● ●● ● ● ● ●● ● ● ●● ●●● ● ● ●●
●
●●●
● ● ●●
● ● ● ● ●
●● ● ● ●
●
● ● ● ● ●●●●● ● ●●● ● ●● ● ●●● ●● ●●●●
●● ●● ● ● ●● ● ● ●● ● ●
●●●●
● ● ●● ● ● ●● ●● ● ● ● ●●
●
●●
●●●●●●● ●●● ● ●
● ●● ●● ●● ●
●
●
●
●
●
●●● ● ●●● ● ● ● ● ●●
● ●● ●● ● ●● ● ●●
●
● ●●●●● ●
●●● ● ● ● ●●●
y
● ●● ● ● ●● ●● ●●●
●●● ● ● ●
●●
●
● ●
●●●● ●● ●● ●●
●●●● ●● ● ● ● ●● ●●● ●● ●
● ● ● ● ● ●●●● ● ● ●● ●●
● ● ●● ●● ● ● ● ● ●● ●● ●●
● ●● ● ● ● ● ● ● ●●
●
●● ● ●● ● ● ●● ●● ● ●● ● ●
0
● ● ●● ● ●● ●● ● ●● ●●●● ● ● ●● ●
● ● ● ●●
●● ● ● ●
●●● ● ● ● ● ● ●●● ●●
● ● ● ●● ●
●●●
● ●● ●● ● ● ●● ● ●●● ●
● ● ● ●● ● ●
● ● ●
● ● ● ● ● ● ●● ● ● ● ● ●●●
● ● ●● ●
●● ● ●●● ● ●●●● ●
● ● ● ●● ● ● ● ●●
● ● ● ● ● ●
●● ● ● ●●● ●●● ● ● ●
● ●
● ●● ● ●●
●● ● ●●●● ●● ● ● ●● ●
● ● ● ● ●● ●● ● ● ●●●● ●●
● ● ● ●● ●●
●
● ●●
−2
●
● ● ● ● ●●●
● ● ●
● ● ● ●●● ● ● ●● ●● ● ● ●
● ● ● ●● ● ● ● ● ● ●
● ● ●
● ● ●● ● ● ●
●● ●
● ●
●
● ●● ●●●
● ● ● ●● ● ● ●
-1.5
● ● ● ● ●●
● ●● ● ● ●
● ● ●● ●●●
● ● ● ● ● ● ●● ●●
● ● ●
● ● ●
●● ● ●
● ● ● ●●
● ● ●
● ●●
●
●
-1
●
● ●
● ● ● ●
−3
0
● ●
● ●
●
●
●
●
-2 -1 -2 ●
● ●
●
library(MASS)
Sigma <- matrix(c(1,0,0,1),2,2);N=10000
u<-mvrnorm(N,rep(0,2),Sigma);j=1
for (i in 1:N){
if (u[i,1]>0 && u[i,2]>0) {j<-j+1;}
if (u[i,1]<0 && u[i,2]<0) {j<-j+1;}}
v<-matrix(nrow=j-1, ncol=2);j=1
for (i in 1:N){
if (u[i,1]>0 && u[i,2]>0) {v[j,]=u[i,];j<-j+1;}
if (u[i,1]<0 && u[i,2]<0) {v[j,]=u[i,];j<-j+1;}}
joint_hist(v) # Function defined the previous section
a) Show that (X, Y ) has the Gaussian marginals N (0, σ 2 ) and N (0, η 2 ).
b) Does the couple (X, Y ) have the bivariate Gaussian distribution with
probability density function fΣ (x, y ), where Σ is the covariance matrix
(4.1) of (X, Y )?
c) Show that the random variable X + Y is not Gaussian (take σ = η = 1
for simplicity).
d) Show that under the rotation
cos θ − sin θ
R= ,
sin θ cos θ
∂2C
e) Compute the resulting copula density function (u, v ), u, v ∈ [0, 1].
∂u∂v
108 "
This chapter introduces the superhedging risk measure, which can be defined
as the superhedging price of a portfolio hedging a financial derivative such
as a call or put option. Our presentation relies on financial derivatives and
their pricing in the Black-Scholes framework.
" 111
annualized returns of over 40% in its first years, but registered a loss of
US$4.6 billion in less than four months in 1998, which resulted into its closure
in early 2000.
As of year 2015, the size of the financial derivatives market is estimated
at over one quadrillion (or one million billions, or 1015 ) USD, which is more
than 10 times the size of the total Gross World Product (GWP).
● ●
●● ● ● ●
●
● ●
●●
●
● ● ●
● ● ●
● ●
● ●
●
● ●
● ● ●
● ●
●
● ●
● ● ● ●
●
●
● ●
●
● ● ●●
● ● ● ● ● ●
● ●
● ●
●
●
● ●
●
● ● ●
●
● ● ●
● ●
● ●
● ● ●
●
● ● ● ●
● ● ●
● ● ● ●
● ●
● ●
● ● ●
● ● ●
● ●
● ● ● ● ●
● ● ● ● ● ●
● ●● ●
● ●
● ● ●
● ● ● ● ● ● ●
● ● ● ● ●
● ●
● ● ● ● ●
● ●
● ● ● ● ●
● ● ● ● ● ●●
● ● ● ●
● ● ● ●
●
● ● ● ●
● ●
100
●
● ● ● ● ●
10
● ● ● ●
● ●
● ● ● ● ● ●
● ● ● ● ● ●
● ●
● ● ● ● ● ● ●
●
● ● ● ● ● ●
● ● ● ● ● ● ●
● ● ● ●
● ●●
● ● ● ●
● ●
● ● ● ● ●
● ● ● ● ● ●
● ● ● ●
● ●
● ● ●
● ● ●
● ●
● ● ●
● ● ● ● ●
● ● ● ●
● ● ●
● ●
● ●● ●
● ● ●
● ● ● ● ● ●
● ● ● ● ●
● ● ●
●● ● ● ●
● ●
●
● ● ● ● ●
● ●
● ● ●
● ●
●● ● ● ● ●
● ● ● ● ● ●
● ●
● ● ● ●
● ● ● ● ●
● ● ● ● ● ●
● ● ●
● ● ● ●
● ●
● ● ● ● ● ● ●
● ●● ● ● ● ● ● ● ●
● ● ●
● ●
●● ● ●
● ● ● ● ●
● ● ● ● ● ● ● ● ● ●
●
● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ●
●
● ●
● ●
● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ●
● ●
● ●
● ● ● ● ● ●
● ● ●
● ● ● ●
● ● ● ● ● ●
● ●
● ●
● ● ●
● ● ●
●● ●
● ● ● ● ●
●
● ● ● ●
● ● ●
● ● ● ● ●
● ● ● ● ●
● ●
● ● ●
● ● ● ●
● ● ● ● ●
● ●
● ● ● ● ● ● ●
● ●●
●
● ●
● ● ● ●
● ● ● ●
●● ● ●
● ●
● ● ● ● ●
● ● ● ●
● ● ●
●●
● ● ● ● ●
●
● ● ●
●
● ●
●
● ● ●
●
●
● ●
●●
●
●
●
●
● ●
●
● ●
● ● ●
●
● ●
●
● ● ●
●
● ●
●
● ● ●
● ●
●● ● ●
● ● ● ●● ●
●
● ● ●
● ● ● ● ●
● ● ●
● ●
● ● ● ●
● ●
● ● ● ● ● ● ●
● ●
● ● ●
● ● ●
●
● ● ● ●
●
9
●
● ● ●
●
● ●
● ●
● ● ● ● ●
● ●
● ●
● ●
● ●
● ●
● ●
●
● ● ●
● ● ● ●
●
80
● ● ●
●
● ● ●
●
● ● ● ●
● ●
● ● ●
● ●
● ● ●
● ●
● ● ● ●
●
● ●
● ● ●●
● ●
● ●● ● ●
● ● ●
● ●
● ●
● ● ●
● ●
● ●
● ●
● ●
●
●
●
● ●
● ● ●
●
● ● ● ●
● ● ●
● ●
● ● ●
● ● ●
●
●
● ●●
● ● ● ●
● ●
● ● ●
●
●
●
●
●●
● ● ● ● ●
● ● ●
●●● ● ● ●
● ● ● ●
●
●
●
● ● ●
● ● ●
●
● ●
●●
● ●
● ●
● ● ● ● ●
● ● ● ● ●
● ●●
● ● ● ●
● ●
● ● ●
● ●
● ●
● ● ● ● ●
●
● ●
●
●
● ●
● ●
● ●
●
● ● ●
●
●●
● ● ● ●
●
●
● ●● ●
● ●
●
●● ●
● ●
● ● ● ●
●
●
8
●
●
●
●
●
● ● ●
● ●
●
●
●
●
●
●
●
●
●
●
●
● ●
● ●
●●●
60
●
●
●
● ●
● ●
●
●
●
●
●
● ●
●
● ●
●
●
● ●
● ●
●
●
● ● ●
● ● ●
●● ●
●
● ●
● ●
●
●
7
● ●
●
● ● ●
●
●
●
●
● ●
● ●
● ● ●
● ●
● ●
●
● ● ●
● ●
● ● ●
●
● ●
●
● ●●
● ● ●
40
● ●
● ●
●
● ●
●
● ●●
● ●
● ●
●
● ●
●
● ● ●
2012 2013 2014 2015 2016 2012 2013 2014 2015 2016
(a) WTI price graph. (b) Graph of Keppel Corp. stock price
Option Contracts
Referring to the philosopher Thales of Miletus (c. 624 - c. 546 BCE), Aristotle
writes:
“He (Thales) knew by his skill in the stars while it was yet winter that
there would be a great harvest of olives in the coming year; so, having a
little money, he gave deposits for the use of all the olive-presses in Chios
and Miletus, which he hired at a low price because no one bid against him.
When the harvest-time came, and many were wanted all at once and of a
sudden, he let them out at any rate which he pleased, and made a quantity
of money”.
In the above example, olive oil can be regarded as the underlying asset, while
the oil press stands for the financial derivative.
Next, we move to a description of (European) call and put options, which
are at the basis of risk management.
112 "
Fig. 5.2: Graph of the Hang Seng index - holding a put option might be useful here.
" 113
10
(K-ST)+=0
9
8 ST
7
Strike price
K=6 K
St 5
K-ST>0
4
3 ST
2
S0.1
1
0
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 T=1
In general, the payoff of a (so called European) put option contract can be
written as
K − ST if ST ⩽ K,
+
ϕ(ST ) = (K − ST ) :=
0, if ST ⩾ K.
20
Put option payoff (K-x)+
15
(K-x)+
10
0
80 85 90 95 100 105 110 115 120
K
Fig. 5.4: Payoff function of a put option with strike price K = 100.
114 "
Physical delivery. In the case of physical delivery, the put option contract
issuer will pay the strike price $K to the option contract holder in exchange
for one unit of the risky asset priced ST .
Cash settlement. In the case of a cash settlement, the put option issuer will
satisfy the contract by transferring the amount C = (K − ST )+ to the option
contract holder.
As of year 2015, the size of the derivatives market was estimated at more that
$1.2 quadrillion,∗ or more than 10 times the Gross World Product (GWP).
See here or here for up-to-date data on notional amounts outstanding and
gross market value from the Bank for International Settlements (BIS).
On the other hand, if the trader aims at buying some stock or commodity,
his interest will be in prices not going up and he might want to purchase a
call option, which is a contract allowing him to buy the considered asset at
time T at a price not higher than a level K fixed at time t.
Definition 2. A (European) call option is a contract that gives its holder the
right (but not the obligation) to purchase a quantity of assets at a predefined
price K called the strike price, and at a predefined date T called the maturity.
Here, in the event that ST goes above K, the buyer of the option contract
will register a potential gain equal to ST − K in comparison to an agent who
did not subscribe to the call option.
Two possible scenarios (ST finishing above K or below K) are illustrated in
Figure 5.5.
∗
One thousand trillion, or one million billion, or 1015 .
" 115
10
ST-K>0
9
8 ST
7
Strike price
K=6 K
St 5
(ST-K)+=0
4
3 ST
2
S0.1
1
0
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 T=1
In general, the payoff of a (so called European) call option contract can be
written as
ST − K if ST ⩾ K,
+
ϕ(ST ) = (ST − K ) :=
0, if ST ⩽ K.
20
Call option payoff (K-x)+
15
(x-K)+
10
0
80 85 90 95 100 105 110 115 120
K
Fig. 5.6: Payoff function of a call option with strike price K = 100.
116 "
Physical delivery. In the case of physical delivery, the call option contract
issuer will transfer one unit of the risky asset priced ST to the option contract
holder in exchange for the strike price $K. Physical delivery may include
physical goods, commodities or assets such as coffee, airline fuel or live cattle.
Cash settlement. In the case of a cash settlement, the call option issuer will
fulfill the contract by transferring the amount C = (ST − K )+ to the option
contract holder.
Option pricing
In order for an option contract to be fair, the buyer of the option contract
should pay a fee (similar to an insurance fee) at the signature of the contract.
The computation of this fee is an important issue, and is known as option
pricing.
Option hedging
The second important issue is that of hedging, i.e. how to manage a given
portfolio in such a way that it contains the required random payoff (K − ST )+
(for a put option) or (ST − K )+ (for a call option) at the maturity date T .
install.packages("Quandl")
library(Quandl);library(quantmod)
getSymbols("DCOILBRENTEU", src="FRED")
chartSeries(DCOILBRENTEU,up.col="blue",theme="white",name = "BRENT Oil
Prices",lwd=5)
BRENT = Quandl("FRED/DCOILBRENTEU",start_date="2010-01-01",
end_date="2015-11-30",type="xts")
chartSeries(BRENT,up.col="blue",theme="white",name = "BRENT Oil Prices",lwd=5)
getSymbols("WTI", from="2010-01-01", to="2015-11-30")
WTI <- Ad(`WTI`)
chartSeries(WTI,up.col="blue",theme="white",name = "WTI Oil Prices",lwd=5)
" 117
120
20
100
15
80
10
60
40
Jan 04 Jan 03 Jan 03 Jan 02 Jan 02 Jan 02 Jan 04 Jan 03 Jan 03 Jan 02 Jan 02 Jan 02
2010 2011 2012 2013 2014 2015 2010 2011 2012 2013 2014 2015
160
four-way collar
150 y=x
140
130
120
110
100
90
80
70
70 80 90 100 110 120 130 140 150
x
The four-way call collar option contract will result into a positive or negative
payoff depending on current fuel prices, as illustrated in Figure 5.9.
∗
Right-click to open or save the attachment.
118 "
20
four-way collar payoff
15
10
-5
-10
-15
-20
70 80 90 100 110 120 130 140 150
K1 K2 ST K3 K4
20
(K1-x)+-(K2-x)++(x-K3)+
15 -(x-K4)+
10
-5
-10
-15
-20
70 80 90 100 110 120 130 140 150
K1 K2 ST K3 K4
Fig. 5.10: Four-way call collar payoff as a combination of call and put options.∗
Therefore, the four-way call collar option contract can be synthesized by:
1. purchasing a put option with strike price K1 = $90, and
2. selling (or issuing) a put option with strike price K2 = $100, and
∗
The animation works in Acrobat Reader on the entire pdf file.
" 119
We close this introduction with a simplified example of the pricing and hedg-
ing technique in a binary model. Consider:
i) A risky underlying stock valued S0 = $4 at time t = 0, and taking only
two possible values
$5
S1 =
$2
at time t = 1.
ii) An option contract that promises a claim payoff C whose values are
defined contingent to the market data of S1 as:
$3 if S1 = $5
C :=
$0 if S1 = $2.
αS0 + $β at time t = 0.
αS1 + $β
S1 = 5 and C = 3
S1 = 5 and C = 3
S0 = 4 S0 = 4
S1 = 2 and C = 0
S1 = 2 and C = 0
αS1 + $β = C.
$3 = α × $5 + $β if S1 = $5,
C=
$0 = α × $2 + $β if S1 = $2,
i.e.
5α + β = 3, α = 1 stock,
which yields
2α + β = 0, $β = −$2.
In other words, the option contract issuer purchases 1 (one) unit of the stock
S at the price S0 = $4, and borrows $2 from the bank. The price of the
option contract is then given by the portfolio value
αS0 + $β = 1 × $4 − $2 = $2.
at time t = 0.
The above computation is implemented in the attached IPython notebook∗
that can be run here or here. This algorithm is scalable and can be extended
to recombining binary trees over multiple time steps.
Definition 3. The arbitrage-free price of the option contract is defined as
the initial cost αS0 + $β of the portfolio hedging the claim payoff C.
$3 if S1 = $5
∗
Right-click to save as attachment (may not work on .
" 121
α × $5 + $β = 1 × $5 − $2 = $3 if S1 = $5,
C=
α × $2 + $β = 1 × $2 − $2 = 0 if S1 = $2,
so that the option contract and the equality C = αS1 + $β can be ful-
filled, allowing the option issuer to break even whatever the evolution of
the risky asset price S.
In a cash settlement, the stock is sold at the price S1 = $5 or S1 = $2,
the payoff C = (S1 − K )+ = $3 or $0 is issued to the option contract
holder, and the loan is refunded with the remaining $2.
In the case of physical delivery , α = 1 share of stock is handed in to the
option holder in exchange for the strike price K = $2 which is used to
refund the initial $2 loan subscribed by the issuer.
Here, the option contract price αS0 + $β = $2 is interpreted as the cost of
hedging the option. We will see that this model is scalable and extends to
discrete time.
We note that the initial option contract price of $2 can be turned to C = $3
(%50 profit) ... or into C = $0 (total ruin).
Thinking further
1) The expected claim payoff at time t = 1 is
122 "
which are called risk-neutral probabilities. We see that under the risk-neutral
probabilities, the stock S has twice more chances to go up than to go down
in a “fair” market.
2) Based on the probabilities (5.1) we can also compute the expected value
E[S1 ] of the stock at time t = 1. We find
Here this means that, on average, no extra profit or loss can be made from
an investment on the risky stock, hence the term “risk-neutral”. In a more
realistic model we can assume that the riskless bank account yields an interest
rate equal to r, in which case the above analysis is modified by letting $β
become $(1 + r )β at time t = 1, nevertheless the main conclusions remain
unchanged.
Market-implied probabilities
By matching the theoretical price E[C ] to an actual market price data $M
as
" 123
124 "
" 125
10
Fig. 5.14: One hundred sample price paths used for the Monte Carlo method.
In this section we consider an asset price process (St )t∈R+ modeled as the
geometric Brownian motion (1.9) of Proposition 1.4.
with solution
w wt 1
t
St = S0 exp σ (s)dBs + µ(s) − σ 2 (s) ds ,
0 0 2
126 "
t ∈ R+ .
Let ηt and ζt be the numbers of units invested at time t ⩾ 0, respectively
in the assets priced (St )t∈R+ and (At )t∈R+ . The value of the portfolio Vt at
time t ⩾ 0 is given by
Vt = ζt At + ηt St , t ⩾ 0.
0 ⩽ t ⩽ T , with
log(St /K ) + (r + σ 2 /2)(T − t)
d+ (T − t ) : = √ ,
σ T −t
log(St /K ) + (r − σ 2 /2)(T − t)
d− ( T − t ) : = √ , 0 ⩽ t < T,
σ T −t
where “log” denotes the natural logarithm “ln” and Φ is the standard Gaus-
sian Cumulative Distribution Function.
We note the relation
√
d+ (T − t) = d− (T − t) + |σ| T − t, 0 ⩽ t < T. (5.4)
" 127
1.2
1
Gaussian CDF Φ(x)
1
0.8
Φ(x)
0.6
0.4
0.2
0
-4 -3 -2 -1 0 1 2 3 4
x
In other words, the European call option with strike price K and maturity
T is priced at time t ∈ [0, T ] as
Fig. 5.16: Graph of the Black-Scholes call price map with strike price K = 100.†
∗
Download the corresponding IPython notebook that can be run here or here.
128 "
Figure 5.16 presents an interactive graph of the Black-Scholes call price map,
i.e. of the function
70
60
50
40
30
20
10
0
0 40
80
100 120 Time in days
Underlying asset price 60 160
†
Right-click on the figure for interaction and “Full Screen Multimedia” view.
∗
The animation works in Acrobat Reader on the entire pdf file.
" 129
In Figure 5.18 we plot the Delta of the European call option as a function of
the underlying asset price and of the time remaining until maturity.
0.5
150
100 0
Underlying 5
50 10
15
0 Time to maturity T-t
Fig. 5.18: Delta of a European call option with strike price K = 100, r = 3%, σ = 10%.
Proposition 5.3. The price at time t ∈ [0, T ] of the European put option
with strike price K and maturity T is given by
0 ⩽ t ⩽ T , with
log(St /K ) + (r + σ 2 /2)(T − t)
d (T − t) : = √ ,
+
σ T −t
log(St /K ) + (r − σ 2 /2)(T − t)
d− ( T − t ) : = √ , 0 ⩽ t < T,
σ T −t
where “log” denotes the natural logarithm “ln” and Φ is the standard Gaus-
sian Cumulative Distribution Function.
The Black-Scholes formula for European Put Options is plotted in illustrated
in Figure 5.19.
130 "
Fig. 5.19: Graph of the Black-Scholes put price function with strike price K = 100.∗
In other words, the European put option with strike price K and maturity
T is priced at time t ∈ [0, T ] as
40
30
20
10
00 60
40 80 100
120 160 Underlying asset price
Time in days
The Delta of the Black-Scholes put option is obtained in the following propo-
sition.
Proposition 5.4. The Delta of the Black-Scholes put option is given by
∗
Right-click on the figure for interaction and “Full Screen Multimedia” view.
†
The animation works in Acrobat Reader on the entire pdf file.
" 131
In Figure 5.21 we plot the Delta of the European put option as a function of
the underlying asset price and of the time remaining until maturity.
-0.5
-1
150
100 0
Underlying 5
50 10
15
0 Time to maturity T-t
Fig. 5.21: Delta of a European put option with strike price K = 100, r = 3%, σ = 10%.
Exercises
$0 if S1 = $5
C :=
$2 if S1 = $1.
Is C the payoff of a call option or of a put option? Give the strike price of
the option.
132 "
$0 if S1 = $5
C=
$6 if S1 = $2
$3 if S1 = $5
C= at time t = 1.
$0 if S1 = $2.
We assume that the issuer charges $1 for the option contract at time t = 0.
a) Compute the portfolio allocation (α, β ) made of α stocks and $β in cash,
so that:
i) the full $1 option price is invested into the portfolio at time t = 0,
and
ii) the portfolio reaches the C = $3 target if S1 = $5 at time t = 1.
b) Compute the loss incurred by the option issuer if S1 = $2 at time t = 1.
Exercise 5.4
a) Consider the following market model:
b
a
(1)
(1) (1 + r )S0
S0
ii) If this model allows for arbitrage opportunities, how can they be
realized?
By shortselling | By borrowing on savings | N.A. |
" 133
ii) If this model allows for arbitrage opportunities, how can they be
realized?
By shortselling | By borrowing on savings | N.A. |
b
(1)
S0 a
ii) If this model allows for arbitrage opportunities, how can they be
realized?
By shortselling | By borrowing on savings | N.A. |
Exercise 5.5 In a market model with two time instants t = 0 and t = 1 and
risk-free interest rate r, consider:
(0) (0) (0)
- a riskless asset valued S0 at time t = 0, and value S1 = (1 + r )S0
at time t = 1.
(1)
- a risky asset with price S0 at time t = 0, and three possible values at
time t = 1, with a < b < c, i.e.:
(1)
S0 (1 + a),
(1)
S1 = S0(1) (1 + b),
(1)
S0 (1 + c).
134 "
S 1 − K if S1 = S 1
+
C = (S1 − K ) =
$0 if S1 = S 1 , at time t = 1.
b) Show that the risky asset allocation α satisfies the condition α ∈ [0, 1].
c) Compute the Superhedging Risk Measure SRMC ∗ of the claim C = (S1 −
K )+ .
Exercise 5.7 Given two strike prices K1 < K2 , we consider a long box spread
option, realized as the combination of four legs with same maturity date:
• One long call with strike price K1 and payoff function (x − K1 )+ ,
• One short put with strike price K1 and payoff function −(K1 − x)+ ,
• One short call with strike price K2 and payoff function −(x − K2 )+ ,
• One long put with strike price K2 and payoff function (K2 − x)+ .
Short put at K1
Long put at K2
Short call at K2
Long call at K1
K1 x K2
Fig. 5.22: Graphs of call/put payoff functions.
a) Find the payoff of the long box spread option in terms of K1 and K2 .
b) From Table 5.1, find a choice of strike prices K1 < K2 that can be used
to build a long box spread option on the Hang Seng Index (HSI).
c) Using Table 5.1, price the option built in part (b) in index points, and
then in HK$.
Hints.
∗
“The smallest amount necessary to be paid for a portfolio at time t = 0 so that the
value of this portfolio at time t = 1 is at least as great as C”.
" 135
i) The closing prices in Table 5.1 are warrant prices quoted in index
points.
ii) Warrant prices are converted to option prices by multiplication by
the number given in the “Entitlement Ratio” column.
iii) The conversion rate from index points to HK$ is HK$50 per index
point.
d) Would you buy the option priced in part (c) ?
Table 5.1: Call and put options on the Hang Seng Index (HSI).
136 "
Value at risk (VaR) is a measure of risk which is used to estimate the amount
that can potentially be lost on an investment within a certain time range.
This chapter presents the concept of risk measure, including quantile risk
measures and Value at Risk, together with experiments based on financial
data sets.
" 137
When LX < 0 the amount −Lx > 0 corresponds to a debt owed by the
company, while LX > 0 corresponds to positive liabilities such as deferred
revenue or to a debt owed to the company.
When estimating the liabilities of the company by E[X ], the required capital
is given by
CX = VX − E[X ].
VX := E[X ] + αE[X ]
1 if X < 0,
1{X<0} =
0 if X ⩾ 0.
For example, consider the sample space Ω = {1, 3, −1, −2, 5, 7} with the
non-uniform probability measure given by
1 2
P({−1}) = P({−2}) = P({1}) = P({3}) = P({7}) = , P({5}) = ,
7 7
138 "
A := {X > 1} = {3, 5, 7} ⊂ Ω,
i.e. the mean value of X given that X is strictly greater than one. This
conditional expectation can be computed as
E[X | X > 1]
= 3 × P(X = 3 | X > 1) + 5 × P(X = 5 | X > 1) + 7 × P(X = 7 | X > 1)
3+2×5+7
=
4
3+5+5+7
=
7 × 4/7
1
E X 1{X>1} ,
=
P(X > 1)
where P(X > 1) = 4/7, and the truncated expectation E X 1{X>1} is given
by E X 1{X>1} = (3 + 2 × 5 + 7)/7.
getSymbols("^HSI",from="2013-06-01",to="2014-10-01",src="yahoo")
stock<-Ad(`HSI`);returns <- as.vector((stock-lag(stock))/lag(stock));
times=index(stock);m=mean(returns[returns<0],na.rm=TRUE)
dev.new(width=16,height=7);par(oma=c(0,1,0,0))
plot(times,returns,pch=19,cex=0.4,col="blue", ylab="", xlab="", main = '', las=1,
cex.lab=1.8, cex.axis=1.8, lwd=3)
segments(x0 = times, x1 = times, y0 = 0, y1 = returns,col="blue")
abline(h=m,col="red",lwd=3); length(!is.na(returns))
" 139
0.10
0.05
0.00
−0.05
−0.10
2020 2021
Fig. 6.1: Estimating liabilities by the conditional mean E[X | X < 0] over 346 returns.
The next code is used in Figure 6.1 to estimate liabilities using the risk
measure
E[X 1{X<0} ]
V X = E[X | X < 0] = .
P(X < 0)
returns <- returns[!is.na(returns)]
condmean<-mean(returns[returns<0])
n <- length(returns); sum<-sum(returns[returns<0])
proportion<-length(returns[returns<0])/length(returns)
condmean; sum/proportion/n
condmean<-mean(returns[returns<(-0.025)])
n <- length(returns); sum<-sum(returns[returns<(-0.025)])
proportion<-length(returns[returns<(-0.025)])/length(returns)
condmean; sum/proportion/n
VX +Y ⩽ VX + VY .
Subadditivity means that the combined risk of several portfolios is lower than
the sum of risks of those portfolios, as happens usually through portfolio
diversification. For example, one person traveling might insure the unlikely
loss of her phone for VX = $100. However, two people traveling together
might want to insure the phone loss event at a level VX +Y lower than VX +
VY = $100 + $100 as the simultaneous loss of both phones during a same
trip seems even more unlikely.
The concept of subadditivity is common in pricing, as shown in the fol-
lowing example:
VX : = E [ X ] ,
also called the pure premium risk measure, is an example of a coherent (and
additive) risk measure satisfying the above conditions (i)-(iv ).
MX = E[XfX (X )],
" 141
FX : R −→ [0, 1]
defined by
FX ( x ) : = P ( X ⩽ x ) , x ⩾ 0.
Any cumulative distribution function FX satisfies the following properties:
i) x 7→ FX (x) is non-decreasing,
ii) x 7→ FX (x) is right-continuous,
iii) limx→∞ FX (x) = 1,
iv) limx→−∞ FX (x) = 0.
In addition, any cumulative distribution function FX admits left limits in the
following sense.
Proposition 6.5. For any non-decreasing sequence (xn )n⩾1 converging to
x ∈ R, we have
142 "
" 143
′
fX (x) = FX (x), x ⩾ 0.
144 "
1.0
p=0.95
0.4
0.9
Probability density
0.8
0.3
0.7
qZ0.95
0.6
0.5 0.2
0.4
0.3
0.1
0.2
0.1
0.0 0
−4 −3 −2 −1 0 1 qZ0.95 2 3 4 5 −4 −3 −2 −1 0 1 2 3 4
x
(a) Gaussian quantile and CDF. (b) Gaussian quantile and CDF.
qexp(.95, 1)
VXp = qX
p
= inf x ∈ R : P(X ⩽ x) ⩾ p
1
= − log(1 − p)
λ
1
= E[X ] log ,
1−p
p=0.95
1
0.9
Probability density
0.8
0.7
0.6
0.5
0.4
0.95
0.3
qX
0.2
0.1
0
0 1 2 4 5 6 0 1 2 3 4 5 6
qX0.95
(a) Exponential quantile and CDF. (b) Exponential quantile and CDF.
" 145
qt(.90, df=5)
getSymbols("^STI",from="1990-01-03",to="2015-01-03",src="yahoo")
getSymbols("1800.HK",from=Sys.Date()-50,to=Sys.Date(),src="yahoo")
stock=Ad(`1800.HK`);stock.rtn=(stock-lag(stock))/lag(stock);
stock.ecdf=ecdf(as.vector(stock.rtn))
plot(stock.ecdf, xlab = 'Sample Quantiles', ylim=c(-0.001,1.002), xlim=c(-0.15,0.15), ylab =
'', lwd = 3, main = '',col='blue', las=1, cex.lab=1.5, cex.axis=1.5, xaxs='i', yaxs='i')
grid(4, 10, lwd = 2)
getSymbols("1800.HK",from=Sys.Date()-3650,to=Sys.Date(),src="yahoo")
stock=Ad(`1800.HK`);stock.rtn=(stock-lag(stock))/lag(stock);
stock.ecdf=ecdf(as.vector(stock.rtn))
plot(stock.ecdf, xlab = 'Sample Quantiles', ylim=c(-0.001,1.002), xlim=c(-0.15,0.15), ylab =
'', lwd = 2, main = '',col='blue', cex=1, las=1, cex.lab=1.5, cex.axis=1.5, xaxs='i',
yaxs='i')
grid(4, 10, lwd = 2)
1.0 1.0
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0.0 0.0
−0.15 −0.10 −0.05 0.00 0.05 0.10 0.15 −0.15 −0.10 −0.05 0.00 0.05 0.10 0.15
Note that the empirical distribution function in Figure 6.7-a) has a visible
discontinuity, or gap, at 0, whose height 0.05483347 is given by
sum(!is.na(stock.rtn[stock.rtn==0]))/sum(!is.na(stock.rtn))
146 "
means that insolvency will occur with probability less that 5%.
The 95%-quantile risk measure is the smallest value of V such that
In other words, for some decreasing sequence (xn )n⩾1 such that
P ( X ⩽ xn ) ⩾ p for all n ⩾ 1,
we have
VXp := lim xn . (6.4)
n→∞
Proposition 6.9. The Value at Risk VXp of X at the level p ∈ (0, 1) satisfies
P X < VX ⩽ p ⩽ P X ⩽ VXp ,
p
(6.5)
and
0 ⩽ 1 − p − P X > VXp ⩽ P X = VXp . (6.6)
Proof. Using the above decreasing sequence (xn )n⩾1 and the right continuity
of the cumulative distribution function FX , we have
" 147
On the other hand, if P X < VXp > p then there is a strictly increasing
lim yn = VXp
n→∞
in which case there would exist n ⩾ 1 such that yn < VXp and P(X ⩽ yn ) >
p, which contradicts (6.3). The inequality (6.6) follows from (6.5) and the
relations
and
P X ⩽ VXp = P X < VXp + P X = VXp .
FX (x); FY (x)
1.00
p= 0.99
0.98
0.97
0.96
00 1 2 3 x
VX0.99
148 "
Proof. By (6.3), the function p 7→ VXp is the generalized inverse of the Cu-
mulative Distribution Function
The next proposition also follows from the Definition 6.8 of VXp .
Proposition 6.11. For all x ∈ R we have
On the other hand, choosing a strictly decreasing sequence (xn )n⩾1 such that
if VXp ⩽ x we have
" 149
= 1 − P(X ⩽ −x)
= 1 − FX (−x),
hence
−1 −1
(p) = 1 − FX − F−X (p) ,
p = F−X F−X
which yields
p
V−X −1
= F−X −1
(p) = −FX (1 − p) = −VX1−p , p ∈ (0, 1).
□
Figure 6.9-(a) shows an example where the continuity of FX ensures the sym-
p
metry property V−X = −VX1−p of Proposition 6.12. On the other hand, Fig-
q
ure 6.9-(b) shows that in the discontinuous case the relation V−X = −VX1−q
fails for q = 0.8, although it holds for p = 0.9.
1−p
V−X
1 1
p = 0.9 p = 0.9
0.8 q = 0.8
0.7 0.7
0.6 0.6
0.5 0.5
0.4 0.4
0.3 0.3
0.2 1 − q = 0.2
1 − p = 0.1 1 − p = 0.1
0 p 4 0 q p 4
-6 -5 -4 V1−p -2 -1 0 1 2 3 VX 5 6 -6 -5 -4 V1−q -2 -1 0 1 VX 3 VX 5 6
−X −X
hence
P(Y ⩽ x) ⩾ p =⇒ P(X ⩽ x) ⩾ p, x ⩾ 0,
which shows that
VXp ⩽ VYp
by (6.3). □
b) Positive homogeneity and translation invariance. Value at Risk satisfies
the positive homogeneity and translation invariance properties.
Proof. For all a ∈ R and b > 0 we have
□
c) Subadditivity and coherence. Although Value at Risk satisfies the mono-
tonicity, positive homogeneity and translation invariance properties, it is
not subadditive in general. Namely, the Value at Risk VXp +Y of X + Y
may be larger than the sum VXp + VYp . Therefore, Value at Risk is not a
coherent risk measure.
Proof. We show that Value at Risk is not subadditive by considering two
independent Bernoulli random variables X, Y ∈ {0, 1} with the distribu-
tion
FX (x); FY (x)
1.00
0.99
0.98
p=0.975
0.97
0.96
0 x
0 1 2 3
hence
+Y = 1 > VX
VX0.975 + VY0.975 = 0.
0.975
" 151
FX +Y (x)
1.00
0.99
0.98
p=0.975
0.97
0.96
0 x
0 1 2 3
have
VXp = µX + σX qZp (6.9)
where the normal quantile qZp = VZp at the level p satisfies
i.e.
qZp = Φ−1 (p) and VXp = µX + σX Φ−1 (p).
Proof. We represent the random variable X ≃ N (µX , σX2 ) as
X = µX + σX Z,
where Z ≃ N (0, 1) is a standard normal random variable, and use the relation
p = P(X ⩽ VXp )
= P(µX + σX Z ⩽ VXp )
= P(Z ⩽ (VXp − µX )/σX )
= P(Z ⩽ qZp ),
σX2 +Y = Var[X + Y ]
= E (X + Y )2 − (E[X + Y ])2
VXp +Y = µX +Y + σX +Y qZp
= µX + µY + σX +Y qZp
⩽ µX + µY + (σX + σY )qZp
= VXp + VYp .
install.packages("PerformanceAnalytics")
library(PerformanceAnalytics)
getSymbols("0700.HK",from="2010-01-03",to="2018-02-01",src="yahoo")
stock=Ad(`0700.HK`);chartSeries(stock,up.col="blue",theme="white")
stock.rtn=(stock-lag(stock))/lag(stock)[-1];dev.new(width=16,height=7);
chart.CumReturns(stock.rtn,main="Cumulative Returns")
var=VaR(stock.rtn, p=.95, method="historical");var
length(!is.na(stock.rtn[stock.rtn<var[1]]))/length(!is.na(stock.rtn))
times=index(stock);chartSeries(stock.rtn,up.col="blue",theme="white")
abline(h=var,col="red",lwd=3)
" 153
stock.rtn [2010−01−05/2018−01−31]
Last 0.00388268727923665
0.10
0.05
0.00
−0.05
−0.10
Jan 05 Jul 02 Jan 04 Jul 04 Jan 04 Jul 03 Jan 03 Jul 02 Jan 02 Jul 02 Jan 02 Jul 02 Jan 04 Jul 04 Jan 03 Jul 03 Dec 29
2010 2010 2011 2011 2012 2012 2013 2013 2014 2014 2015 2015 2016 2016 2017 2017 2017
The historical 95%-Value at Risk over N samples (xi )i=1,2,...,N can be es-
timated by inverting the empirical cumulative distribution function FN (x),
x ∈ R. It is found to be equal to VX95% = −0.03165963.
VX95% = µ + σqZp ,
m=mean(stock.rtn,na.rm=TRUE)
s=sd(stock.rtn,na.rm=TRUE)
q=qnorm(.95, mean=0, sd=1)
m-s*q
m+s*q
154 "
Exercises
b) Compute the value at risk VXp at the level p for any θ and γ, and then for
p = 99%, θ = 40 and γ = 2.
1.00
0.99
0.98
0.97
0.96
0 x
−20 −10 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160
" 155
Exercise 6.3 Discrete distribution. Consider X ∈ {10, 100, 110} with the
distribution
P(X ⩽ x) = 1 − e−λx , x ⩾ 0.
a) Compute
VXp := inf x ∈ R : P(X ⩽ x) ⩾ p
and VX95% .
b) Assuming that the liabilities of a company are estimated by E[X ], com-
pute the amount of required capital CX from (6.1).
156 "
a) Find the following quantities for the above data set, and mark their values
on the graph.
i) Historical “Academic” Value at Risk at p = 0.95. VaR95
Ac-H =
ii) Historical “Academic” Value at Risk at p = 0.80. VaR80
Ac-H =
iii) Historical “Practitioner” Value at Risk at p = 0.95. VaR95
Pr-H =
iv) Historical “Practitioner” Value at Risk at p = 0.80. VaR80
Pr-H =
b) Knowing that mean=1.15, sd=3.048, qnorm(0.95)=1.645 and qnorm(0.80)=0.842,
compute (from Proposition 6.13):
i) Gaussian “Academic” Value at Risk at p = 0.95. VaR95
Ac-G =
ii) Gaussian “Academic” Value at Risk at p = 0.80. VaR80
Ac-G =
iii) Gaussian “Practitioner” Value at Risk at p = 0.95. VaR95
Pr-G =
iv) Gaussian “Practitioner” Value at Risk at p = 0.80. VaR80
Pr-G =
" 157
" 159
Fig. 7.1: Two distributions having the same Value at Risk VX95% = 2.145.
The Tail Value at Risk (or Conditional Value at Risk) aims at providing a
solution to the tail distribution problem observed with Value at Risk at the
level p ∈ (0, 1) by averaging over confidence levels ranging from p to 1.
Definition 7.1. The Tail Value at Risk (TVaR) of a random variable X at
the level p ∈ (0, 1) is defined by the average
1 w1 q
TVpX := V dq. (7.1)
1−p p X
Note that since the function p 7−→ VXp is non-decreasing, we always have
1 w1 q 1 w1 p
TVpX = VX dq ⩾ V dq = VXp .
1−p p 1−p p X
Recall that by Lemma 12.15, given an event A such that P(A) > 0, the
conditional expectation of X : Ω −→ N given the event A satisfies
1
E[X | A] = E [ X 1A ] ,
P(A)
The Conditional Tail Expectation CTEpX at the level p ∈ (0, 1) can be written
as the distorted risk measure
160 "
CTEpX := E[XfX (X )]
The use of the strict inequality “>” in the definition of the Conditional Tail
Expectation allows us to avoid any dependence on P(X = VXp ), and to
consider risky values strictly beyond VXp . The Conditional Tail Expectation
is also called Conditional Value at Risk (CVaR).
Examples of Conditional Tail Expectations can be computed as in the fol-
lowing code.
library(quantmod)
getSymbols("^HSI",from="2013-06-01",to="2014-10-01",src="yahoo")
returns <- as.vector(diff(log(Ad(`HSI`))))
library(PerformanceAnalytics)
var=VaR(returns, p=.95, method="historical")
cte=mean(returns[returns<as.numeric(var)],na.rm=TRUE)
The next proposition shows by which amount the Conditional Tail Expecta-
tion exceeds the Value at Risk.
Proposition 7.3. For any p ∈ (0, 1] we have CTEpX > E[X ] and CTEpX >
VXp with, more precisely,
+
CTEpX = E X | X > VXp = VXp + E X − VXp | X > VXp .
Proof. We have
1
E X | X > VXp = E X 1{X>V p }
P X > VXp X
1
p E X − VX 1{X>V p } + VX E 1{X>V p }
p p
=
P X > VX X X
1 p +
E X − VX + VXp P X > VXp
=
P X > VXp
1 +
= VXp + E X − VXp
P X > VXp
+
= VXp + E X − VXp X > VXp .
coincides with the Tail Value at Risk. Note that in this case we have
" 161
CTEpX = TVpX ,
i.e.
1 w1 q
CTEpX = E X | X > VXp = E X | X ⩾ VXp = V dq = TVpX .
1−p p X
(7.2)
Proof. By Lemma 6.15 we construct X as X = VXU where U is uniformly
distributed on [0, 1], with
and
X > VXp =⇒ VXU > VXp =⇒ U > p.
Since P X = VXp = 0 we find that, with probability 1,
hence
= E VX | U ⩾ p
U
1
E VXU 1{U ⩾p}
=
P(U ⩾ p)
1 w1 q
= V dq.
1−p p X
□
Figure 7.2 shows the locations of Value at Risk and Conditional Tail Ex-
pectation on a given data set. Note that here, the computation is done on
sign-changed data according to Proposition 6.12, i.e. the results are computed
according to the “practitioner” point of view.
162 "
σX σX p 2
CTEpX = µX + ϕ(VZp ) = µX + √ e−(VZ ) /2 , (7.3)
1−p (1 − p) 2π
where VZp = Φ−1 (p) is the Value at Risk of Z ≃ N (0, 1) at the level p ∈ (0, 1)
and
1 2
ϕ(z ) = √ e−z /2 , z ∈ R,
2π
is the standard normal probability density function.
Proof. Using the relation P X ⩾ VXp = P X > VXp = 1 − p, cf. Proposi-
CTEpX = TVpX
= E X | X > VXp
1
E X 1{X>V p }
=
P X > VXp X
1 w ∞ −(x−µX )2 /(2σ2 ) dx
= xe X q
1 − p VXp 2πσ 2 X
µ w ∞ −(x−µX )2 /(2σ2 ) dx 1 w∞ −(x−µX )2 /(2σX
2 ) dx
= X e X q + p (x − µX )e
1 − p VXp 1
q
2πσ 2 − p VX
2πσ 2
X X
2
σX i∞
µ h 2 2
= X P(X ⩾ VXp ) + −e−(x−µX ) /(2σX ) p
1−p
q
VX
(1 − p) 2πσX
2
2
σX p 2
= µX + q e−((VX −µX )/σX ) /2
(1 − p) 2πσX
2
" 163
σX p 2
= µX + √ e−(VZ ) /2
(1 − p) 2π
σ
= µX + X ϕ(VZp ),
1−p
There are several variants for the definition of the Expected Shortfall ESpX .
Next is a frequently used definition.
Definition 7.6. The Expected Shortfall ESpX of a random variable X at the
level p ∈ (0, 1) is defined by
1
ESpX := VXp + E X − VXp 1{X ⩾V p } . (7.4)
1−p X
ESpX =
1 Vp
E X 1{X ⩾V p } + X 1 − p − P X ⩾ VXp if P X = VXp > 0.
1−p X 1−p
P X ⩾ VXp
ESpX = VXp + E X − VXp X ⩾ VXp
1−p
1
= VXp + E X 1{X ⩾V p } − VXp E 1{X ⩾V p }
1−p X X
1
= VXp + E X 1{X ⩾V p } − VXp P X ⩾ VXp
1−p X
1 Vp
E X 1{X ⩾V p } + X 1 − p − P X ⩾ VXp .
=
1−p X 1−p
□
cides with the Conditional Tail Expectation CTEpX and with the Tail Value
164 "
1
E X 1{X>V p }
=
1−p X
1
E X 1{X>V p }
=
P X > VXp X
= E X | X > VXp
= TVpX ,
by Proposition 7.4. □
When P X = VXp = 0, we also have
1 Vp
ESpX = E X 1{X ⩾V p } + VXp − X P X ⩾ VXp
1−p X 1−p
1 Vp
E X 1{X>V p } + X 1 − p − P X > VXp .
=
1−p X 1−p
In particular, by Propositions 7.5 and 7.8, the Gaussian Expected Shortfall
of X ≃ N (µ, σ 2 ) at the level p ∈ (0, 1) is also given by
σ σ
√ e−(Φ (p)) /2 .
−1 2
ESpX = µ + ϕ(Φ−1 (p)) = µ +
1−p (1 − p) 2π
Proposition 7.9. The Expected Shortfall ESpX at the level p ∈ (0, 1) can be
written as the distorted risk measure
w1
ESpX = E[XfX (X )] = VXq fX (VXq )dq, (7.5)
0
1 1 − p − P X > VXp 1
fX ( x ) : = 1{x>VXp } + 1{P(X =VXp )>0} 1 p ⩽ ,
1−p (1 − p)P X = VXp {x=VX } 1 − p
x ∈ R.
" 165
1 Vp
ESpX = E X 1{X ⩾V p } + X 1 − p − P X ⩾ VXp
1−p X 1−p
1 Vp
E X 1{X ⩾V p } + 1{P(X =V p )>0} X 1 − p − P X ⩾ VXp
=
1−p X X 1−p
1 − p − P X ⩾ VXp
" ! #
1
= E 1{X ⩾VX } + 1{P(X =VX )>0}
p p 1{X =VX } X
p
1−p P X = VXp
1 h
= E 1{X ⩾V p } − 1{P(X =V p )>0} 1{X =V p }
1−p X X X
p
! #
1 − p − P X > VX
+1{P(X =V p )>0} 1 {X =VX } X
p
P X = VXp
X
1 − p − P X > VXp
" ! #
1
= E 1{X>VXp } + 1{P(X =VXp )>0} 1{X =VXp } X .
1−p P X = VXp
1 − p − P X > VXp
" #
1
E[fX (X )] = E 1{X>V } + 1{P(X =V )>0}
p p 1{X =VX }p
1−p P X = VXp
X X
1
E 1{X>V p } + 1 − p − P X > VXp
=
1−p X
1
P X > VXp + 1 − p − P X > VXp
=
1−p
= 1, x ∈ R. (7.6)
The following proposition, see Acerbi and Tasche (2001), shows that in gen-
eral, the Expected Shortfall at the level p ∈ (0, 1) coincides with the Tail
Value at Risk TVpX .
Proposition 7.10. The Expected Shortfall ESpX coincides with the Tail Value
at Risk TVpX for any p ∈ (0, 1), i.e. we have
1 w1 q
ESpX = TVpX = V dq.
1−p p X
Proof. Constructing X as X = VXU where U is uniformly distributed on [0, 1]
as in Lemma 6.15, by Proposition 6.10 we have
and
166 "
=⇒ X = VXp .
we have
hence
1 Vp
ESpX = E X 1{X ⩾V p } + X 1 − p − P X ⩾ VXp
1−p X 1−p
1 1
E X 1{X ⩾V p } − E X 1{X ⩾V p }∩{U <p}
=
1−p X 1−p X
1 1
E VXU 1{V U ⩾V p } − E VXU 1{V U ⩾V p } 1{U <p}
=
1−p X X 1−p X X
1
E VXU 1{V U ⩾V p } 1{U ⩾p}
=
1−p X X
1
E VXU 1{U ⩾p}
=
1−p
1 w1 q
= V dq,
1−p p X
Theorem 7.11. Expected Shortfall ESpX and Tail Value at Risk TVpX are
coherent risk measures.
Proof. As ESpX coincides with TVpX for all p ∈ (0, 1) from Proposition 7.10,
we can use either Relation (7.4) in Definition 7.6 or Relation (7.1) in Defini-
tion 7.1.
(i) Monotonicity. If X ⩽ Y , since Value at Risk is monotone we have
" 167
ESpX = TVpX
1 w1 q
= V dq
1−p p X
1 w1 q
⩽ V dq
1−p p Y
p
= TVY
⩽ ESpY
ESpµ+λX = TVpµ+λX
1 w1 q
= V dq
1 − p p µ+λX
1 w1
µ + λVXq dq
=
1−p p
1 w1 q
= µ+λ V dq
1−p p X
p
= µ + λTVY
⩽ µ + λESpY
168 "
1 − p − P X > VXp
−1{P(X =V p )>0} 1{x=VXp }
P X = VXp
X
= 1{x+y>V p } − 1{x>V p }
X +Y X
□
Note that in general, the Conditional Tail Expectation is not a coherent risk
measure when P X = VXp > 0.
library(PerformanceAnalytics)
ES(returns, p=.95, method="historical")
ES(returns, p=.95, method="historical",invert="FALSE")
" 169
The attached code computes the Expected Shortfall and compares its
output to the that of the PerformanceAnalytics package, as illustrated in the
next Figure 7.3.
> source("comparison.R")
Number of samples= 265
VaR 95 = -0.03420879 , Threshold= 0.9433962
CTE 95 = -0.04646176
ES 95 = -0.04623058
Historical VaR 95 0= -0.03316604
Gaussian VaR 95 = -0.03209374
Historical ES 95 = -0.04552403
Gaussian ES 95 = -0.04043227
170 "
chart.VaRSensitivity(ts(returns),methods=c("HistoricalVaR","HistoricalES"),
colorset=bluefocus, lwd=2)
−0.08
−0.10
Historical VaR
Historical ES
−0.12
0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99
Confidence Level
dev.new(width=16,height=8)
chart.VaRSensitivity(ts(returns),methods=c("HistoricalVaR","GaussianVaR"),
colorset=bluefocus, lwd=4)
The next Figure 7.5 uses the above code to compare the historical and
Gaussian values at risk.
" 171
−0.010
−0.015
Value at Risk
−0.020
−0.025
−0.030
Historical VaR
Gaussian VaR
0.89 0.9 0.905 0.915 0.925 0.935 0.945 0.955 0.965 0.975 0.985
Confidence Level
dev.new(width=16,height=8)
chart.VaRSensitivity(ts(returns),methods=c("HistoricalES","GaussianES"),
colorset=bluefocus, lwd=4)
In the next Figure 7.6 we compare the Gaussian and historical estimates of
Expected Shortfall.
Historical ES
Gaussian ES
0.89 0.9 0.905 0.915 0.925 0.935 0.945 0.955 0.965 0.975 0.985
Confidence Level
172 "
VX ✓ ✓ ✗ ✗
CTEX ✓ ✓ ✗ ✗
TVX ✓ ✓ ✓ ✓
ESX ✓ ✓ ✓ ✓
Note that Value at Risk VXp is coherent on Gaussian random variables ac-
cording to Remark 6.14. Similarly, the Conditional Tail Expectation CTEpX
is coherent on random variables having a continuous CDF by Proposition 7.4
and Theorem 7.11.
Exercises
" 173
1.0
p=0.95
1
0.9
0.9
Probability density
0.8
0.8
0.7
0.7
0.6
0.6
0.5
0.5
0.4
0.4
0.95
0.3
0.3
qX
0.2
0.2
0.1
0.1
0
0.0
0 1 2 4 5 6 0 1 2 3 4 5 6
0.95
qX
Find the Value at Risk VaRpX and the Conditional Tail Expectation CTEpX =
E X | X > VaRpX and mark their values on the graph in the following cases.
a) p = 0.9.
174 "
b) p = 0.8.
Exercise 7.4
Let p = 0.9. For the above data set represented by the random variable X,
compute the numerical values of the following quantities.
a) VaR
X,
90
b) E X 1{X>V 90 } ,
X
c) P X > VX ,
90
Exercise 7.5 Consider a random variable X ∈ {10, 100, 150} with the distri-
bution
Compute
a) the Value at Risk VX98% ,
b) the Tail Value at Risk TV98%
X ,
c) the Conditional Tail Expectation E X | X > VX98% , and
" 175
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
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
176 "
for all p in the interval [0.99, 1], and give the value of TV99%
X .
b) Taking p = 0.98, compute the Conditional Tail Expectation
1 h i
CTE98% = E X | X > VX98% = p E X 1{X>VX } .
p
X
P X > VX
Exercise 7.8 We assume that the payoff X of a portfolio follows the standard
logistic distribution with cumulative distribution function (CDF)
1
FX ( x ) = P ( X ⩽ x ) = , x ∈ R,
1 + e−x
and the probability density function (PDF)
′ e−x
fX (x) = FX (x) = , x ∈ R.
(1 + e−x )2
1.0
p=0.95 0.3
0.9
0.8
Probability density
0.7
0.2
0.6
0.5
qX
p
0.4
0.1
0.3
0.2
0.1
0
−6 −5 −4 −3 −2 −1 0 1 2 3 4 5 6
0.0
−6 −5 −4 −3 −2 −1 0 1 2 4 5 6
q0.95
X
p
a) Compute the quantile qX = VaRpX of X at any level p ∈ [0, 1], defined by
the relation
p
FX ( q X ) = P(X ⩽ VaRpX ) = p.
b) Compute the conditional tail expectation
1 w∞
E[X | X > VaRpX ] = p xfX (x)dx.
P(X > VaRX ) VaRpX
Hint. We have
w∞ xe−x aea
dx = log(1 + ea ) − , a ∈ R.
a (1 + e−x )2 1 + ea
" 177
w1
Hint. We have log qdq = p − 1 − p log p, p ∈ (0, 1).
p
178 "
Ω = B ∪ G,
B G
P(B ) + P(G) = 1,
X : Ω −→ R
ω 7−→ X (ω ).
R −→ [0, 1]
x 7−→ P(B | X = x)
and
R −→ [0, 1]
x 7−→ P(G | X = x)
are respectively called the probability default curve and the probability ac-
ceptance curve.
Denoting by fX (x), resp. fX (x | B ), the probability density functions of X,
resp. X given B, by the Bayes formula we have
P(B )
P ( B | X = x ) = fX ( x | B )
fX ( x )
P ( B ) fX ( x | B )
= , (8.1)
P(G)fX (x | G) + P(B )fX (x | B )
and
P ( G ) fX ( x | G )
P(G | X = x) = .
P ( G ) fX ( x | G ) + P ( B ) fX ( x | B )
Definition 8.2. The True Positive Rate (TPR) is the tail distribution func-
tion w∞
F G (x) : = P(X > x | G) = fX (y | G)dy, x ∈ R.
x
On the other hand, the False Positive Rate (FPR) is the tail distribution
function
w∞
F B (x) : = P(X > x | B ) = fX (y | B )dy, x ∈ R.
x
∗
See (MOE and UCLES 2016, page 14 lines 4-5) and (MOE and UCLES 2020, page 19
lines 4-5).
180 "
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, (8.4)
1 + eα+βx
with
µG − µB
β := >0
σ2
and
µG + µB P(G)
α := −β + log .
2 P(B )
0.8
0.6
0.4
0.2
0
-10 -5 0 5 10
x
P ( G ) fX ( x | G )
P(G | X = x) =
P(G)fX (x | G) + (1 − P(G))fX (x | B )
2 2
P(G)e−(x−µG ) /(2σ )
=
P(G)e−(x−µG ) /(2σ ) + P(B )e−(x−µB ) /(2σ )
2 2 2 2
" 181
1
= , x ∈ R. (8.5)
1 + e−α−βx
0.8
0.6
0.4
0.2
0
-10 -5 0 5 10
x
is given by
D (x) P(B )
A∗ = x ∈ R : λ(x) ⩾ ,
L(x) P(G)
where λ(x) is the likelihood ratio
fX (x | G) P(G | X = x) P(B )
λ(x) : = = , x ∈ R.
fX (x | B ) P(B | X = x) P(G)
182 "
where
= 1A ( x ) D ( x ) P ( B | X = x ) + 1A c ( x ) L ( x ) P ( G | X = x )
is the conditional expected cost given that X = x. The expected cost can
be minimized pointwise by finding the set A that minimizes the conditional
expected cost function
We note that
and that the set A ∗ which achieves equality in the above bound is given by
fX (x | G) P(G | X = x) P(B )
λ(x) : = = , x ∈ R,
fX ( x | B ) P(B | X = x) P(G)
as
D (x) P(B )
A∗ = x ∈ R : λ(x) ⩾ .
L(x) P(G)
" 183
□
For simplicity, in the sequel we assume that D = D (x) and L = L(x) are
constant in x ∈ R, in which case we have
D P(B )
A ∗ = x ∈ R : λ(x) ⩾ .
L P(G)
µG + µB 1 D P(B )
A ∗ = [ x∗ , ∞ ) = + log ,∞ , (8.6)
2 β L P(G)
where
µG + µB 1 D P(B )
x∗ : = + log ,
2 β L P(G)
under the condition
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σ )
2 2 2
= eβx−(µG −µB )/(2σ ) , x ∈ R,
is equivalent to
□
We note that the optimal boundary point x∗ satisfies the relation
P ( X = x∗ | G ) P ( G | X = x∗ ) P ( G ) D P(B )
λ ( x∗ ) = = = ,
P(X = x | B )
∗ P ( B | X = x∗ ) P ( B ) L P(G)
i.e.
P ( G | X = x∗ ) D
= . (8.7)
P ( B | X = x∗ ) L
Figure 8.3 illustrates the optimal decision rule by taking L = D = $1 and
using the default and acceptance curves (8.4)-(8.5).
1
D(x)P(B|X=x)
L(x)P(G|X=x)
0.8
0.6
0.4
0.2
0
-5 0 x* 5 10 15
Ac A*
for a given set A , and its uniform minimum is obtained for A ∗ of the form
A ∗ = [x∗ , ∞) with x∗ at the intersection of the curves x 7→ D (x)P(B | X =
x) and x 7→ L(x)P(G | X = x) as in (8.7).
The acceptance rate, or probability that an applicant is accepted according
to the rule A , is given by
where
P({X ∈ A } ∩ B ) = P(X ∈ A | B )P(B )
∗
The animation works in Acrobat Reader on the entire pdf file.
" 185
install.packages("caret")
library(caret); data(GermanCredit); head(GermanCredit)
Linear regression
0.8
0.6
0.4
0.2
0
-10 -5 0 5 10
x
i=1
1−ci ci
n
Y m
X m
X
= log FL βj xi,j F L βj xi,j
i=1 j =1 j =1
Pm 1−ci !ci
n β x
Y e j =1 j i,j 1
= log P m P m
β x β x
i=1 1 + e j =1 j i,j 1 + e j =1 j i,j
Pm
n β x n
X e j =1 j i,j X 1
= (1 − ci ) log Pm + ci log Pm
β x β x
i=1 1 + e j = 1 j i,j
i=1 1 + e j =1 j i,j
over β = (βj )j =1,2,...,m . The default probabilities are then given from
Xm
1 − pi = 1 − FL βj xi,j , i = 1, . . . , n,
j =1
" 187
m
pi
FL−1 (pi ) = log
X
= βj xi,j , i = 1, . . . , n,
1 − pi
j =1
The data is randomly split into a training set and a testing set using the
createDataPartition command in . The training set is used to fit the data
in a generalized linear model using the glm() command. The testing set is
then used to estimate the corresponding default probabilities.
1.00
0.75
Score5
Class
0.50 Bad
Good
0.25
0.00
Fig. 8.5: Logistic regression output on 5 criteria.
Based on the above 100 samples, the next code identifies the True
Positive Rate (TPR) = 34/77 = 44.16%, and the False Positive Rate
(FPR) = 8/23 = 34.78%, at the threshold p = 0.75.
188 "
1.00
0.75
Score61
Class
0.50 Bad
Good
0.25
0.00
Fig. 8.6: Logistic regression output on 61 criteria.
In comparison with Figure 8.5, the 100 samples in Figure 8.6 above yield
a higher True Positive Rate (TPR) = 48/77 = 62.34% and a lower False
" 189
Positive Rate (FPR) = 5/23 = 21.74% at the level p = 0.75. In other words,
the count of true positive samples has increased from 34 to 48, and the count
of false positive samples has decreased from 6 to 5.
cat('TPR61=',length(testsamp$Score61[testsamp$Score61>0.75 &
testsamp$Class=="Good"])/length(testsamp$Score61[testsamp$Class=="Good"]),'\n')
cat('FPR61=',length(testsamp$Score61[testsamp$Score61>0.75 &
testsamp$Class=="Bad"])/length(testsamp$Score61[testsamp$Class=="Bad"]),'\n')
pred <- ifelse(testsamp$Score61 > 0.75, "Good", "Bad")
confusionMatrix(factor(noquote(pred)),factor(testsamp$Class))
[0, 1] −→ [0, 1]
p 7−→ ROC(p) := F G F −1
B (p) ,
where F −1
B denotes the inverse of the tail distribution function F B .
In other words, the ROC curve is a plot of the True Positive Rate values
x 7−→ F G (x)
x 7−→ F B (x).
fX ( x | G )
λ(x) = , x ∈ R.
fX (x | B )
Proof. The slope of the ROC curve at the point p ∈ [0, 1] is given by
d d −1
F G F −1 ′ −1
dp B (p) = F G F B (p) dp F B (p)
F ′ F −1 (p)
= ′G B −1
F B F B (p)
F ′G (x)
=
F ′B (x)
190 "
= λ(x)
with x := F −1
B (p), hence we have
wp
F −1 λ F −1 0 ⩽ p ⩽ 1.
FG B (p) = 0 B (q ) dq,
□
When X is Gaussian distributed given {G, B} with the conditional densi-
ties
1 2 2
fX (x | G) = √ e−(x−µG ) /(2σ )
2πσ
and
1 2 2
fX ( x | B ) = √ e−(x−µB ) /(2σ ) ,
2πσ
the likelihood ration is given by
fX ( x | G ) 2 2 2
λ(x) = = eβx−(µG −µB )/(2σ ) , x ∈ R,
fX (x | B )
with β := (µG − µB )/σ 2 . Figure 8.7 presents three samples of ROC curves in
the Gaussian example with successively (µB , µG ) = (1, 4), (µB , µG ) = (1, 2),
and (µB , µG ) = (1, 1).
1
0.9
True Positive Rate (TPR)
0.8
0.7
0.6
0.5
0.4
0.3
0.2 µB=1,µG=4
µB=1,µG=2
0.1
µB=1,µG=1
0
0 0.2 0.4 0.6 0.8 1
False Positive Rate (FPR)
We check that the classification is better when µB << µG . The ROC Curve
shows the performance of the classification procedure, which is quantified
by the Area Under The Curve (AUC). A perfect classification would corre-
spond to a single point with coordinates (0, 1) and AUC equal to 1, which
corresponds to FPR=0% false negatives and TPR=100% true positives. The
closer the AUC is to 1, the better the classification is performing.
" 191
TPR5<-length(testing$Score5[testing$Score5>0.75 &
testing$Class=="Good"])/length(testing$Score5[testing$Class=="Good"])
FPR5<-length(testing$Score5[testing$Score5>0.75 &
testing$Class=="Bad"])/length(testing$Score5[testing$Class=="Bad"])
cat('TPR5=',TPR5,'\n')
cat('FPR5=',FPR5,'\n')
TPR61<-length(testing$Score61[testing$Score61>0.75 &
testing$Class=="Good"])/length(testing$Score61[testing$Class=="Good"])
FPR61<-length(testing$Score61[testing$Score61>0.75 &
testing$Class=="Bad"])/length(testing$Score61[testing$Class=="Bad"])
cat('TPR61=',TPR61,'\n')
cat('FPR61=',FPR61,'\n')
The above True Positive Rates (TPR) and False Positive Rates (FPR) based
on 5 and 61 criteria at the level p = 0.75 are recomputed in the above code
on the whole 400 samples, and plotted on the next ROC graphs of Figure 8.8.
install.packages("ROCR")
library(ROCR)
pred5<-prediction(as.numeric(testing$Score5),as.numeric(testing$Class))
perf5 <- performance(pred5,"tpr","fpr")
dev.new(width=16,height=7);par(mar = c(4.5,4.5,2,2))
plot(perf5,col="purple",lwd=3, xaxs = "i", yaxs = "i",cex.lab=2,las=1)
segments(FPR5,0,FPR5,TPR5, col="purple", lwd =2)
segments(0,TPR5,FPR5,TPR5, col="purple", lwd =2)
pred61<-prediction(as.numeric(testing$Score61),as.numeric(testing$Class))
perf61 <- performance(pred61,"tpr","fpr")
par(new=TRUE)
plot(perf61,col="blue",lwd=3,main="", ann=FALSE, xaxs="i", yaxs="i")
legend("bottomright", legend=c("61 criteria","5 criteria"),col=c("blue","purple"), lwd=3,
cex=3)
segments(FPR61,0,FPR61,TPR61, col="blue", lwd =2)
segments(0,TPR61,FPR61,TPR61, col="blue", lwd =2)
The ROC graphs in the next Figure 8.8 confirm the improvement in classifi-
cation reached when switching from 5 to 61 criteria.
192 "
1.0
0.8
True positive rate
0.6
0.4
61 criteria
0.2
5 criteria
0.0
" 193
Download the corresponding IPython notebook that can be run here us-
ing this data file.
Download the corresponding IPython notebook that can be run here us-
ing this data file.
Using XGBoost in
Exercises
and
fX (x | B ) = λB e−λB x 1[0,∞) (x),
where λB > λG > 0.
a) Compute the conditional expected values E[X | G] and E[X | B ].
b) Compute the probability default curve
194 "
P ( B ) fX ( x | B )
x 7−→ P(B | X = x) =
P(G)fX (x | G) + P(B )fX (x | B )
A := x ∈ R : DP(B | X = x) ⩽ LP(G | X = x) ,
where
• L represents the loss incurred by the rejection of an applicant, and
P(B )fX (x | B )
x 7−→ P(B | X = x) = .
P(G)fX (x | G) + P(B )fX (x | B )
A := x ∈ R+ : DP(B | X = x) ⩽ LP(G | X = x) ,
where
• L represents the missed earnings incurred by the rejection of applicant,
and
1 2 2
fX ( x | B ) = √ e−(x−µB ) /(2σ ) ,
2πσ
with µB < µG .
a) Compute the probability default curve
P ( B ) fX ( x | B )
x 7−→ P(B | X = x) := .
P(G)fX (x | G) + P(B )fX (x | B )
A : = x ∈ R+ : D (x )P (B | X = x ) ⩽ L (x )P (G | X = x ) .
196 "
under the historical (or physical) measure P. Recall that, using the standard
Brownian motion
bt = µ − r t + Bt ,
B t ⩾ 0,
σ
under the risk-neutral probability measure P∗ , the process (St )t∈R+ is mod-
eled as
bt .
dSt = rSt dt + σSt dB
The company’s debt is represented by an amount K > 0 in bonds to be paid
at maturity T , cf. § 4.1 of Grasselli and Hurd (2010).
" 199
Default occurs if ST < K with probability P(ST < K ), the bond holder
will receive the recovery value ST . Otherwise, if ST ⩾ K the bond holder
receives K and the equity holder is entitled to receive ST − K, which can be
represented as (ST − K )+ in general.
Proposition 9.1. The default probability P(ST < K | Ft ) can be computed
from the lognormal distribution of ST as
(µ − σ 2 /2)(T − t) + log(St /K )
dµ− := √ .
σ T −t
Proof. The default probability P(ST < K | Ft ) can be computed from the
lognormal distribution of ST as
2 /2)T
P(ST < K | Ft ) = P(S0 eσBT +(µ−σ < K | Ft )
= P(BT < (−(µ − σ 2 /2)T + log(K/S0 ))/σ | Ft )
= P(BT − Bt + y < (−(µ − σ 2 /2)T + log(K/S0 ))/σ )y =Bt
1 w (−(µ−σ2 /2)(T −t)+log(K/St ))/σ 2
= p e−x /(2(T −t)) dx
2(T − t)π −∞
√
1 w (−(µ−σ2 /2)(T −t)+log(K/St ))/(σ T −t) −x2 /2
= √ e dx
2π −∞
(µ − σ 2 /2))(T − t) + log(St /K ))
= 1−Φ √
σ T −t
µ
= 1 − Φ ( d− )
= Φ(−dµ− ).
□
Note that under the risk-neutral probability measure P∗ we have, replacing
µ with r,
P∗ (ST < K | Ft ) = Φ(−dr− ),
with
(r − σ 2 /2)(T − t) + log(St /K )
dr− = √ ,
σ T −t
which implies the relation
µ − r√
dr− = dµ− − T − t,
σ
or, denoting by Φ−1 the inverse function of Φ,
200 "
µ − r√
Φ−1 (P(ST < K | Ft )) = − T − t + Φ−1 (P∗ (ST < K | Ft )).
σ
If the level of the firm’s assets falls below the level K at time T , default may
have occurred at a random time τ such that
In this case, the result of Proposition 9.1 can be reinterpreted in the next
corollary.
Corollary 9.2. The conditional distribution of the default time τ is given by
(µ − σ 2 /2)(T − t) + log(St /K ))
P(τ < T | Ft ) = P(ST < K | Ft ) = Φ − √ ,
σ T −t
(9.1)
0 ⩽ t ⩽ T.
We also have
and
" 201
0.8
0.6
P*(τ < T)
µ > r
0.4
µ < r
0.2
0
0 0.2 0.4 0.6 0.8 1
P(τ < T)
√
Fig. 9.1: Graph of the function x 7−→ Φ Φ−1 (x) − (µ − r ) T /σ for µ > r, µ = r,
and µ < r.
(r + σ 2 /2)(T − t) + log(St /K )
e−(T −t)r E∗ [(ST − K )+ | Ft ] = St Φ √
σ T −t
(r − σ 2 /2)(T − t) + log(St /K )
−(T −t)r
−Ke Φ √ , 0 ⩽ t ⩽ T.
σ T −t
Proof. Using the Black-Scholes put option pricing formula and the identity
min(x, K ) = K − (K − x)+ , x ∈ R,
we have
202 "
□
Writing
of the level K by
2 /2)t
(St )t∈R+ = S0 eσBt +(µ−σ ,
t∈R+
" 203
1−2µ/σ2
log(K/S0 ) + (µ − σ 2 /2)T
S0
P τK ⩽ T = P(ST ⩽ K ) + Φ ,
√
K σ T
with S0 ⩾ K.
Proof. By e.g. Corollary 7.2.2 and pages 297-299 of Shreve (2004), or from
Relation (10.13) in Privault (2022), we have
P τK ⩽ T = P min St ⩽ K
t∈[0,T ]
2 K
= P min eσBt +(µ−σ /2)t ⩽
t∈[0,T ] S0
(µ − σ 2 /2)t 1
K
= P min Bt + ⩽ log
t∈[0,T ] σ σ S0
log(K/S0 ) − (µ − σ 2 /2)T
=Φ √
σ T
1−2µ/σ2
log(K/S0 ) + (µ − σ 2 /2)T
S0
+ Φ √ (9.3)
K σ T
1−2µ/σ2
log(K/S0 ) + (µ − σ 2 /2)T
S0
= P(ST ⩽ K ) + Φ √ ,
K σ T
with S0 ⩾ K. □
The cash flow
E ∗
(ST − K ) 1n
+ o F t = 1 g (t, St ),
min St > K min St > B
0⩽t⩽T t∈[0,T ]
t ∈ [0, T ], where
2r/σ2
K
g (t, St ) = BSc (St , K, r, T − t, σ ) − St BSc (K/St , 1, r, T − t, σ ),
St
204 "
0 ⩽ t ⩽ T.
Proof. By e.g. Relation (11.10) and Exercise 11.1 in Privault (2022), we have
E∗ (ST − K )+ 1n o Ft = 1 g (t, St ),
min St > K min St > B
0⩽t⩽T t∈[0,T ]
t ∈ [0, T ], where
g (t, St )
T −t St T −t St
= St Φ δ+ − e−(T −t)r KΦ δ−
K K
2r/σ2 1−2r/σ2
K T −t K St T −t K
−K Φ δ+ + e−(T −t)r K Φ δ−
St St K St
= BSc (St , K, r, T − t, σ )
−2r/σ2 −2r/σ2
St T −t K St T −t K
−K Φ δ+ + e−(T −t)r St Φ δ−
K St K St
2r/σ2
K
= BSc (St , K, r, T − t, σ ) − St BSc (K/St , 1, r, T − t, σ ),
St
0 ⩽ t ⩽ T. □
For t ⩾ 0, taking now
2
τK := inf u ∈ [t, ∞) : Su := S0 eσBu +(µ−σ /2)u ⩽ K ,
the recovery value received by the bond holder at time min τK , T is K, and
we have
E∗ Ke−(min(τK ,T )−t)r | Ft
wT
= K 1{τK ⩾t} e−(u−t)r dP∗ τK ⩽ u | Ft + Ke−(T −t)r P∗ τK > T | Ft .
t
Proof. We have
E∗ Ke−(min(τK ,T )−t)r | Ft
" 205
0 ⩽ t ⩽ T. □
The above probabilities P∗
τK ⩽ u | Ft and P∗ = 1−
τK > T | Ft
P∗ τK ⩽ T | Ft can be computed from (9.3) as
log(K/St ) − (r − σ 2 /2)(u − t)
P∗ τK ⩽ u | Ft = Φ
√
σ u−t
1−2r/σ2
log(St /K ) + (r − σ 2 /2)(u − t)
St
+ Φ √
K σ u−t
1−2r/σ2
log(St /K ) + (r − σ 2 /2)(u − t)
St
= P(Su ⩽ K | Ft ) + Φ √ ,
K σ u−t
with St ⩾ K and u > t, from which the probability density function of the
hitting time τK can be estimated by differentiation with respect to u > t.
Note also that we have
P∗ τK < ∞ | Ft = lim P∗ τK ⩽ u | Ft
u→∞
−1+2r/σ2
K
if r > σ 2 /2
= St
1 if r ⩽ σ 2 /2.
In order to model correlated default and possible “domino effects”, one can
regard two given default times τ1 and τ2 are correlated random variables.
Namely, given τ1 and τ2 two default times we can consider the correlation
Cov(τ1 , τ2 )
ρ= p ∈ [−1, 1].
Var[τ1 ] Var[τ2 ]
When trying to build a dependence structure for the default times τ1 and τ2 ,
the idea of Li (2000) is to use the normalized Gaussian copula CΣ (x, y ), with
1 ρ
Σ= ,
ρ 1
with correlation parameter ρ ∈ [−1, 1], and to model the joint default prob-
ability P(τ1 ⩽ T and τ2 ⩽ T ) as
206 "
P(A ∩ B ) − P(A)P(B )
ρD = p (9.4)
P(A)(1 − P(A)) P(B )(1 − P(B ))
p
When the default probabilities are specified in the Merton model of credit
risk as
" 207
It is worth noting that the outcomes of this methodology have been discussed
in a number of magazine articles in recent years, to name a few:
“Recipe for disaster: the formula that killed Wall Street”, Wired Magazine,
by F. Salmon (2009);
which requires the actual computation of the joint default probability P(τ1 ⩽
T and τ2 ⩽ T ). An exact expression for this joint default probability in the
first passage time Black-Cox model, and the associated correlation, have been
recently obtained in Li and Krehbiel (2016).
Consider now a sequence (τk )k=1,2,...,n of random default times and, for more
flexibility, a standardized random variable M with probability density func-
tion ϕ(m) and variance Var[M ] = 1.
As in the Merton (1974) model, cf. § 9.1, a common practice, see Vašiček
(1987), Gibson (2004), Hull and White (2004) is to parametrize the default
probability associated to each τk by the conditioning
Φ −1 (P(τ ⩽ T )) − a m
k k
P(τk ⩽ T | M = m) = Φ q , k = 1, 2, . . . , n,
1 − a2k
(9.5)
see (9.2), where ak ∈ (−1, 1), k = 1, 2, . . . , n. Note that we have
w∞
P ( τk ⩽ T ) = P(τk ⩽ T | M = m)ϕ(m)dm
−∞
w∞ Φ−1 (P(τk ⩽ T )) − ak m
= Φ q ϕ(m)dm, (9.6)
−∞
1 − a2k
τk := Fτ−1
k
(Φ(Xk )), k = 1, 2, . . . , n, (9.8)
where Fτ−1
k
denotes the inverse function of Fτk .
In the next proposition we compute the joint distribution of the default times
(τ1 , . . . , τn ) according to the above dependence structure.
Proposition 9.8. The default times (τk )k=1,2,...,n have the joint distribution
where
C ( x1 , . . . , xn )
w∞
!
Φ −1 (x ) − a m
1 1 Φ−1 (xn ) − an m
:= Φ ···Φ ϕ(m)dm,
1 − a2n
q p
−∞
1 − a21
1 a1 a2 · · · a1 an−1 a1 an
. .
a2 a1 1 . . . .. ..
Σ = ... .. . . .. ..
. (9.9)
. . . .
. .. . .
.
. . . 1 a a
n−1 n
an a1 an a2 · · · an an−1 1
Proof. We start by recovering the conditional distribution (9.5), as follows:
= P Φ(Xk ) ⩽ Fτk (T ) | M = m
" 209
q
=P 1 − a2k Zk ⩽ Φ−1 (Fτk (T )) − ak m
1 −1
= P Zk ⩽ q Φ (Fτk (T )) − ak m
1 − a2k
Φ −1 (P(τ ⩽ T )) − a m
k k
= Φ q , k = 1, 2, . . . , n.
1 − a2k
Note that the above recovers the correct marginal distributions (9.6), i.e. we
have
P(τ1 ⩽ y1 , . . . , τn ⩽ yn | M = m)
= P(τ1 ⩽ y1 | M = m) × · · · × P(τn ⩽ yn | M = m),
C ( x1 , . . . , xn )
w∞
!
Φ −1 (x ) − a m
1 1 Φ−1 (xn ) − an m
:= Φ ···Φ ϕ(m)dm,
1 − a2n
q p
−∞
1 − a21
210 "
Exercises
Exercise 9.2 Credit Default Contract. The assets of a company are modeled
using a geometric Brownian motion (St )t∈R+ with drift r > 0 under the risk-
neutral probability measure P∗ . A Credit Default Contract pays $1 as soon
as the asset St hits a level K > 0. Price this contract at time t > 0 assuming
that St > K.
Exercise 9.3
a) Check that the vector (X1 , X2 , . . . , Xn ) defined in (9.7) has the covariance
matrix given by (9.9).
b) Show that the vector (X1 , X2 , . . . , Xn ), with covariance matrix (9.9) has
standard Gaussian marginals.
c) By computing explicitly the probability density function of (X1 , . . . , Xn ),
recover the fact that it is a jointly Gaussian random vector with covariance
matrix (9.9).
Exercise 9.4 Compute the inverse Σ−1 of the covariance matrix (9.9) in case
n = 2.
" 211
Given t > 0, let P(τ > t) denote the probability that a random system
with lifetime τ survives at least t years. Assuming that survival probabilities
P(τ > t) are strictly positive for all t > 0, we can compute the conditional
probability for that system to survive up to time T , given that it was still
functioning at time t ∈ [0, T ], as
with
P(t < τ ⩽ T )
= , 0 ⩽ t ⩽ T. (10.1)
P(τ > t)
Such survival probabilities are typically found in life (or mortality) tables:
P(τ ⩽ t + dt | τ > t)
λ(t) : = ,
dt
satisfies w
t
P(τ > t) = exp − λ(u)du , t ⩾ 0. (10.2)
0
P(τ ⩽ t + dt | τ > t)
λ(t) : =
dt
1 P(t < τ ⩽ t + dt)
=
P(τ > t) dt
1 P(τ > t) − P(τ > t + dt)
=
P(τ > t) dt
d
= − log P(τ > t)
dt
214 "
1 d
= − P(τ > t), t > 0,
P(τ > t) dt
with
P(τ > t + h | τ > t) = e−λ(t)h ≃ 1 − λ(t)h, [h ↘ 0],
and
P(τ ⩽ t + h | τ > t) = 1 − e−λ(t)h ≃ λ(t)h, [h ↘ 0],
as h tends to 0. When the failure rate λ(t) = λ > 0 is a constant function of
time, Relation (10.2) shows that
i.e. τ has the exponential distribution with parameter λ. Note that given
(τn )n⩾1 a sequence of i.i.d. exponentially distributed random variables, let-
ting
Tn = τ1 + τ2 + · · · + τn , n ⩾ 1,
defines the sequence of jump times of a standard Poisson process with inten-
sity λ > 0.
When the random time τ is a stopping time with respect to (Ft )t∈R+ we have
{τ > t} ∈ Ft , t ⩾ 0,
" 215
w
t
P(τ > t | Ft ) = exp − λu du , t ⩾ 0, (10.3)
0
where the failure rate function (λt )t∈R+ is modeled as a random process
adapted to a filtration (Ft )t∈R+ .
The process (λt )t∈R+ can also be chosen among the classical mean-reverting
diffusion processes, including jump-diffusion processes. In Lando (1998), the
process (λt )t∈R+ is constructed as λt := h(Xt ), t ∈ R+ , where h is a nonneg-
ative function and (Xt )t∈R+ is a stochastic process generating the filtration
(Ft )t∈R+ .
The default time τ is then defined as
wt
τ := inf t ∈ R+ : h(Xu )du ⩾ L ,
0
with Ft ⊂ Gt , t ⩾ 0.
In other words, Gt contains insider information on whether default at time τ
has occurred or not before time t, and τ is a (Gt )t∈R+ -stopping time. Note
that this information on τ may not be available to a generic user who has
only access to the smaller filtration (Ft )t∈R+ . The next key Lemma 10.3, see
Lando (1998), Guo et al. (2007), allows us to price a contingent claim given
the information in the larger filtration (Gt )t∈R+ , by only
using information
rT
in (Ft )t∈R+ and factoring in the default rate factor exp − t λu du .
Lemma 10.3. (Guo et al. (2007), Theorem 1) For any FT -measurable in-
tegrable random variable F , we have
216 "
w
T
= 1{τ >t} E F exp − λu du Ft .
t
= E F 1{τ >T } Gt , 0 ⩽ t ⩽ T.
In the last step of the above argument we used the key relation
h i 1{τ >t}
1{τ >t} E F 1{τ >T } Gt = E F 1{τ >T } | Ft ,
P(τ > t | Ft )
cf. Relation (75.2) in § XX-75 page 186 of Dellacherie et al. (1992), The-
orem VI-3-14 page 371 of Protter (2004), and Lemma 3.1 of Elliott et al.
(2000), under the conditional probability measure P|Ft , 0 ⩽ t ⩽ T . Indeed,
according to (10.4), for any B ∈ Gt we have, for some event A ∈ Ft ,
E[1{τ >t} | Ft ]
" #
= E 1A 1{τ >t} F 1{τ >T }
P(τ > t | Ft )
E[1A 1{τ >t} | Ft ]
" #
=E F 1{τ >T }
P(τ > t | Ft )
E[1A 1{τ >t} | Ft ]
" #
=E E F 1{τ >T } | Ft
P(τ > t | Ft )
" 217
1A 1{τ >t}
=E E F 1{τ >T } | Ft
P(τ > t | Ft )
E[1A 1{τ >t} | Ft ]
" #
=E E F 1{τ >T } | Ft
P(τ > t | Ft )
1A 1{τ >t}
=E E F 1{τ >T } | Ft
P(τ > t | Ft )
1B 1{τ >t}
=E E F 1{τ >T } | Ft ,
P(τ > t | Ft )
□
Taking F = 1 in Lemma 10.3 allows one to write the survival probability up
to time T , given the information known up to time t, as
which shows that {τ > t} ∈ Gt for all t > 0, and recovers the fact that τ is a
(Gt )t∈R+ -stopping time, while in general, τ is not (Ft )t∈R+ -stopping time.
The computation of P(τ > T | Gt ) according to (10.5) is then similar to that
of a bond price, by considering the failure rate λ(t) as a “virtual” short-term
interest rate. In particular the failure rate λ(t, T ) can be modeled in the HJM
framework, cf. e.g. Chapter 18.3 of Privault (2022), and
w
T
P(τ > T | Gt ) = E exp − λ(t, u)du Ft
t
218 "
the issue of computing the dynamics of the underlying asset price by decom-
posing it using a Ft -martingale vs a Gt -martingale instead of using different
forward measures as in e.g. § 19.1 of Privault (2022). This can be obtained
by the technique of enlargement of filtration, cf. Jeulin (1980), Jacod (1985),
Yor (1985), Elliott and Jeanblanc (1999).
Proposition 10.4. The default bond with maturity T and default time τ can
be priced at time t ∈ [0, T ] as
w
T
Pd (t, T ) = 1{τ >t} E∗ exp − (ru + λu )du Ft
t
w
T
+E ξ 1{τ ⩽T } exp −
∗
ru du Gt , 0 ⩽ t ⩽ T .
t
r
T
Proof. We take F = exp − t ru du in Lemma 10.3, which shows that
w w
T T
E∗ 1{τ >T } exp − ru du Gt = 1{τ >t} E∗ exp − (ru + λu )du Ft ,
t t
cf. e.g. Lando (1998), Duffie and Singleton (2003), Guo et al. (2007). □
In the case of complete default (zero-recovery), we have ξ = 0 and
w
T
Pd (t, T ) = 1{τ >t} E∗ exp − (rs + λs )ds Ft , 0 ⩽ t ⩽ T . (10.6)
t
From the above expression (10.6) we note that the effect of the presence of
a default time τ is to decrease the bond price, which can be viewed as an
increase of the short rate by the amount λu . In a simple setting where the
" 219
interest rate r > 0 and failure rate λ > 0 are constant, the default bond price
becomes
Pd (t, T ) = 1{τ >t} e−(r +λ)(T −t) , 0 ⩽ t ⩽ T.
In this case, the failure rate λ can be estimated at time t ∈ [0, T ] from a
default bond price Pd (t, T ) and a non-default bond price P (t, T ) = e−(T −t)r
as
1 P (t, T )
λ= log .
T −t Pd (t, T )
Finally, from e.g. Proposition 19.1 in Privault (2022) the bond price (10.6)
can also be expressed under the forward measure P b with maturity T , as
w
T
Pd (t, T ) = 1{τ >t} E∗ exp − (rs + λs )ds Ft
t
w w
T T
= 1{τ >t} E∗ exp − rs ds Ft Eb exp − λs ds Ft
t t
= 1{τ >t} Nt P
b (τ > T | Gt ),
and by (10.5),
w
T
b (τ > T | Gt ) = 1{τ >t} E
P b exp − λs ds Ft
t
dP
b NT − r T rt dt
:= e 0 ,
dP N0
see Chen and Huang (2001) and Chen et al. (2008).
Recall that the price of a default bond with maturity T , (random) default
time τ and (possibly random) recovery rate ξ ∈ [0, 1] is given by
w
T
Pd (t, T ) = 1{τ >t} E∗ exp − (ru + λu )du Ft
t
w
T
+E ξ 1{τ ⩽T } exp −
∗
ru du Gt , 0 ⩽ t ⩽ T,
t
220 "
where
n−1 n−1
rl 1(Tl ,Tl+1 ] (t) λl 1(Tl ,Tl+1 ] (t),
X X
r (t) = and λ(t) = t ⩾ 0. (10.7)
l =0 l =0
1 P (t, Tk )
λk = −rk + log d > 0, k = 0, 1, . . . , n − 1.
Tk+1 − Tk Pd (t, Tk+1 )
of the survival probability up to time T , see (10.3), and given the infor-
mation known up to time t, in terms of the hazard rate process (λu )u∈R+
adapted to a filtration (Ft )t∈R+ , we find
w
T
P(τ > T | GTk ) = 1{τ >Tk } exp − λu du
Tk
n−1
!
= 1{τ >t} exp −
X
λl (Tl+1 − Tl ) , k = 0, 1, . . . , n − 1,
l =k
where
Gt = Ft ∨ σ ({τ ⩽ u} : 0 ⩽ u ⩽ t), t ⩾ 0,
" 221
Exercises
Exercise 10.2 A standard zero-coupon bond with constant yield r > 0 and
maturity T is priced P (t, T ) = e−(T −t)r at time t ∈ [0, T ]. Assume that the
company can get bankrupt at a random time t + τ , and default on its final
$1 payment if τ < T − t.
a) Explain why the defaultable bond price Pd (t, T ) can be expressed as
∗
Sources: Moody’s, S&P.
222 "
In what follows we assume that the processes (rt )t∈R+ and (λt )t∈R+ are
modeled according to the Vasicek processes
(1)
drt = −art dt + σdBt ,
(2)
dλt = −bλt dt + ηdBt ,
(1) (2)
where Bt t∈R+
and Bt t∈R+
are standard (Ft )t∈R+ -Brownian motions
(1) (2)
with correlation ρ ∈ [−1, 1], and dBt • dBt = ρdt.
a) Give a justification for the fact that
w
T
E∗ exp − (ru + λu )du Ft
t
is an Ft -martingale under P.
" 223
c) Use the Itô formula with two variables to derive a PDE on R2 for the
function F (t, x, y ).
d) Taking r0 := 0, show that we have
wT wT
(1)
rs ds = C (a, t, T )rt + σ C (a, s, T )dBs ,
t t
and wT wT
(2)
λs ds = C (b, t, T )λt + η C (b, s, T )dBs ,
t t
where
1
C (a, t, T ) = − (e−(T −t)a − 1).
a
e) Show that the random variable
wT wT
rs ds + λs ds
t t
and variance w wT
T
Var rs ds + λs ds Ft ,
t t
conditionally to Ft .
f) Compute P (t, T ) from its expression (10.10) as a conditional expectation.
g) Show that the solution F (t, x, y ) to the 2-dimensional PDE of Question (c)
is
h) Show that the defaultable bond price P (t, T ) can also be written as
w
T
P (t, T ) = eU (t,T ) P(τ > T | Gt )E∗ exp − rs ds Ft ,
t
where
ση
U (t, T ) = ρ (T − t − C (a, t, T ) − C (b, t, T ) + C (a + b, t, T )) .
ab
224 "
where
η2 2
f2 (t, u) = λt e−(u−t)b − C (b, t, u).
2
(1)
k) Show how the result of Question (h) can be simplified when Bt t∈R+
(2)
and Bt t∈R are independent.
+
" 225
Credit derivatives are option contracts that offer protection against default
risk in a creditor/debtor relationship by transferring risk to a third party. The
credit derivatives considered in this chapter are Collateralized Debt Obliga-
tions (CDOs) and Credit Default Swaps (CDSs) that may be used as a pro-
tection against default risk. We also deal with counterparty default risk via
Credit Valuation Adjustments (CVAs).
" 227
□
For simplicity, in the above proof we have ignored a possible accrual interest
term over the time interval [Tk , τ ] when τ ∈ [Tk , Tk+1 ] in the above value of
the premium leg. Similarly, we have the following result.
Proposition 11.3. The value at time t of the protection leg is given by
"j−1 w #
Tk + 1
1(Tk ,Tk+1 ] (τ )(1 − ξk+1 ) exp −
X
V (t, T ) := E
d
rs ds Gt ,
t
k =i
(11.2)
where ξk+1 is the recovery rate associated with the maturity Tk+1 , k =
i, . . . , j − 1.
228 "
In the case of a non-random recovery rate ξk , the value of the protection leg
becomes
j−1 w
Tk + 1
(1 − ξk+1 )E 1(Tk ,Tk+1 ] (τ ) exp −
X
rs ds Gt .
t
k =i
The spread Sti,j is computed by equating the values of the premium (11.1)
and protection (11.2) legs as V p (t, T ) = V d (t, T ), i.e. from the relation
which yields
j−1 w
1
Tk+1
Sti,j = 1(Tk ,Tk+1 ] (τ )(1 − ξk+1 ) exp −
X
E rs ds Gt .
P (t, Ti , Tj ) t
k =i
(11.3)
The spread Sti,j , which is quoted in basis points per year and paid at regular
time intervals, gives protection against defaults on payments of $1. For a
notional amount N the premium payment will become N × Sti,j .
" 229
1−ξ h wτ i
Sti,j = E 1(t,T ] (τ ) exp − rs ds Gt .
P (t, Ti , Tj ) t
In case the rates r (s), λ(s) and the recovery rate ξk+1 are deterministic, the
above spread can be written as
j−1 w
Tk + 1
Sti,j P (t, Ti , Tj ) = 1{τ >t}
X
(1 − ξk ) exp − r (s)ds
t
k =i
w w
Tk Tk + 1
× exp − λs ds − exp − λs ds .
t t
Given that
j−1
X
P (t, Ti , Tj ) = (Tk+1 − Tk )P (t, Tk+1 ), Ti ⩽ t ⩽ Ti+1 ,
k =i
we can write
j−1 wT
X k +1
Sti,j (Tk+1 − Tk ) exp − (r (s) + λ(s))ds
t
k =i
230 "
j−1 wT wT wT
= 1{τ >t}
X k +1 k k +1
(1 − ξk ) exp − r (s)ds exp − λ(s)ds − exp − λ(s)ds .
t t t
k =i
In particular, when r (t) and λ(t) are written as in (10.7) and assuming that
ξk = ξ, k = i, . . . , j, we get, with t = Ti and writing δk = Tk+1 − Tk ,
k = i, . . . , j − 1,
j−1 k
!
STi,ji
X X
δk exp − δp (rp + λp )
k =i p=i
j−1 k
!
= 1{τ >t} (1 − ξ )
X X
exp eδk λk − 1 .
− δp (rp + λp )
k =i p=i
" 231
αl := p1 + p2 + · · · + pl , l = 1, 2, . . . , n, (11.5)
denote the corresponding cumulative percentages, with α0 = 0 and αn =
p1 + p2 + · · · + pn = 100%.
The tranches are ordered according to increasing default risk, tranche n◦ 1
being the riskiest one (“equity tranche”), and tranche n◦ n being the safest
one (“senior tranche”), while the intermediate tranches are referred to as
“mezzanine tranches”. In practice, losses occur first to the “equity” tranches,
next to the “mezzanine” tranche holders, and finally to “senior” tranches.
AAA
Aaa
Aa
Baa
Equity
at time t ∈ [Ti , Tj ], based on the default time τl and recovery rate ξl+1 of
each involved CDS, k = i, . . . , j − 1, with N = j − i.
232 "
When the first loss occurs, tranche n◦ 1 is the first in line, and it loses the
amount
In case Lt > p1 N , then tranche n◦ 2 takes the remaining loss up to the amount
N p2 , that means the loss L2t of tranche n◦ 2 is
where αi := p1 + p2 + · · · + pi , i = 1, 2, . . . , n.
In the end, tranche n◦ n will take the loss
Senior Aaa
Mezzanine Aa
Mezzanine Baa
Equity
234 "
h r i hr rs i
T T
E exp − t j ru du LlTj Gt + E Tij rs exp − t ru du Lls ds Gt
= h r i
Pj−1 Tk + 1
k =i δk E (N pl − LTk+1 ) exp − t
l rs ds Gt
⩾ 0,
l = 1, 2, . . . , n.
l =i
j−1
X
= (1 − ξl+1 )P (τl ⩽ t | M = m)
l =i
j−1
X Φ −1 (P(τ
l ⩽ t)) + ak m
= (1 − ξl+1 )Φ q ,
l =i 1 − a2k
" 235
3
Npi
2.5
f(x) 1.5
0.5
0
0 1 Nαi-1 2 3 4 Nαi-1+Npi 5 6
x
The expected tranche loss E[Lkt ] n◦ k can be estimated by the Monte Carlo
method when the default times are generated according to (9.8).
In order to compute expected tranche losses we can use the fact that the
cumulative loss Lt is a discrete random variable, with for example
j−1
!
X
P Lt = N − ξk+1 = P(τi ⩽ t, . . . , τj−1 ⩽ t),
k =i
and
P(Lt = 0) = P(τi > t, . . . , τj−1 > t),
which require the knowledge of the joint distribution of the default times
τi , . . . , τj−1 .
If the τk′ s are independent and identically distributed with common cumula-
tive distribution function Fτ and ak = a, ξk = ξ, k = i + 1, . . . , j, then the
cumulative loss Lt has a binomial distribution given M , given by
N
P(Lt = (1 − ξ )k | M ) = (1 − P(τ ⩽ T | M ))N −k (P(τ ⩽ T | M ))k
k
N −k −1 k
Φ (Fτ (T )) − aM Φ (Fτ (T )) − aM
−1
N
= 1−Φ √ Φ √ ,
k 1 − a2 1 − a2
k = 0, 1, . . . , N . The expected loss of tranche n◦ k can then be expressed as
w∞
E[Lkt ] = E [fk (Lt ) | M = m] ϕ(m)dm
−∞
1 w∞ 2
= √ E [fk (Lt ) | M = m] e−m /2 dm,
2π −∞
236 "
with confidence level set at α = 0.999 i.e. m = Φ−1 (0.999) = 3.09, cf.
Relation (2.4) page 10 of Aas (2005). Recall that the function
Φ−1 (x) + ak Φ−1 (α)
x 7−→ Φ q
1 − a2k
always lies above the graph of x when ak < 0, as in the next figure.
1
Φ ( ( Φ-1(x) - a Φ-1(0.999)))/ (1-a2)1/2)
0.8
0.6
0.4
0.2
0
0 0.2 0.4 0.6 0.8 1
x
the Basel III regulatory framework. Other credit value adjustments (XVA)
include the Funding Valuation Adjustments (FVA), Debit Valuation Adjust-
ments (DVA), Capital Valuation Adjustments (KVA), and Margin Valuation
Adjustments (MVA). The purpose of XVAs is also to take into account the
future value of trades and their associated risks. The real-time estimation of
XVA measures is generally highly demanding from a computational point of
view.
denote the difference between the remaining protection and premium legs
from time Tl until time Tj . Note that by definition of the spread Sti,j we have
Π(t, Tj ) = 0, 0 ⩽ t ⩽ Ti .
Definition 11.4. The Net Present Value (NPV) at time Tl of the CDS is
the conditional expected value
238 "
ii) On the other hand, if NPV(ν, Tj ) < 0 then the original fee payment
−NPV(ν, Tj ) is still due.
As a consequence, in the event of default at time ν ∈ [Tl , Tj ], the net present
value of the CDS at time ν is
" 239
w
ν + +
Π(Tl , ν ) + exp − rs ds η NPV(ν, Tj ) − − NPV(ν, Tj )
Tl
w
ν +
= Π(Tl , ν ) + exp − rs ds NPV(ν, Tj ) − (1 − η ) NPV(ν, Tj )
Tl
w
ν +
= Π(Tl , Tj ) − (1 − η ) exp − rs ds NPV(ν, Tj ) ,
Tl
since w
ν
Π(Tl , Tj ) = Π(Tl , ν ) + exp − rs ds NPV(ν, Tj ).
Tl
More generally, the total discounted payment due at time Tl under counter-
party risk rewrites as
see Brigo and Chourdakis (2009), Brigo and Masetti (2006). As a consequence
of (11.10), we derive the following result.
Proposition 11.5. The price at time Tl of the payoff ΠD (Tl , Tj ) under
counterparty risk is given by
The quantity
w
ν +
(1 − η )E 1{Tl <ν ⩽Tj } exp − rs ds NPV(ν, Tj ) FTl
Tl
240 "
Exercises
Exercise 11.1 Credit default swaps. Estimate the first default rate λ1 and
the associated default probability in the framework of (11.4), based on CDS
market data, cf. also Castellacci (2008).
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 r Tk + 1 rT
Tk k +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
" 241
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
denote the discounted value at time t of the premium leg, where δk := Tk+1 −
Tk , k = i, . . . , j − 1.
a) By equating the protection and premium legs, find the value of Q(t, Ti+1 )
with Q(t, Ti ) = 1, and derive a recurrence relation between Q(t, Tj +1 )
and Q(t, Ti ), . . . , Q(t, Tj ).
b) For a given underlying asset, retrieve the corresponding CDS spreads Sti,j
and discount factors P (t, Ti ), . . . , P (t, Tn ), and estimate the correspond-
ing survival probabilities Q(t, Ti ), . . . , Q(t, Tn ).
242 "
" 245
Product spaces:
Probability sample spaces can be built as product spaces and used for the
modeling of repeated random experiments.
Events
246 "
" 247
iii) Taking
G := {Ω, ∅, {2, 4, 6}, {2, 4}, {6}, {1, 2, 3, 4, 5}, {1, 3, 5, 6}, {1, 3, 5}} ⊃ F,
F = {∅, {(H, H )}, {(T , T )}, {(H, T )}, {(T , H )}, (12.12)
{(T , T ), (H, H )}, {(H, T ), (T , H )}, {(H, T ), (T , T )},
{(T , H ), (T , T )}, {(H, T ), (H, H )}, {(T , H ), (H, H )},
{(H, H ), (T , T ), (T , H )}, {(H, H ), (T , T ), (H, T )},
{(H, T ), (T , H ), (H, H )}, {(H, T ), (T , H ), (T , T )}, Ω} .
Note that the set F of all events considered in (12.12) above has altogether
n
1= event of cardinality 0,
0
n
4= events of cardinality 1,
1
n
6= events of cardinality 2,
2
n
4= events of cardinality 3,
3
n
1= event of cardinality 4,
4
with n = 4, for a total of
4
X 4
16 = 2n = = 1+4+6+4+1
k
k =0
248 "
Property (b) above is named the law of total probability. It states in particular
that we have
P ( A1 ∪ · · · ∪ An ) = P ( A1 ) + · · · + P ( An )
P ( Ac ) = P ( Ω \ A ) = P ( Ω ) − P ( A ) = 1 − P ( A ) .
which extends to arbitrary families of events (Ai )i∈I indexed by a finite set
I as the inclusion-exclusion principle
!
|J|+1
[ X \
P Ai = (−1) P Aj , (12.14)
i∈I J⊂I j∈J
and !
(−1)|I|+1 P
\ X [
P Aj = Ai . (12.15)
j∈J I⊂J i∈I
The triple
(Ω, F, P) (12.16)
" 249
and
F = {∅, {(T , T ), (H, H )}, {(H, T ), (T , H )}, Ω} .
The uniform probability measure P on (Ω, F ) is given by setting
1 1
P({(T , T ), (H, H )}) := and P({(H, T ), (T , H )}) := .
2 2
In addition, we have the following convergence properties.
Then we have \ [
P Ak = 0,
n⩾1 k⩾n
i.e. the probability that An occurs infinitely many times occur is zero.
p = P(A) and 1 − p = P ( Ac ) ,
P(Y ∩ A)
P(A | Y ) =
P(Y )
P(A ∩ B )
P(A | B ) : =
P(B )
" 251
! !
[ [
P B∩ An =P ( B ∩ An )
n⩾1 n⩾1
X
= P ( B ∩ An )
n⩾1
X
= P ( B | An ) P ( An )
n⩾1
X
= P ( An | B ) P ( B ) ,
n⩾1
[
In particular, if An = Ω, (An )n⩾1 becomes a partition of Ω and we get
n⩾1
the law of total probability
X X X
P(B ) = P ( B ∩ An ) = P ( An | B ) P ( B ) = P ( B | An ) P ( An ) ,
n⩾1 n⩾1 n⩾1
(12.19)
provided that Ai ∩ Aj = ∅, i ̸= j, and P(B ) > 0, n ⩾ 1.
Remark. In general we have
!
[ X
P A Bn ̸= P ( A | Bn ) ,
n⩾1 n⩾1
Independent events
Definition 12.11. Two events A and B such that P(A), P(B ) > 0 are said
to be independent if
P(A | B ) = P(A). (12.20)
We note that the independence condition (12.20) is equivalent to
252 "
P(A ∩ B ) = P(A)P(B ).
X : Ω −→ R
ω 7−→ X (ω )
X : Ω −→ R
X : Ω −→ R
(k, l ) 7−→ k + l.
Then X is a random variable giving the sum of the two numbers appear-
ing on each die.
ii) the time needed everyday to travel from home to work or school is a
random variable, as the precise value of this time may change from day
to day under unexpected circumstances.
iii) the price of a risky asset can be modeled using a random variable.
1A : Ω −→ {0, 1}
ω 7−→ 1A (ω )
defined by
∗
See (MOE and UCLES 2016, page 14) and (MOE and UCLES 2020, page 19).
†
Measurability of subsets of R refers to Borel measurability, a concept which will not
be defined in this text.
" 253
1 if ω ∈ A,
1A (ω ) = 0 if ω ∈/ A.
Indicator functions satisfy the property
since
1A∩B (ω ) = 1 ⇐⇒ ω ∈ A ∩ B
⇐⇒ ω ∈ A and ω ∈ B
⇐⇒ 1A (ω ) = 1 and 1B (ω ) = 1
⇐⇒ 1A (ω )1B (ω ) = 1.
We also have
1A∪B = 1A + 1B − 1A∩B = 1A + 1B − 1A 1B ,
and
1A∪B = 1A + 1B , (12.22)
if A ∩ B = ∅.
For example, if Ω = N and A = {k}, for all l ⩾ 0 we have
1 if k = l,
1{k} (l) =
0 if k ̸= l.
1 if X = n,
1{X =n} =
0 if X ̸= n,
and
1 if X < n,
1{X<n} =
0 if X ⩾ n.
254 "
0.4
Probability density
0.3
0.2
0.1
0
−4 −3 −2 −1 a 0 1 b 2 3 4
" 255
P(a ⩽ X ⩽ b) = P(X = a) + P(a < X ⩽ b) = P(a < X ⩽ b) = P(a < X < b),
and w∞
x 7−→ 1 − FX (x) = P(X ⩾ x) = φX (s)ds,
x
as
∂FX ∂ wx ∂ w∞
φX (x) = (x) = φX (s)ds = − φX (s)ds, x ∈ R.
∂x ∂x −∞ ∂x x
Examples
i) The uniform distribution on an interval.
The probability density function of the uniform distribution on the in-
terval [a, b], a < b, is given by
1
φ(x) = 1 (x), x ∈ R.
b − a [a,b]
ii) The Gaussian distribution.
The probability density function of the standard normal distribution is
given by
1 2
φ(x) = √ e−x /2 , x ∈ R.
2π
More generally, the probability density function of the Gaussian distri-
bution with mean µ ∈ R and variance σ 2 > 0 is given by
256 "
1 2 / (2σ 2 )
φ(x) : = √ e−(x−µ) , x ∈ R.
2πσ 2
λe−λx , x ⩾ 0
1
0.9
0.8
Probability density
0.8
0.7
0.6
0.6
0.5
0.4
0.4
0.3
0.2
0.2
0.1
0.0
0
0 1 2 3 4 5 6 0 1 2 3 4 5 6
We also have
P(X > t) = e−λt , t ⩾ 0. (12.25)
where a > 0 and λ > 0 are scale and shape parameters, and
w∞
Γ (λ) : = xλ−1 e−x dx, λ > 0,
0
xσ 2π
0, x < 0.
Exercise: For each of the above probability density functions φ, check that
the condition w∞
φ(x)dx = 1
−∞
is satisfied.
Joint densities
(X, Y ) : Ω −→ R2
ω 7−→ (X (ω ), Y (ω )).
φ(X,Y ) : R2 −→ R+
when
w w
P((X, Y ) ∈ A × B ) = P(X ∈ A and Y ∈ B ) = φ(X,Y ) (x, y )dxdy
B A
258 "
0.1
0
-1
0
x
1 1 1.5
-0.5 0 0.5
-1 y
Fig. 12.8: Probability P((X, Y ) ∈ [−0.5, 1] × [−0.5, 1]) computed as a volume integral.
The probability density function φ(X,Y ) can be recovered from the joint cu-
mulative distribution function
wx wy
(x, y ) 7−→ F(X,Y ) (x, y ) := P(X ⩽ x and Y ⩽ y ) = φ(X,Y ) (s, t)dsdt,
−∞ −∞
and
w∞w∞
(x, y ) 7−→ P(X ⩾ x and Y ⩾ y ) = φ(X,Y ) (s, t)dsdt,
x y
as
∂2
φ(X,Y ) (x, y ) = F (x, y ) (12.26)
∂x∂y (X,Y )
∂2 w x w y
= φ (s, t)dsdt (12.27)
∂x∂y −∞ −∞ (X,Y )
∂ 2 w w
∞ ∞
= φ(X,Y ) (s, t)dsdt,
∂x∂y x y
x, y ∈ R.
The probability densities φX : R −→ R+ and φY : R −→ R+ of X : Ω −→ R
and Y : Ω −→ R are called the marginal densities of (X, Y ), and are given
by w∞
φX (x) = φ(X,Y ) (x, y )dy, x ∈ R, (12.28)
−∞
and w∞
φY ( y ) = φ(X,Y ) (x, y )dx, y ∈ R.
−∞
The conditional probability density φX|Y =y : R −→ R+ of X given Y = y is
defined by
φ(X,Y ) (x, y )
φX|Y =y (x) := , x, y ∈ R, (12.29)
φY ( y )
" 259
Example
If X1 , . . . , Xn are independent exponentially distributed random variables
with parameters λ1 , . . . , λn we have
we can write
Discrete distributions
260 "
T0 := inf{k ⩾ 0 : Xk = 0}
can denote the duration of a game until the time that the wealth Xk of a
player reaches 0. The random variable T0 has the geometric distribution
(12.33) with parameter p ∈ (0, 1).
iv) The negative binomial (or Pascal) distribution.
We have
k+r−1
P(X = k ) = (1 − p)r pk , k ⩾ 0, (12.34)
r−1
" 261
λk −λ
P(X = k ) = e , k ⩾ 0,
k!
where λ > 0 is a parameter.
and we have
X
1 = P(X = ∞) + P(X < ∞) = P(X = ∞) + P(X = k ).
k ⩾0
which is a contradiction.
Given two discrete random variables X and Y , the conditional distribution
of X given Y = k is given by
P(X = n and Y = k )
P(X = n | Y = k ) = , n ⩾ 0,
P(Y = k )
262 "
p = P ( X = 1 ) = P ( A ) = E [ 1A ] = E [ X ] .
E [ 1 A ] : = 1 × P ( A ) + 0 × P ( Ac ) = P ( A ) . (12.36)
E [ X ] = E [ 1A ] = 0 × P ( Ω \ A ) + 1 × P ( A ) = 0 + P ( A ) = P ( A ) .
provided that
E[|X|] + E[|Y |] < ∞.
Examples
i) Expected value of a Poisson random variable with parameter λ > 0:
" 263
X X λk X λk
E[X ] = kP(X = k ) = e−λ k = λe−λ = λ. (12.39)
k! k!
k⩾0 k⩾1 k⩾0
and
X
1 = P(X = ∞) + P(X < ∞) = P(X = ∞) + P(X = k ),
k ⩾0
and in general
X
E[X ] = +∞ × P(X = ∞) + kP(X = k ).
k ⩾0
and
X X 2k X1
E[ϕ(X )] = ϕ(k )P(X = k ) = = = +∞,
2k + 1 2
k ⩾0 k⩾0 k ⩾0
264 "
hence the expectation E[ϕ(X )] is infinite although ϕ(X ) is finite with prob-
ability one.∗
Conditional expectation
The notion of expectation takes its full meaning under conditioning. For ex-
ample, the expected return of a random asset usually depends on information
such as economic data, location, etc. In this case, replacing the expectation
by a conditional expectation will provide a better estimate of the expected
value.
For instance, life expectancy is a natural example of a conditional expec-
tation since it typically depends on location, gender, and other parameters.
The conditional expectation of a finite discrete random variable X : Ω −→
N given an event A is defined by
X X P(X = k and A)
E[X | A] = kP(X = k | A) = k .
P(A)
k⩾0 k ⩾1
k 1{X =k}
X
X=
k ⩾0
" 265
Example
i) For example, consider Ω = {1, 3, −1, −2, 5, 7} with the non-uniform
probability measure given by
1 2 1
P({−1}) = P({−2}) = P({1}) = P({3}) = , P({5}) = , P({7}) = ,
7 7 7
and the random variable
X : Ω −→ Z
given by
X (k ) = k, k = 1, 3, −1, −2, 5, 7.
Here, E[X | X > 1] denotes the expected value of X given
A = {X > 1} = {3, 5, 7} ⊂ Ω,
i.e. the mean value of X given that X is strictly positive. This conditional
expectation can be computed as
E[X | X > 1]
= 3 × P(X = 3 | X > 1) + 5 × P(X = 5 | X > 1) + 7 × P(X = 7 | X > 1)
3+2×5+7
=
4
3+5+5+7
=
7 × 4/7
1
E X 1{X>1} ,
=
P(X > 1)
and
1
E[X | X < 10] = E X 1{X<10}
P(X < 10)
9
1 X
= kP(X = k )
P(X < 10)
k =0
266 "
9
1 X
= 9
kpk
k =1
X
pk
k =0
9
p(1 − p) ∂ X k
= p
1 − p ∂p
10
k =0
p(1 − p) ∂ 1 − p10
=
1 − p10 ∂p 1−p
p(1 − p10 − 10(1 − p)p9 )
=
(1 − p)(1 − p10 )
≃ 2.4032603455.
E [ X 1A ] = E [ X ] E [ 1A ] = E [ X ] P ( A ) ,
1A : Ω −→ {0, 1}
1 if ω ∈ A,
ω 7−→ 1A :=
0 if ω ∈
/ A,
E [ 1A | A ] = 0 × P ( X = 0 | A ) + 1 × P ( X = 1 | A )
= P(X = 1 | A)
= P(A | A)
= 1.
" 267
X
E[E[X | Y ]] = E[X | Y = k ]P(Y = k )
k⩾0
XX
= nP(X = n | Y = k )P(Y = k )
k⩾0 n⩾0
X X
= n P(X = n and Y = k )
n⩾0 k ⩾0
X
= nP(X = n) = E[X ],
n⩾0
that follows from the law of total probability (12.19) with Ak = {Y = k},
k ⩾ 0. □
Taking
k 1A k ,
X
Y =
k ⩾0
Example
Life expectancy in Singapore is E[T ] = 80 years overall, where T denotes
the lifetime of a given individual chosen at random. Let G ∈ {m, w} denote
the gender of that individual. The statistics show that
and we have
80 = E[T ]
= E[E[T |G]]
268 "
showing that
i.e.
81.9 − 80 1.9
P(G = m) = = = 0.487.
81.9 − 78 3.9
Variance
Random sums
" 269
Y
X
the expectation of a random sum Xk , where (Xk )k∈N is a sequence of
k =1
random variables, can be computed from the tower property (12.43) or from
the law of total expectation (12.44) as
Y Y
" # " " ##
X X
E Xk = E E Xk Y
k =1 k =1
Y
" #
X X
= E Xk Y = n P(Y = n)
n⩾0 k =1
n
" #
X X
= E Xk Y = n P(Y = n),
n⩾0 k =1
Random products
where the last equality requires the (mutual) independence of the random
variables in the sequence (Xk )k⩾1 .
270 "
b) The uniform random variable U on [0, 1] satisfies E[U ] = 1/2 < ∞ and
however we have w 1 dx
E[1/U ] = = +∞,
0 x
" 271
In particular, Fatou’s lemma shows that if in addition the sequence (Fn )n∈N
converges with probability one and the sequence (E[Fn ])n∈N converges in R
then we have
E lim Fn ⩽ lim E[Fn ].
n→∞ n→∞
Characteristic functions
ΨX : R −→ C
272 "
defined by
ΨX (t) = E eitX , t ∈ R.
ΨX (t) = ΨY (t), t ∈ R.
" 273
Φ X +Y (t ) = Φ X (t ) Φ Y (t )
2 2 2 2
= eitµ−t σX /2 eitν−t σY /2
2 2 2
= eit(µ+ν )−t (σX +σY )/2 , t ∈ R,
ΦX (t) := E etX ,
provided that E et|X| < ∞, t ∈ R, and for this reason the moment gen-
274 "
{X ⩽ x} := {ω ∈ Ω : X (ω ) ⩽ x} ∈ F,
for all x ∈ R.
Intuitively, when X is F-measurable, the knowledge of the values of X de-
pends only on the information contained in F. For example, [ when F =
σ (A1 , . . . , An ) where (An )n⩾1 is a partition of Ω with An = Ω, any
n⩾1
F-measurable random variable X can be written as
n
ck 1Ak (ω ),
X
X (ω ) = ω ∈ Ω,
k =1
for some c1 , . . . , cn ∈ R.
Definition 12.22. Given (Ω, F, P) a probability space we let L2 (Ω, F ) de-
note the space of F-measurable and square-integrable random variables, i.e.
More generally, for p ⩾ 1 one can define the space Lp (Ω, F ) of F-measurable
and p-integrable random variables as
This inner product is associated to the norm ∥ · ∥L2 (Ω) by the relation
q q
∥X∥L2 (Ω) = E X 2 = ⟨X, X⟩L2 (Ω,F ) , X ∈ L2 (Ω, F ).
" 275
E[X | G ],
L2 (Ω, F )
L2 (Ω, G )
0 E[X | G ]
which rewrites as
E[Y (X − E[X | G ])] = 0,
i.e.
E[Y X ] = E[Y E[X | G ]],
for all bounded and H-measurable random variables Y , where ⟨·, ·⟩L2 (Ω,F )
denotes the inner product (12.52) in L2 (Ω, F ). The next proposition extends
276 "
because E[X | {∅, Ω}] is in L2 (Ω, {∅, Ω}) and is a.s. constant. In addition,
the conditional expectation operator has the following properties.
" 277
for all bounded and H-measurable random variables H, which will imply
(iii) from (12.55).
In order to prove (12.58) we check that by point (i) above and (12.56)
we have
Proof. This relation can be proved using the tower property, by noting
that for any bounded K ∈ L2 (Ω, G ) we have
278 "
E [ X 1A k ]
n n
1 A k E [ X | Ak ] = 1A k
X X
E[X | G ] = .
P ( Ak )
k =1 k =1
Proof. It suffices to note that the G-measurable random variables can be
generated by indicators of the form 1Al , and that
E [ X 1A k ] E [ X 1A l ]
n
" #
E 1Al 1Ak = E 1A l
X
P ( Ak ) P ( Al )
k =1
E [ X 1A l ]
E 1Al
=
P ( Al )
= E X 1A l , l = 1, 2, . . . , n,
E[X 1Ak ]
E [ X | Ak ] = , k = 1, 2, . . . , n,
P ( Ak )
E[X | G ] = 1{a,b} E[X | {a, b}] + 1{c} E[X | {c}] + 1{d} E[X | {d}]
E X 1{a,b} E X 1{c} E X 1{d}
= 1{a,b} + 1{c} + 1{d} .
P({a, b}) P({c}) P({d})
" 279
Exercises
µ = E[X ].
d) Write down E[eX ] as an integral and prove (12.51), i.e. show that
2 /2
E[eX ] = eµ+σ .
280 "
1 2 / (2σ 2 )
φ(x) : = √ e−(x−µ) , x ∈ R.
2πσ 2
a) Consider the function x 7→ x+ from R to R+ , defined as
x if x ⩾ 0,
x+ =
0 if x ⩽ 0.
x − K if x ⩾ K,
+
(x − K ) =
0 if x ⩽ K,
K − x if x ⩽ K,
+
(K − x) =
0 if x ⩾ K,
y2 v 2 σ 2 y vσ 2
σy − = − − .
v2 4 v 2
b) Compute
1 w∞ 2 / (2v 2 )
E[(em+X − K )+ ] = √ (em+x − K )+ e−x dx.
2πv 2 −∞
" 281
Chapter 1
Exercise 1.1 According to Definition 1.1, 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.
Concerning (v ), Bc+t − Bc clearly has a centered Gaussian distribution with
variance t, and the same property holds for cBt/c2 , since
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)
" 283
Chapter 2
Exercise 2.1
a) i) 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, na.pad = TRUE);Xn<-Xn[-1]
k=0;cov(Xn[1:(length(Xn)-k)],lag(Xn,k))
n=2000;a=2;
Xn<-arima.sim(model=list(ma=c(a)),n.start=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))
ρ(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 ,
284 "
and
and for k ⩾ 2,
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 complet unit circle. As ϕ(z ) = 1 admits the unique
solution z = 1 which lies on the complet 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
Exercise 2.3
" 285
a) We have
= E[Zn+1 ] + αE Xn
= αE Xn , n ⩾ 0,
hence we find
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 ],
hence
E[Xn2 ] = 1 + α2 + · · · + α2n
Xn
= α2k
k =0
2n+2
1−α
, α ̸= ±1,
1 − α2
=
n + 1,
α = ±1, n ⩾ 0.
286 "
Exercise 2.4
a) We have
and the fact that Cov(X, Z ) = 0 when X and Z are independent random
variables, we have
and
and
" 287
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,
∇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,
Exercise 2.6
a) We have
n n
!
∂ X (2) ( 1 ) 2
X (2) (1)
rk − a − brk = −2 − an + rk − brk
∂a
k =1 k =1
n n
(2) (1)
X X
= 2an − 2 rk + 2b rk ,
k =1 k =1
288 "
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) 1 X (1) (1)
=2 rk rk − rk rl − 2b (rk )2 − rk rl .
n n
k =1 k,l=1 k =1 k,l=1
b) In order to minimize the residual (2.26) 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.
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.
" 289
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 4a 2 1
− ,
a
hence the time series (Xn )n⩾1 is stationary for a ∈
/ {1/2, 1}.
b) We have
hence
(1 − α1 − α2 )E[Xn ] = 0,
which implies E[Xn ] = 0, n ∈ Z, since 1 − α1 − α2 ̸= 0.
c) We have
d) We have
290 "
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
as in (3.11).
λ λwy
Φ′ (y ) = Φ (y ) − Φ(y − z )dF (z )
c c 0
λ w
λ y
= Φ (y ) − Φ(y − z )e−z/µ dz
c µc 0
" 291
λ λ wy
= Φ (y ) − Φ(z )e−(y−z )/µ dz,
c µc 0
hence
λ ′ λ λ 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 µ
hence
λµ (λ/c−1/µ)y
e
Φ (y ) = 1 − ,
c
given the boundary conditions Φ(∞) = 1 and Φ(0) = 1 − λµ/c, cf. (3.18).
We conclude that
λµ (λ/c−1/µ)y
Ψ (y ) = e , y ⩾ 0,
c
provided that c < λµ.
Exercise 3.3
a) We have
and similarly
b) We find
292 "
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
a) Taking (U , V ) = (U , U ), we have
b) Taking (U , V ) = (U , 1 − U ), we have
u, v ∈ [0, 1].
c) We have
∂C C (u + ε, v ) − C (u, v )
(u, v ) = lim
∂u ε→0 ε
" 293
∂C
h′ (u) = (u, v ) − 1 = P(V ⩽ v | U = u) − 1 ⩽ 0,
∂u
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.8).
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 ),
P(X = 1 and Y = 0) = 0,
P(X = 0 and Y = 0) = 1 − pX = 1 − pY .
294 "
hence
pX pY ⩾ pX pY (1 − pX )(1 − pY ),
p
pX pY (1 − pX )(1 − pY ),
p
pX pY ⩾
hence
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
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 ⩽ 0)
= P(X ⩾ x and Y ⩾ 0) − (P(X ⩾ x) − P(X ⩾ x and Y ⩾ 0))
−(P(Y ⩾ x) − P(X ⩾ x and Y ⩾ 0))
= P(X ⩾ x and Y ⩾ 0) − P(X ⩾ x) − P(Y ⩾ x) + P(X ⩾ x and Y ⩾ 0)),
" 295
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 0
u 1
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
′ 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
296 "
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
fΣ (x, y )dy =
−∞ πση −∞ R− ∪R+
1 −x2 /(2σ2 ) w∞
1R + ( x )
2 2
= e e−y /(2η ) dy +
πση 0
1 −x2 /(2σ2 ) w0
1 R− ( x )
2 2
e e−y /(2η ) dy
πση −∞
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, the random variable X + Y has the probability density
function
∂ 1 ∂ w a w a−x −x2 /2−y2 /2
P(X + Y ⩽ a) = e dydx
∂a π ∂a 0 0
1 ∂ w a −(a−z )2 /2 w z −y2 /2
= e e dydz
π ∂a 0 0
1 w a −y2 /2 1 w a −(a−z )2 /2 w z −y2 /2
= e dy + ze e dydz
π 0 π 0 0
1 w a −y2 /2 1 w a −(a−z )2 /2 w a −y2 /2
= e dy + ze dz e dy
π 0 π 0 0
1 w a −y2 /2 w y −(a−z )2 /2
+ e ze dzdy
π 0 0
" 297
1 w a −y2 /2 1 2
wa 2
= e dy + (1 − e−a /2 ) e−y /2 dy
π 0 π 0
1 w a −y2 /2 −(a−y )2 /2 2
+ e (e − e−a /2 )dy
π 0
2 2
w a −y 2 /2 1 2
wa 2 2
= (1 − e−a /2 ) e dy + e−a /2 e−y /2−(a−y ) /2 dy
π 0 π 0
1 2
wa 2 e−a /2 w a −((√2y−a/√2)2 −a2 /2)/2
2
= (1 − e−a /2 ) e−y /2 dy + e dy
π −a π 0
w 2 /4 w √
1 2 a −y 2 /2 e−a √
a 2 −((y−a/ 2)2 )/2
= (1 − e−a /2 ) e dy + √ e dy
π −a π 2 0
wa √ √
e−a /4 w a( 2−1/ 2) −y2 /2
2
1 2 2
= (1 − e−a /2 ) e−y /2 dy + √ √ e dy
π −a π 2 −a 2
wa √
e−a /4 w a/ 2 −y2 /2
2
1 2 2
= (1 − e−a /2 ) e−y /2 dy + √ √ √ e dy
π −a π 2π −a 2
1 2 2 1 √
= √ (1 − e−a /2 )(2Φ(a) − 1) + e−a /4 √ (2Φ(a 2) − 1), a ⩾ 0,
π π
which vanishes at a = 0.
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 θ
298 "
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.
Exercise 4.6
a) 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
" 299
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
with
λ λ
θ1 = and θ2 = .
λ1 + λ λ2 + λ
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
e) We have
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 }
300 "
∂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],
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.3: Survival copula density graph with θ1 = 0.3 and θ2 = 0.7.
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.
V0 = ξS0 + η = −2 × 4 + 10 = $2,
" 301
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.
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∗ ,
Exercise 5.3
a) Each of the stated conditions yields one equation, i.e.
4ξ + η = 1 ξ = 2
with solution
5ξ + η = 3, η = −7.
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.
302 "
Exercise 5.4
a) 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. |
ii) If this model allows for arbitrage opportunities, how can they be real-
ized? By shortselling | By borrowing on savings | N.A. | ✓
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
a) We need to search for possible risk-neutral probability measure(s) P∗ such
(1) (1)
that E∗ S1 = (1 + r )S0 . Letting
(1) (1)
!
(1) (1) S1 − S0
p∗ = P∗ S1 = S0 (1 + a) = P∗ =a ,
(1)
S0
(1) (1)
!
(1) (1) S1 − S0
θ∗ = P∗ S1 = S0 (1 + b) = P∗ =b ,
(1)
S0
(1) (1)
!
S1 − S0
q ∗ = P∗ S (1) = (1 + c)S (1) = P∗
=c ,
1 0
(1)
S0
We have
p∗ + θ∗ + q ∗ = 1,
" 303
(1 − θ∗ )a + θ∗ b < r < (1 − θ∗ )c + θ∗ b,
i.e.
r−c r−a
< θ∗ < ,
b−c b−a
or
(1 − θ ∗ )a < r < (1 − θ ∗ )c
i.e. < 1 − r/c, in case a < b = 0 < c. Therefore there exists an infinity
θ∗
of risk-neutral probability measures depending on the value of θ∗ ∈ (0, 1),
and the market is without arbitrage but not complete.
b) 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 1 + β = S 1 − K S1 − S1
with solution
αS 1 + β = 0, S −K
β = −S 1 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 )
S1 − K
= (S0 − S 1 ) .
S1 − S1
304 "
Exercise 5.7
a) The payoff of the long box spread option is given in terms of K1 and K2
as
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
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
" 305
Chapter 6
Exercise 6.1
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
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.
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.4: Pareto CDF x 7→ FX (x) and PDF x 7→ fX (x) with 99%
VX = $86.49.
306 "
Exercise 6.2
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
hence
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
Exercise 6.4
a) We have
1 1
VXp := inf x ∈ R : P(X ⩽ x) ⩾ p = − log(1 − p) = E[X ] log .
λ 1−p
VXp ≃ 2.996E[X ].
" 307
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 ]
Exercise 6.6
a) By the Chebyshev inequality, for every x > 0 and r > 0 we have
⩽ E X 1{X ⩾x}
r
⩽ E [|X|r ] ,
hence
1
P(X ⩽ x) ⩾ 1 − E[|X|r ], x > 0,
xr
and
1
⩽ inf x ∈ R : 1 − r E[|X|r ] ⩾ p
x
1
= inf x ∈ R : xr ⩾ E[|X|r ]
1−p
308 "
E[|X|r ] 1/r
=
1−p
∥X∥Lr (Ω)
= .
(1 − p)1/r
Exercise 6.7
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 .
" 309
Chapter 7
Exercise 7.1
p
a) Noting that p = 1 − e−λVaRX and using integration by parts on VaRpX , ∞
310 "
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
= E[X ] + VXp .
Exercise 7.2
a) If P(X > z ) > 0 we have E (X − z )1{X>z} > 0, hence
and
E X 1{X>z}
E[X | X > z ] = > z.
P(X > z )
Recall that E[X | X > z ] is not defined if P(X > z ) = 0.
b) We have
= zP(X ⩽ z ) + E X 1{X>z}
Note that E[X ] = E[X | X > z ] when P(X ⩽ z ) = 0, i.e. P(X > z ) = 1.
c) When P(X ⩽ z ) > 0, we find
" 311
Exercise 7.3
a) We have VaR0.9
X = 4 and CTEX = 6.
0.9
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.
312 "
5+6 11
b) E X 1{X>V 90% } = = .
X 23 23
2
c) P X > VX90% = .
23
E X 1{X>V 90% }
5+6 11
d) CTEX = E X | X > VX
90% 90%
= 5.50.
X
= = =
P X > VX90% 2 2
4+5+6 15
e) E X 1{X ⩾V 90% } = = .
X 23 23
3
f) P X ⩾ VX 90%
= .
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
h) TV90% = VX dq = VX dq + VXq dq + VXq dq
w1 − p p 1−p
X p 21/23 22/23
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.10. The attached
code computes the above risk measures, as illustrated in the next Fig-
ure S.6.
> source("var-cte_quiz.R")
VaR90= 4, Threshold= 0.9130435
CTE90= 5.5
ES90= 5.304348
Fig. S.6: Value at Risk and Expected Shortfall for small data.
" 313
Exercise 7.5
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
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,
314 "
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
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
c) We have VX99%
+Y = VX +Y = VX +Y = 100.
95% 90%
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
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
" 315
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
w w 0.99 w1
1
0.81
= 0dq + 100dq + 200dq
0.2 0.8 0.81 0.99
1
= (100 × 0.18 + 200 × 0.01) = 100.
0.2
In particular,
TV99%
X = 2500 × 0.99 − 2350 = 125 ⩾ VX99% = 100.
1 w∞
= xfX (x)dx
0.01 100
1 w ∞ dFX (x)
= x dx
0.01 100 dx
w
1 0.01 150
= xdx
0.01 50 100
150 − 100
2 2
=
2 × 50
= 125.
Note that
316 "
0.01 1 (1 − 0.992 )
TV98% = × 100 + 5000 − 0.01 × 4850
X 0.02 0.02 2
= 112.50
⩾ VX98% = 100,
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
1 w1 q
TVpX = V dq
1−p p X
1 w 1 q
= log dq
1−p p 1−q
1 w 1 1 w1
= log qdq − log(1 − q )dq
1−p p 1−p p
1 w 1 1 w 1−p
= log qdq − log qdq
1−p p 1−p 0
" 317
1 w1
w w1
1
1
= 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
Chapter 8
Exercise 8.1
a) We have
1 1
E[X | G] = and E[X | B ] = .
λG λB
b) We find
fX (x | B )P(B )
P(B | X = x) =
fX ( | G ) P ( G ) + fX ( x | B ) P ( B )
λB e−λB x P(B )
=
λG e G P(G) + λB e−λB x P(B )
−λ x
1
=
λG P(G) (λB −λG )x
1+ e
λB P(B )
1
= ,
P(G)
1 + λ(x)
P(B )
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 )
318 "
or
λG (λB −λG )x D P(B )
λ(x) = e ⩾ .
λB L P(G)
This condition holds if and only if
1 D λB P(B )
x⩾ log ,
λB − λG L λG P(G)
D P(B )
A = x ∈ R : λ(x) ⩾
L P(G)
1 D λB P ( B )
= log ,∞ ,
λB − λG L λG P(G)
d) We have
−1
F G F B (x) = F G − (log x)/λB )
We check that
d −1 d λG /λB
F G F B (x) = x
dx dx
d λG (log x)/λB
= e
dx
λG λG (log x)/λB
= e
xλB
λG (λG −λB )(log x)/λB
= e
λB
λ −1
= G e(λB −λG )F B (x)
λB
−1
= λ F B (x) , x ∈ [0, 1].
Exercise 8.2
a) We find
fX ( x | B ) P ( B )
P(B | X = x) =
fX (x | G)P(G) + fX (x | B )P(B )
" 319
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) 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
λ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)
Exercise 8.3
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
320 "
µ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
2 2 2) D (x) P(B )
λ(x) = eβx−(µG −µB )/(2σ ⩾
L(x) P(G)
is equivalent to
hence
µ2G − µ2B 1 P(B )
x⩾ + log ,
2σ (β − a − b)
2 β−a−b P(G)
provided that
µG − µB
β := > a + b.
σ2
In this case, we have
where
µ2G − µ2B 1 P(B )
x∗ : = + log .
2σ 2 (β − a − b) β − a − b P(G)
" 321
Chapter 9
Exercise 9.1 By differentiation of (9.1), i.e.
σ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
τ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 9.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 ]
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}
322 "
= 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 (9.9) 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π
= q e k dm
2π 1 − a2k −∞
1 2
= √ e−xk /2 , xk ∈ R.
2π
c) We have
n 2
w ∞ − (x1 −a1 m ) (x −an m)2 −m2 /2
1 Y
2(1−a2 )
− n e
φ(x1 , . . . , xn ) = n/2
(1 − a2k )−1/2 e 1 ···e 2(1−a2
n) √ dm
(2π ) −∞ 2π
k =1
n x2 +a2 m2 −2x1 a1 m x2 +a2 m2 −2xn an m
1 w∞ −1 1 1 +···+ n n + m2 dm
1−a2 1−a2
Y 2
= (1 − a2k )−1/2 e 1 n √
(2π )n/2 −∞ 2π
k =1
x2 x2 n
1 −1 1 +···+ n
1−a2 1−a2
2
Y
= √ e 1 n (1 − a2k )−1/2
(2π )n/2 2π
k =1
2 a2 a2 x1 a1
w∞ − m2 1+ 1 +···+ n +2m +···+ xn an2
1−a2 1−a2 2(1−a2 ) 2(1−an )
e 1 n 1 dm
−∞
" 323
x2 x2
2
1
−2 1 +···+ n 1 x1 a1 xn an
1−a2 1−a2
1−a2
+···+ 1−a2
e 1 n
2 1 n
= p exp
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 a2
−1 1 1− 1 +···+ n 1− n !
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 2
α (1−a )−a 2
−an a1 .
n n
(1−a2n )(1−a21 ) (1−a2n )(1−a2n−1 ) (1−a2n )2
a21 a22
α2 : = 1 + +
1 − a21 1 − a22
324 "
we find
α2 (1−a2 )−a2
1
1
(1−a21 )2
1
− (1−aa21)(a1−a2
2)
Σ−1 = 2 1
α2 (1−a22 )−a22
2
α − (1−aa22)(a1−a
1
2) ( 1−a 2 )2
2 1 2
(1−a22 )a21
2
α
1 1−a1 2 1 − 2
1−a2 a12 − (1−aa21)(a1−a
2
2)
= 2 1 2
(1−a21 )a22
α α2
− (1−aa22)(a1−a
1
2) 1−a2 2 1 − 2
1−a2 a1 2
2 1
α2
a1 a2
1 2
1−a2 a1 2 − 2
(1−a1 )(1−a2 ) 2
= 2 α2
α − (1−aa22)(a1−a
1
2) 1−a22 a21
2 1
α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 a2
2 1 1−a 2 1
α2
1 1−a22 a21
− (1−aa21)(a1−a2
2)
= 2 1
α2
2
α − (1−aa22)(a1−a
1
2) 1−a 2 a2
2 1
2 1
1 1 −a1 a2
= .
1 − a22 a21 −a1 a2 1
Chapter 10
Exercise 10.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) .
" 325
Exercise 10.3
a) Use the fact that (rt , λt )t∈[0,T ] is a Markov process.
b) Use the tower property 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
− (r +λs )ds − (r +λs )ds
= −(rt + λt )e 0 s P (t, T )dt + e 0 s dF (t, rt , λt )
rt rt
− (r +λs )ds − (r +λs )ds ∂F
= −(rt + λt )e 0 s P (t, T )dt + e 0 s (t, rt , λt )drt
∂x
rt 1 rt ∂2F
(rs +λs )ds ∂F
+ e− 0 (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 )σ22 (t, λt )dt
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
rt ∂F r t ∂F
(1) (2)
= e− 0 (rs +λs )ds (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
d) We have
wt
(1)
rt = −a rs ds + σBt , t ⩾ 0,
0
hence
wt 1 (1)
rs ds = σBt − rt
0 a
326 "
σ
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 −(T −s)a (1) σ wt (1)
= (1 − e )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.
e) As a consequence of 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
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
" 327
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
η2 w T 2
= 1{τ >t} exp −C (b, t, T )λt + C (b, s, T )ds ,
2 t
for a = 0 and
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
∂
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 ).
328 "
η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
,
η2 2
f2 (t, u) = λt e−(u−t)b − C (b, t, u).
2
k) In this case we have ρ = 0 and
w
T
P (t, T ) = P(τ > T | Gt )E exp −
Estimating Default Probabilities with Credit Default Swaps
rs ds Ft ,
t
In order to compute the implied default for the shortest maturity, the 6-month CDS spread for McDonald’s
Corp is extracted from Bloomberg as shown in the first screenshot below. The current market convention is for
the premium to be fixed at 100bps with an upfront cash payment to settle the difference in value between the
since U (t, T ) = 0.
premium leg and the protection leg. However, the Bloomberg CDS valuation page computes the equivalent
premiumρ for the 6m CDS to be valued at zero at trade. The premium is computed to be 10.79bps.
In order to calculate the default rate, the discount rates are needed for each premium payment date.
Fortunately, Bloomberg provides the discount rates as well as show in the second screenshot. The following
Chapter 11
assumptions are also made to simplify the calculation:
we infer
which T
0.10790%,
= close
S isi very 1
t = Apr 12, 2015, Ti =model
to that determined by the Bloomberg valuation
Marat 20, 2015, ρ = 40%.
Excel file). The value λ is found to be 0.001798747. This gave an implied default probability of 0.001246026
0.0013 as shown in the first
screen shot.
Next, from the discount factors of Figure S.11 we solve the Equation (11.4)
numerically in Table 13.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 S.10, see also Castellacci (2008).
" 329
Exercise 11.2
a) By equating the protection and premium legs, we find
j−1 j−1
P (t, Tk+1 ) (Q(t, Tk ) − Q(t, Tk+1 )) = Sti,j
X X
(1 − ξ ) δk P (t, Tk+1 )Q(t, Tk+1 ).
k =i k =i
(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
330 "
j−1
X
(1 − ξ )P (t, Tj +1 ) (Q(t, Tj ) − Q(t, Tj +1 )) + (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 )
" 331
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
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 ].
332 "
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 w∞
−y 2 /(2σ 2 )
= √ e dy
2πσ 2 −∞
1 w ∞ 2
= √ e−z /2 dz.
2π −∞
Next, using the polar change of coordinates dxdy = rdrdθ, we find∗
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 /2
iR
= − lim e−r
R→+∞ 0
2 /2
= lim (1 − e−R )
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
∗
“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”. Milne (2005).
" 333
1 w∞ 2 / (2σ 2 )
= √ (µ + y )e−y dx
2πσ 2 −∞
µ w ∞ −y2 /2 σ w ∞ 2
= √ e dy + √ ye−y /2 dy
2π −∞ 2π −∞
µ w ∞ −y 2 /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
−∞
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
σ 2
= eµ + .
2
Exercise A.4
a) We have
334 "
1 w∞ 2 / (2/σ 2 )
E[X + ] = √ x+ e−x dx
2πσ 2 −∞
σ w ∞ −x2 /2
= √ xe dx
2π 0
σ h 2
i x = ∞
= √ −e−x /2
2π x=0
σ
= √ .
2π
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
1 w∞ 2 / (2σ 2 ) K w∞ 2 2
= √ xe−x e−x /(2σ ) dx
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
−x2 /(2σ 2 )
= √ (K − x)e dx
2πσ 2 −∞
K wK 2 / (2σ 2 ) 1 wK 2 / (2σ 2 )
= √ e−x dx − √ xe−x dx
2πσ 2 −∞ 2πσ 2 −∞
K w K/σ −x2 /2 σ h −x2 /(2σ2 ) ix=K
= √ e dx − √ −e
2π −∞ 2π −∞
σ −K 2 /(2σ )2 K
= √ e + KΦ .
2π σ
" 335
336 "
337
N. Privault
338 "
" 339
340 "
" 341
342 "
Author index
" 343
Revuz, D. 6 Vallois, P. 86
Rullière, D. 85 Vašiček, O. 208, 237
Villa, J. 86
Salmon, F. 208
Shreve, S. 204 Watanabe, T. 25
Slark, M. 97 Wei, X. 85
Stroock, D.W. 277 White, A. 208
344 "
[1] K. Aas. The basel II IRB approach for credit portfolios: A survey.
Note No SAMBA/33/05, Norwegian Computing Center, 2005. (Cited
on page 237).
[2] C. Acerbi and D. Tasche. On the coherence of expected shortfall.
Preprint arXiv:cond-mat/0104295, 2001. (Cited on page 166).
[3] Aristotle. Politics, Book one, Part XI. The Internet Classics Archive, 350
BCE. http://classics.mit.edu/Aristotle/politics.1.one.html. (Cited on
page 111).
[4] L. Bachelier. Théorie de la spéculation. Annales Scientifiques de l’Ecole
Normale Supérieure, Série 3, 17:21–86, 1900. (Cited on pages 5 and 11).
[5] F. Black and J.C. Cox. Valuing corporate securities. Journal of Finance,
31:351–357, 1976. (Cited on page 203).
[6] F. Black and M. Scholes. The pricing of options and corporate liabilities.
J. of Political Economy, 81, 1973. (Cited on page 111).
[7] D. Bosq and H.T. Nguyen. A Course in Stochastic Processes: Stochastic
Models and Statistical Inference. Mathematical and Statistical Methods.
Kluwer, 1996. (Cited on page 67).
[8] K.E. Boulding. In “Energy Reorganization Act of 1973. Hearings,
Ninety-third Congress, first session, on H.R. 11510”. U.S. Government
Printing Office, Washington, 1973. (Cited on page 12).
[9] D. Brigo and K. Chourdakis. Counterparty risk for credit default swaps:
impact of spread volatility and default correlation. Int. J. Theor. Appl.
Finance, 12(7):1007–1026, 2009. (Cited on page 240).
[10] D. Brigo and M. Masetti. Risk neutral pricing of counterparty risk. In
M. Pykhtin, editor, In Counter-party Credit Risk Modeling: Risk Man-
agement, Pricing and Regulation, London, 2006. Risk Books. (Cited on
page 240).
[11] R. Brown. A brief account of microscopical observations made in the
months of June, July and August, 1827, on the particles contained in
the pollen of plants; and on the general existence of active molecules in
345
N. Privault
346 "
" 347
348 "
" 349
350 "
These notes cover some aspects of financial risk and analytics. This in-
cludes classical topics such as Value at Risk (VaR) and Expected Shortfall
(ES), as well as structures of random dependence. Credit default is treated
via defaultable bonds, Credit Default Swaps (CDS) and collateralized debt
obligations (CDOs), based on stochastic calculus. Basic risk theory and credit
scoring are presented with examples in R. The concepts presented are illus-
trated by examples and by 62 exercises with their complete solutions.
" 351