Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
181 views9 pages

r2001 - HW1 - Solution 2

The document provides solutions to an assignment on risk management, including proofs of the Markov inequality and explanations of risk handling methods. It also covers statistical evaluations related to random variables, the weak law of large numbers, covariance, correlation, and variance calculations. Additionally, it discusses foreign exchange hedging strategies and compares Brent and WTI crude oil benchmarks, along with statistical analysis of their prices.

Uploaded by

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

r2001 - HW1 - Solution 2

The document provides solutions to an assignment on risk management, including proofs of the Markov inequality and explanations of risk handling methods. It also covers statistical evaluations related to random variables, the weak law of large numbers, covariance, correlation, and variance calculations. Additionally, it discusses foreign exchange hedging strategies and compares Brent and WTI crude oil benchmarks, along with statistical analysis of their prices.

Uploaded by

ke ke
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Department of Statistics, The Chinese University of Hong Kong

RMSC 2001 Introduction to Risk Management (Term 2, 2023-24)

Solutions to Assignment 1

1. Prove the Markov inequality: If X is any nonnegative integrable random variable and a > 0, then

Pr(X ≥ a) ≤ a−1 E(X).

Solution:
Consider 1{X ≤ a}. There are two cases X ≥ a and X < a. In either case, since X is a nonnegative random
variable and a > 0, we have
X
1{X ≥ a} ≤ .
a
Take expectation on both sides, we get the desired result.
Remark: Chebyshev’s inequality can be proved by applying Markov inequality:

Pr(|X − µ| ≥ k) = Pr(|X − µ|2 ≥ k 2 ) ≤ E |X − µ|2 /k 2 = E (X − µ)2 /k 2 .




2. Risk managers use a number of methods for handling risk. For each of the following, identify the method for
handling risk and briefly explain that method.

(a) Installation of an automatic sprinkler system in a lecture theatre.


(b) A decision of not manufacturing products that might result in a product liability lawsuit.
(c) Requiring retailers who sell a firm’s products to sign an agreement releasing the firm from liability if there
is any product injuring someone.
(d) Purchase of a travel insurance for a trip to the Philippines that covers all potential medical expenses.

Solution:

(a) Loss control. Installing an sprinkler system helps to reduce the loss severity if there is a fire.
(b) Avoidance. The company can stay away from the product liability risk.
(c) Non-insurance transfer. The liability risk is transferred from the firm to retailers by contracts.
(d) Insurance: The risk of potential fortuitous loss (medical expense) during the trip is transferred to insurers
by insurance.
3. (a) Let X1 , . . . , Xn be identically distributed random variables with a common probability density function
f such that E(X1 ) = µ and Var(X1 ) = σ 2 ∈ (0, ∞). Evaluate
(i) E(n−1 nj=1 Xj ) and
P

(ii) Var(n−1 nj=1 Xj ).


P

(b) If we impose, in addition, that X’s are independent as well, using Chebyshev’s inequality, or otherwise,
state and prove the weak law of large numbers (LLN).

Solution:
Pn Pn Pn
(a) (i) E(n−1 j=1 Xj ) = n
−1
j=1 E(Xj ) = n
−1 µ = µ.
n Pn P j=1
(ii) −1 −2 = n−1 σ 2 +2n−2 1≤i<j≤n σij ,
P P
Var(n j=1 Xj ) = n { j=1 Var(Xj )+ i̸=j Cov(Xi , Xj )}
where σij denotes the covariance between Xi and Xj .
To spell out the details:
 
n n n
1 X 1 XX
Var  Xj  = 2 Cov(Xi , Xj )
n n
j=1 i=1 j=1
 

 n n n X n


1 X X X 
= 2 Cov(Xi , Xj ) + Cov(Xi , Xj )
n  
 i=1 j=1
 i=1 j=1 

i=j i̸=j
 
n
1  X X 
= 2 Var(Xj ) + Cov(Xi , Xj ) .
n  
j=1 i̸=j

Pn
(b) Let X̄n = n−1 j=1 Xj , if X’s are independent, then the results in (a) are

1 2
E(X̄n ) = µ and Var(X̄n ) = σ .
n
Then for any ϵ > 0,

1
lim Pr(|X̄n − µ| > ϵ) ≤ lim E(X̄n − µ)2
n→∞ n→∞ ϵ2
1
= lim Var(X̄n )
n→∞ ϵ2
σ2
= lim = 0.
n→∞ nϵ2

pr
Hence, X̄n → µ. Note that LLN states that the probability of X̄ differs from µ is small.
4. (a) The covariance between random variables A and B is 5. The correlation between A and B is 0.5. If the
variance of A is 12, what is the variance of B?

