Sunteți pe pagina 1din 9

ACTSC445 - Assignment 1 (Q2-Q6)

Ahad Shoaib - 20634235


October 15, 2018

1 Q2
a) Refer to the the "main()" function and the bottom part of the attached Python file (a1-q2.py)
to see how to run the code. Essentially, we compute the stock price ST at 2000 timesteps, and for
each timestep, we compute our loss `T on the puts as `T = (K − ST )+ ∗ 1000000 (since we are
selling 1 million puts). We invest in a bond that has face value F = 2.86m ∗ (1 + 0.3)1 = 2.9458m,
so the total change in our portfolio value at time T is computed as CT = F − `T , and so our
loss, therefore, is LT = (−CT )+ . We end up getting a set L = {L1 , . . . , LT } which we use for our
calculations.

1.1 Sample A
Pn
b) Given loss distribution X (use X = T ), let M = k=1 Ik where Ik = 1{Xk ≤V aRα (X)} , k =
1, . . . , n
We want to find s, r such that P (s ≤ M < r) = p since {s ≤ M < r} ⇐⇒ {X(s) ≤ V aRαX <
X(r) }.

An approximation is achieved by P (nα − K ≤ M ≤ nα + K) where K = nα(1 − α)φ−1 ( 1+p


p
2 )
where ψ −1 is the inverse of the CDF of the standard normal. √
In this case, p = 0.95, n = 2000, α = 0.99, φ−1 (0.975) = 1.96, so we have K = 2000 ∗ 0.99 ∗ 0.01 ∗
1.96 = 8.72145, so:

nα − K = 1971.278

nα + K = 1988.721
Here, we will take s = 1971, r = 1989 so we have our confidence interval as

[X(1971) , X(1989) ] = [22136623.706, 25166590.372]


(obtained from the attached code).

As the confidence interval was generated by 2000 random sample, the CLT tells us that such
an interval is sufficiently accurate, although by observation we can see that the confidence interval
is quite wide, which contributes negatively to its sufficiency. Since we are using VaR and not
CVaR, this interval still does not represent the extreme tail values, so in that sense, it is not fully
representative.

c) We can obtain an estimate of CV aR0.99 (T ) as:


n
1 X
CV aRα (T, n) = X(i)
n − dαne + 1
i=dαne

n
1 X
= X(i)
21 i=1980

1
= 573548660.132
21

1
= 27, 311, 840.958
d) Since a confidence interval for CV aR is difficult to compute, we will get M estimates of the
CV aR as C = {CV aR1 , . . . , CV aRM } and obtain a confidence interval from these values. For
consistency and accuracy, we will use M = 2000.
A 95% confidence interval can be constructed as:
v v
[p̄ − 1.96 ∗ √ , p̄ + 1.96 ∗ p ]
M (M )
p
With p̄ = E[C], v = V ar(C)
So, our computation gives us a 95% confidence interval for CV aR0.99 (T ) as:

[26996542.373, 27114145.317]

1.2 Sample B
b) Using the same process as with Sample A, we estimate the confidence interval for V aR0.99 (T )
as:

[38073627.857, 48093753.176]
The comments regarding this confidence interval follow similarly to the one for sample A.

c) Using the same process as with Sample A, we estimate CV aR as:

CV aR0.99 (T ) = 51809862.476

d) Using the same process as with Sample A, we get the 95% confidence interval for CV aR0.99 (T )
as:

[26957991.550, 27078170.058]

2
Question 3. Consider X ∼ LN (µ, σ 2 ) with Φ, φ denoting the CDF, PDF of N (0, 1) respectively.
Develop an explicit expression for:

a) V aRp (X):
Since N (µ, σ 2 ) is a continuous distribution, LN (µ, σ 2 ) is also continuous since f (x) = ex is strictly
monotone. Hence, we have that V aRp (X) is the unique solution v to P (X ≤ v) = p.

Observe that:

P (X ≤ v) = p, X ∼ LN (µ, σ 2 )

⇐⇒ P (ln(X) ≤ ln(v)) = p, ln(X) ∼ N (µ, σ 2 )

ln(X) − µ ln(v) − µ ln(X) − µ


⇐⇒ P ( ≤ ) = p, Z= ∼ N (0, 1)
σ σ σ
ln(v) − µ
⇐⇒ Φ−1 (p) =
σ
−1
⇐⇒ v = eσΦ (p)+µ

−1
So we have V aRp (X) = eσΦ (p)+µ
.

b) CV aRp (X) : (let p ∈ (0, 1), endpoints are degenerate cases)


Z 1
1
CV aRp (X) = V aRs (X)ds
1−p p
Z 1 Z 1
−1
V aRs (X)ds = eσΦ (s)+µ
ds
p p

u = Φ−1 (s), Φ(u) = s ⇒ φ(u)du = ds

Z 1 Z Φ−1 (1)
−1
⇒ eσΦ (s)+µ
ds = eσu+µ φ(u)du
p Φ−1 (p)
Z ∞
µ
=e eσu φ(u)du
Φ−1 (p)

So, we have:


Z
CV aRp (X) = eσu φ(u)
1−p Φ−1 (p)

Note that this above expression does not admit a closed form solution without using the error
function (erf ), so we leave it in its existing form.

3
Question 4. Let Z, Y be two random variables where FYα (x) is the CDF of Y for fixed α ∈ (0, 1)
as

FYα (x) = 0 x < V aRα (Z)

P (Z ≤ x) − α
FYα (x) = x ≥ V aRα (Z)
1−α
1
R ∞
Prove that E[Y ] = V aRα (Z) + 1−α V aRα (Z)
P r(Z > x)dx

Proof:
Let F (x) = FYα (x), G(x) = P (Z ≤ x), F̄ (x) = 1 − F (x), Ḡ(x) = 1 − G(x), πα = V aRα (Z).

We will do this in two cases:

Case (1) - πα = V aRα (Z) ≥ 0:

By an alternate definition of E[Y ], we have:


Z ∞ Z 0
E[Y ] = F̂ (x)dx − F (x)dx
0 −∞
R0
Note that F (x) = 0 for x ∈ (−∞, V aRα (Z)), so −∞ F (x)dx = 0, and:
Z ∞
E[Y ] = (1 − F (x))dx − 0
0
Z πα Z ∞
= 1dx + F̄ (x)dx
0 πα

P (Z ≥ x) − α
Z
= πα + 1−( )dx
πα 1−α

1 − α − P (Z ≤ x) + α
Z
= πα + ( )dx
πα 1−α
Z ∞
1
= πα + (1 − P (Z ≤ x))dx
1 − α πα
Z ∞
1
= πα + P (Z > x)dx
1 − α πα
as required.

Case (2) - πα = V aRα (Z) < 0

Similar to Case (1), we have:


Z ∞ Z 0
E[Y ] = F̂ (x)dx − F (x)dx
0 −∞
R0 R0
Since F (x) = 0 for x ∈ (−∞, πα ), we have −∞
F (x) = πα
F (x). Now, combining our result from
case (1) for the first term, we have:
∞ 0
P (Z ≤ x) − α
Z Z
1
E[Y ] = P (Z > x)dx − )dx (
1−α 0 πα 1−α
Z ∞ Z 0 Z πα
1
= ( P (Z > x)dx − (1 − P (Z > x))dx − αdx)
1−α 0 πα 0

with the last step following from integral rules and the fact that P (Z ≤ z) = 1 − P (Z > z).

4
R πα R∞ R0 R∞
Note that 0
αdx = απα and 0 P (Z > x)dx + πα P (Z > x)dx = πα P (Z > x)dx, and
Rb Ra
remember that − a xdx = b xdx, so combining the above, we get:
Z ∞
1
E[Y ] = ( P (Z > x)dx + πα − απα )
1 − α πα
and since πα − απα = πα (1 − α), we get
Z ∞
1
E[Y ] = πα + P (Z > x)dx
1−α πα

as required. R∞
1
We have shown that for πα = V aRα (Z) ∈ R, E[Y ] = V aRα (Z) + 1−α πα
P (Z > x)dx, so we are
done with the proof.

5
Question 5a) Here, we have X, Y i.i.d. with P (X = 0) = 0.96, P (X = 1) = 0.04.
Calculate CV aR0.95 (X), CV aR0.95 (Y ), CV aR0.95 (X + Y ).

It is clear that V aR0.95 (X) = 0 = V aR0.95 (Y ) (since X, Y have the same distribution).

CV aR0.95 (X) = E[X|X > V aR0.95 (X)] = E[X|X > 0] = 1


(clear since X is either 0 or 1). Similarly, CV aR0.95 (Y ) = 1.

Observe that for Z = X + Y , we have:


P (Z = 0) = P (X = 0) ∗ P (Y = 0) = 0.9216
P (Z = 1) = 0.0768
P (Z = 2) = 0.0016
So, we have V aR0.95 (X + Y ) = 1, and so:

CV aR0.95 (X + Y ) = E[X|X > V aR0.95 (X + Y )] = E[X|X > 1] = 2


.
CV aRα (V )
Question 5b) Let V ∼ N (µ, σ). Determine Lv = limα→1− V aRα (V ) .

Let f, F represent the pdf, cdf of N (0, 1) respectively.


A quick calculation shows us that:

V aRp (V ) = σF−1 (p) + µ

f (F −1 (p))
CV aRp (V ) = µ + σ
1−p
.
So,

CV aRp (V )
Lv = lim−
p→1 V aRp (V )
−1
µ + σ f (F1−p(p))
= lim
p µ + σF −1 (p)
f (u)
µ + σ 1−F (u)
= lim , u = F −1 (u), p → 1− ⇒ u → ∞
u→∞ µ + σu
µ(1 − F (u)) + σf (u)
= lim
u (1 − F (u))(µ + σu)

F̂ (u)µ + σf (u)
= lim , F̂ (u) = 1 − F (u)
u→∞ F̂ (u)(µ + σu)
Since the limit goes to 0
0 and f 0 (u) = −uf (u), we apply L’Hopitals Rule:

−f (u)µ − σuf (u)


Lv = lim
u→∞ −f (u)µ − f (u)σu + F̂ (u)σ
1
= lim
u→∞ F̂ (u)σ
1− f (u)(µ+σu)

Observe that:

F̂ (u)
lim
u→∞ f (u)(µ + σu)
−f (u)σ
= lim
u→∞ −µf (u)u + f (u)σ − σuf (u)

6
σ
= lim f (u) =0
u→∞ σ + u(σ − µ)
Using L’Hopital’s rule again in the second equality.
Hence, we get
1 1
lim = =1
u→∞
1− F̂ (u)
σ f (u)(µ+σu) 1−0

Putting it all together, we get Lv = 1.

Question 5c) Given γ > 1, W r.v. with pdf f (w) = fW (w) = γw−(γ+1) for w ≥ 1 and zero
CV aR (W )
otherwise, determine LW = limp→1− V aRpp(W ) .

First, we find the CDF F (w) = FW (w).


Z w
F (w) = fW (x)dx
1
Z w
= γx−(γ+1) dx
1

1 − w−γ
= γ( ) = 1 − w−γ
γ
.
Now, this distribution is clearly continuous for fixed γ, so we have that V aRp (W ) is the unique
solution v to F (v) = P (W ≤ v) = p, i.e. 1 − w−γ = p

1 − w−γ = p
1 γ1
⇐⇒ v = ( )
1−p
1
1
Hence, V aRp (W ) = ( 1−p )γ .
Now,
Z 1
1
CV aRp (W ) = V aRx (W )dx
1−p p
Z 1
1 1 1
= ( ) γ dx
1−p p 1−x
1 1
= (γ(1 − p)1− γ )
1−p
γ
= 1
(1 − p) γ
.
So, we have:

CV aRp (W )
Lw = lim−
p→1 V aRp (W )
γ
1
(1−p) γ
= lim− 1
p→1 1
( 1−p )γ


Hence, Lw = γ.

7
Question 6. We have the following asymptotic variance for the estimator of VaR:

α(1 − α)
σα2 := 2 (V
fX aRα (X))
where fX (.) denotes the density function of the r.v. X. Compute limα→1− σα2 for each of the fol-
lowing distributions and make comments on the reliability of such estimator of VaR:

a) Exponential: X ∼ EXP (λ), λ > 0 with a survival function F̄X (x) = e−x/λ and pdf fX (x) =
1 −x/λ
λe , x ≥ 0.

Answer: We have F̄ (x) = e−x/λ ⇐⇒ F (x) = 1 − e−x/λ , and V aRα (X) being the unique
solution x such that P (X ≤ x) = α, that is:
x
1 − e− λ = α

⇐⇒ x = −λln(1 − α)
So, V aRα (X) = λln(1 − α).
Now,

fX (V aRα (X)) = fX (−λ log(1 − α))

1
= exp(ln(1 − α))
λ
1
= (1 − α)
λ
and

2 1−α 2
fX (V aRα (X)) = ( )
λ

(1 − α)2
=
λ2
So we have

p(1 − p)
lim σp2 = lim (1−p)2
p→1− p→1−
λ2

pλ2
= lim−
p→1 (1 − p)

=∞
1
since limp→1− (1 − p) → 0 and so 1−p → ∞ while p → 1.

1
b) From earlier (in 5c) we have that V aRp (X) = 1 , so:
(1−p) γ
1
fX (V aRp (X)) = γ(1 − p)1+ γ

2
2
fX (V aRp (X)) = γ 2 (1 − p)2+ γ
Now, observe that:

α(1 − α)
lim σα2 = lim− 2
α→1− α→1 γ 2 (1 − α)2+ γ
α
= lim− 2
α→1 γ 2 (1 − α) γ

8
=∞
1
as (1 − α) → 0 and so 1−α → ∞.

We notice that as α → 1, both asymptotic variances for the estimator of V aR approach ∞,


which shows that for values of α close to 1, there is a lot of variance, indicating that the V aR is
not very useful here as there will be a lot of noise and uncertainty.

S-ar putea să vă placă și