(b) Explain why the correlation between two random variables X and Y (denoted as corr(X, Y )) is always
bounded between −1 and 1, inclusive, i.e. −1 ≤ corr(X, Y ) ≤ 1.

(c) You are given that X and Y are random variables each of which follows a standard normal distribution
with Cov(X, Y ) = 0.4. What is the variance of 5X + 2Y ?

(d) Download the daily closing prices of Hang Seng Index (HSI) from 2 January 2017 and 31 December 2021.
Denote the daily return of HSI on day t as rt = log(St ) − log(St−1 ), where St is the close price of HSI
on day t. Compute the sample mean and the sample standard deviation of the return series. Does the
return series follow normal distribution? Argue for your claim.
Solution:
(a)
 2 
Cov(A, B) Cov(A, B)
Corr(A, B) = p ⇔ Var(B) = Var(A)
Var(A)Var(B) Corr(A, B)
Hence, Var(B) = (5/0.5)2 /12 = 25/3.
(b) This is an immediate consequence of the Cauchy-Schwarz inequality.
Claim: (Cauchy-Schwarz inequality) For any two random variables X and Y ,
|E(XY )|2 ≤ E(X 2 )E(Y 2 ).
Proof of Claim:
• (Approach 1) Let f (a) = E(X − aY )2 . Observe that f (a) ≥ 0 for a ∈ R, so
0 ≤ E(X − aY )2 = E(X 2 ) − a2E(XY ) + a2 E(Y 2 )
By the fact that f (a) ≥ 0, the quadratic function f (a) has only one root or no root, which implies
the ‘discriminant’ is less than or equal to zero. Hence,
4(E(XY ))2 − 4E(X 2 )E(Y 2 ) ≤ 0 ⇒ (E(XY ))2 ≤ E(X 2 )E(Y 2 ).
• (Approach 2) Recall the Cauchy–Schwarz inequality: |⟨u, v⟩|2 ≤ ⟨u, u⟩ · ⟨v, v⟩, where ⟨·, ·⟩ is the
inner product. After defining an inner product on the set of random variables using the expectation
of their product, ⟨X, Y ⟩ = E(XY ), the Cauchy–Schwarz inequality becomes
|E(XY )|2 ≤ E(X 2 )E(Y 2 ) .
Let µ := E(X) and ν := E(Y ), then
|Cov(X, Y )|2 = [E(X − µ)(Y − ν)]2 ≤ E[(X − µ)2 ]E[(Y − ν)2 ] = Var(X)Var(Y ) .

Hence, let the two random variables be X − E(X) and Y − E(Y ) and by our claim,
p Cov(X, Y )
|Cov(X, Y )| ≤ Var(X)Var(Y ) ⇒ ρxy = p ∈ [−1, 1] .
Var(X)Var(Y )
Note that correlation measures the strength of the linear relationship between two variables. And ρxy = 1
indicates a perfect positive linear relationship, and ρxy = −1 refers to a perfect negative linear relationship.
(c) Var(5X + 2Y ) = 52 Var(X) + 22 Var(Y ) + 2 · 10 · Cov(X, Y ) = 25 + 4 + 20 · 0.4 = 37.
(d) By the following Python codes,
1 import pandas as pd
2 import numpy as np
3 from scipy import stats
4 import matplotlib . pyplot as plt
5
6 # ## Q4 (d) ###
7 # ## Data read - in and setting dates
8 hsi = pd . read_csv ( ' HSI . csv ')
9 hsi [ " Date "] = pd . to_datetime ( hsi [" Date "], format = "%Y -%m -% d")
10 hsi . set_index (" Date " , inplace = True )
11
12 # ## Cleaning nan data
13 print (" Missing values : \n" , hsi . loc [ hsi . isnull () . any ( axis = 1) ])
14
15 # ## Calculate the return
16 log_close = np . log ( hsi [ ' Close ' ])
17 ret = ( log_close . shift (1) - log_close ). dropna ()
18 print ( ret )
19
20 # ## Mean and SD
21 print (f" Mean : { np . mean ( ret )}") # mean
22 print (f" SD : { np . std ( ret , ddof = 1) }") # sd
23
24 # ## Check the normality
25 fig , ax = plt . subplots (1 , 2, figsize = (12 ,4) )
26 ax [0]. hist ( ret , density = True )
27 ax [0]. set_ylabel ( ' Probability '); ax [0]. set_xlabel ( ' Daily return '); ax [0].
set_title ( ' Histogram of Return ')
28 stats . probplot ( ret , dist = " norm " , plot = ax [1])
29 ax [1]. set_title ( 'Q -Q Plot ')
30 plt . show ()

The sample mean and standard derivation of the daily returns are 3.362644 × 10−5 and 0.01171354.
Moreover, we can plot the histogram and Q-Q plot of the returns as Figure 1. From the histogram, we can
find the distribution of the daily returns are slightly left-skewed. And from the QQ-plot, the distribution
have two heavy tails compared to a normal distribution. Hence, the return series might not follow normal
distribution.

Figure 1: Histogram and Q-Q plot.


5. Misato Katsuragi is the treasurer of a Japanese company exporting electronic equipment to the United States.
Her counterparty is expected to pay her company US$1,000,000.00 on 31st March 2022. Ms Katsuragi wants to
lock the exchange rate for today.

(a) Discuss how you, as her risk management consultant, would design a foreign exchange hedging strategy and
name the Bloomberg ticker(s) of the instrument(s) you would use. State also the number of contracts that
you need.

(b) Suppose Ms Katsuragi decides not hedge this foreign exchange rate risk. Based on the past 5-year histori-
cal data with the normality assumption imposed whenever necessary, at least how much do you expect this
trade will lose in JPY in the worst 5% scenario? At 19:00 GMT + 8 on 14th January 2022, the mid USD/JPY
rate is 113.91, which you may adopt it as the benchmark.

Solution:

(a) Any reasonable answer is acceptable. For example, short 100 contracts of the following Currency Future:
Note that the contracts will expire before 31st March 2022, the mismatch of the expiration of the future

Name MICRO USD/JPY FUTURES


GLOBEX code M6JH2
Expiration Date MAR 22
Contract Unit 10,000 USD

contracts and the investor’s source of risk causes imperfect hedge.


(b) We can calculate the result by the following Python code:
1 import numpy as np
2 import pandas as pd
3
4 # ## Q5 (b) ###
5 # Data read - in
6 ex = pd . read_csv ( ' JPYUSD . csv ')[ ' Close ']
7
8 # ## Mean and SD
9 ex_mean = np . mean ( ex )
10 ex_std = np . std ( ex )
11
12 # ## The 5% worst case
13 z = stats . norm . ppf (0.95)
14 rate = z* ex_std + ex_mean
15 PnL = 1000000*(1/ rate -113.91)

With the benchmark, the expected loss is 8, 832, 648 JPY.


6. Brent is one of the leading global price benchmarks for crude oil; another one is West Texas Intermediate (WTI).
(a) Check, via Bloomberg or any other reliable source, the differences between these two benchmarks. (Hint:
You may search CO1 Comdty <Go> and CL1 Comdty <Go> on Bloomberg.)

(b) Download the monthly prices for these two types of crude oil between 1989 and 2019, inclusive. Provide
the summary statistics (min, Q1, median, Q3, max, mean, standard deviation) of these two series and plot
them in one chart. Do you notice any special feature of these two time series of prices? If yes, please elaborate.

(c) According to a recent article on The Wall Street Journal (see 2022S RMSC2001 A1R.pdf or online at
https://www.wsj.com/articles/rising-u-s-oil-output-forced-gol-airlines-to-change-its-hedging-method-1540331688),
GOL, a São Paulo-based airline has to alter its hedging strategy. Indicate the reason(s) why GOL has to hedge
the oil price. Should the company take a long or a short position in its hedge? Explain briefly why there is a
such a need to modify its hedging strategy.

Solution:
(a) • Brent: oil from four different fields in the North Sea: Brent, Forties, Oseberg and Ekofisk. Since sup-
plies are transported by water, they can be easily transported to distant places. Brent is the benchmark
for African, European, and Middle Eastern crude oil and is often considered the benchmark targeted
by OPEC.
• WTI: oil extracted from wells in the U.S. and sent via pipeline to Cushing, Oklahoma. The fact that
supplies are land-locked is one of the drawbacks to West Texas crude as it’s relatively expensive to ship
to certain parts of the globe. WII is seen as the benchmark in the Western Hemisphere.
(b) The following Python codes could be used to calculate the summary statistics of two types of crude oil:
1 import pandas as pd
2 import matplotlib . pyplot as plt
3
4 # ## Q6 (b) ###
5 # ## Data read - in
6 data = pd . read_csv ( ' CL1CO1 . csv ' , skiprows = [1])
7
8 # ## Some common practice ( naming columns , setting dates as datetime objects )
9 data . columns = (" Date " , " WTI " , " BRENT ")
10 data [ ' Date '] = pd . to_datetime ( data [ ' Date '], format = "%d /% m /% Y")
11 data . set_index (" Date " , inplace = True )
12
13 # ## Summary statistics with the describe () method
14 print ( data . describe () )
15
16 # ## Plot the box plots and time series plots with boxplot () and plot () methods
17 fig , ax = plt . subplots (1 , 2, figsize = (12 ,6) )
18 data . boxplot ( ax = ax [0])
19 data . plot ( ax = ax [1] , grid = True )
20 ax [0]. set_title ( ' Box plots ')
21 ax [1]. set_title (" Time Series of WTI and BRENT ")
22 plt . show ()

The boxplot and time series plot are shown in Figure 2. In the time series plot, the two crude oil prices are
close to each other in general. Their spread widened during 2011, with Brent trading at a premium compared
to WTI. In 2015, there was a premium drop for Brent, the spread between two prices reduced.
Statistics Brent WTI
mean 49.349522 47.668869
SD 32.397245 28.900024
min 10.460000 11.220000
Q1 19.505000 20.890000
median 41.805000 41.665000
Q3 70.265000 68.355000
max 139.830000 140.000000

Table 1: Summary Statistics

Figure 2: Boxplot and Time Series Plot.

(c) Reasons:
• Protect the company from the loss due to a sudden increase in the jet fuel;
• Gives it sufficient time to adjust fares if necessary.
The company should take a long position in its hedge. Because if the jet fuel prices rises, it is very likely that
crude oil price will increase simultaneously, then the gain from the options compensates the increase of the
jet fuel costs.
The company had to migrate its hedges from WTI oil to Brent oil contracts, because the correlation with
WTI and international jet fuel prices dropped substantially. It means that the change in the value of the
hedge portfolio cannot nicely mirror the change in the jet fuel costs.
Programming Bonus [15 marks]

P1. Your roommate is a psychology major. He/she has also learnt about the statement weak law of large numbers
from an intro quantitative method course. Essentially, he/she only knows that the larger the sample size is,
the better the sample mean should be as an estimate for the population mean. To demonstrate how the
statement works as the sample size n grows, you consider to use the following example to show it to your
roommate:
You use Python to draw random Bernoulli(p), p ∈ (0, 1), observations to represent the results of a coin-
flipping experiment. Specifically, for i = 1, . . . , n,

Pr(Xi = 1) = p = 1 − Pr(Xi = 0),

where the event {observe a head in the ith flip} is denoted by {Xi = 1} and p ∈ (0, 1). You also make an
assumption that each flip is independent of any other flip in this experiment, i.e. Xi ’s are i.i.d..
The sample mean will then be computed for different values of n and you plot a graph as shown as follows to
help you explain the convergence concept to your roommate (see Figure 1(b)). Please write down the corre-
sponding Python code. Interpret this graph based on your understanding of the weak law of large numbers
(LLN). Explain also the difference between (X1 , . . . , Xn ) and (x1 , . . . , xn ) by using the coin flipping ex-
ample.

Solution:
Assume it is a fair coin, so the true value of the parameter p is 0.5. Now we use simulation to verify whether
the sample mean will approach the population mean p = 0.5 as the sample size n grows. The Python code
and graph are shown as follows:
1 import numpy as np
2 import matplotlib . pyplot as plt
3
4 # ## P1 ###
5 N = 10000
6 np . random . seed (2001)
7 sample_mean = np . empty (N)
8
9 # ## add more observation to the sample
10 result = np . random . binomial (1 ,0.5 , size =N)
11 for i in range (N):
12 sample_mean [i] = np . mean ( result [0: i ])
13
14 plt . plot ( sample_mean )
15 plt . axhline (y =0.5 , color = ' red ' , linestyle = ' dotted ')
16 plt . show ()
17
18 # ## regenerate the sample in each simulation
19 sample_mean2 = np . empty (N)
20 for i in range (N):
21 sample_mean2 [i] = np . mean ( np . random . binomial (1 ,0.5 , size =i +1) )
22 plt . plot ( sample_mean2 )
23 plt . axhline (y =0.5 , color = ' red ' , linestyle = ' dotted ')
24 plt . show ()

From the left panel in Figure 3, we notice that when we add more observations to the our sample, the sample
mean will stabilized towards the population mean 0.5. If we slightly modify the code by regenerating the
Figure 3: Weak Law of Large Numbers (Simulation)

entire sample in each simulation, instead of adding more observations into the original sample, we will get
the right panel in Figure 3. The second graphs shows that sample mean fluctuates around the true mean, and
the volatility gets smaller with a larger sample size n. Hence, the probability that the sample mean deviates
from the true mean goes to zero as n increases.
(X1 , X2 , . . . , Xn ) is a random vector, which is a function mapping from a sample space Ω containing all
the possible outcomes of n flips to the n-dimensional space Rk . While (x1 , x2 , . . . , xn ) is a sequence of real
number, or regard as a vector indicating the realized outcome of an experiment. For example, if we only flip
a coin, the sample space is Ω = {H, T}, then we can define a random variable X to record the result,

1 if ω = H;

X(ω) =
0 if ω = T.

And if we have flipped the coin and observed a head, then we can record x = 1 as a realization of X.

- End -

You might also like