Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

MAST90051 Mathematics of Risk

Problem Sheet 6/2022

Assignment 1

Posted on LMS on Wedn. 31 August 2022 (announced via LMS on the same day). Submission deadline: 23:59 AEST on Monday 19 September 2022.

Your solutions must be submitted via Canvas/Gradescope (see below).  Late submissions will receive no mark unless you have a valid reason for extension, in which case you should contact the lecturer in advance.

Print your name, student ID, the subject name & code in the top right corner on the rst page of your solutions.  Your solutions must be written on blank A4 size paper. There is no need to typeset your solutions, but you may wish to do so. Material on different sized paper will not be marked.

All problems should be attempted. Working and/or reasoning must be given to obtain full credit. The form and neatness of work can be considered in marking.

Do not include tables of data sets in your solutions! Reasonable data summaries would be enough. Please do not exceed 15 pages, OK?

If you typeset your solutions, produce a single PDF le with your submission. If you wrote them, scan your submission to a single PDF le with a mobile phone1 or a scanner. Scan from directly above to avoid any excessive keystone effect.  Check that all pages are in cor- rect order, are clearly readable and cropped to the A4 borders of the original page.  Poorly scanned submissions may be impossible to mark.

Even if you typed up your solutions and will be submitting the resulting PDF le, I would still recommend you to do some scanning practice. This may prove to useful in the future.  Upload the PDF le via the Canvas Assignments menu and submit the PDF to the Grade- scope tool by rst selecting your PDF le and then clicking on Upload PDF. Gradescope will then ask you to identify on which of the uploaded pages your answers to each question are located.

1. Driven by the collected data and directed by her supervisor, an MSc student assumed that the loss L for a nancial product she was modelling is described by a distribution with density f (2) = (2 + 2)-4 (2 + 1 + ln(2 + 2))← 2 > -1.

(a)  Compute the distribution tail F (2)← 2 e R ← for L- Plot the functions f (2) and F (2) on the interval [-1 ← 5]- [2 marks]

(b)  Compute the median, mean and variance of L- Here and in the other parts of this question below, please provide numerical answers rounded to two digits after the decimal point.  [3 marks]

(c)  Compute the values of VaRα (L) and ESα (L) and nd the values of the ratios ESα (L)/VaRα (L) for a = 0-95; 0-99; 0-995. Present your results in the form of a nice table. Comment on your ndings.  [3 marks]

(d)  Simulate n = 200 independent samples each consisting of 100 independent realisations of the loss L with density f  (so that you’ll have to simulate

2 x 104  random numbers altogether). For each of the simulated n samples, compute estimates for VaR0.95 (L) and ES0.95 (L).  To evaluate the perfor- mance of the estimators used, compute the sample mean and sample stan- dard deviation for each of the two samples (of size n each) of the estimates you obtained (for VaR and ES). Present your ndings in the form of a nice table and comment on them (in a few sentences).  [5 marks]

Hints:  It may happen that you will need to use numerical procedures to do at least some of the tasks from this problem.  Note that, when using real maths to solve real world problems, one can rarely avoid using such procedures.  You can use any suitable software package you wish. For instance, MATHEMAT1cA would be ne, but MATLAB, R or even MS ExcEL could also be used. For a list of commercial software avilabe for downloading to our students, please visit https://studentit.unimelb.edu.au/software

(d) In the context of this problem, the easiest way to simulate RVs from the required distribution may be to use the Inverse Function Method”  (we did mention it in class).  If you haven’t seen/used it before, look it up on the WWW or elsewhere.  It is very simple.  Note that the inverse to the distribution function (or its tail) may not be available in a closed form (which is the most usual situation in applications).  In that case, one can use a numerical equation solver (e.g., FindRoot in MATHEMAT1cA).  Uniform random variates are supplied for free by most maths/stats software packages.

It is very instructive to repeat the simulations for part (d) several times to see how variable the results may be (despite the sample size n = 200 being relatively large).

2. Your lecturer heard that, on 2 January 2020, one of our former students  (we will call him Mr X) purchased 夕1   = 10 ← 000 Swiss franks, 夕2   = 100 BioNTech SE shares (traded at the high-tech NASDAQ stock exchange, in US$), and also 夕3   =  1 ← 000 National Australia Bank shares  (traded on the Australian Stock Exchange, ASX, in AU$). Mr X kept the composition of this portfolio unchanged until 30 December 2021.

Your lecturer kindly downloaded the stock (“adjusted close”) prices and currency exchange rates daily data from the WWW2, “cleaned”3 the data (note that dif- ferent countries may have different holidays, so there can be days where there will be data available for some but not all assets etc) and put the relevant to this question data in one Excel le, Data_for_asst_1_2022 .xlsx. Please download that file from LMS (you will nd a link to it in Week 06 problems” sub-module) and use the data from that le when doing this question.  We labelled the days for which the prices are presented in the Excel file by t = 0 ← 1 ← 2 ← - - - ← T = 494).

(a) What risk factors zt   =  (Zt,1 ← - - - Zt,d )\   are appropriate for this portfolio? Specify them.  Map the risks by representing the day t = 0 ← 1 ← - - - ← T portfolio value Vt  as a function of zt  and hence give representations for the loss values Lt+1  (in terms of the day t risk factors’ values and their next day changes xt+1  := zt+1 - zt ), the loss operator l[t](z) and the linearised loss operator l (z) of the portfolio.  [6 marks]

(b) Calculate the maximum difference max1StST |Lt - Lt(∆)| between the true losses and the linearised losses of the portfolio during the indicated time period.  On what day was it observed? What risk factors you think were mostly responsible for that largest discrepancy? Explain.  [2 marks]

(c) Compute the average relative discrepancy between the true and linearised losses and the average absolute relative loss/gain of the portfolio, i.e. the values

1 T -1 |Lt+1 - L| and 1 T -1 |Lt+1| -

T t=0                 Vt                                                 T t=0       Vt

Compare the former with the latter and comment on your ndings.  [2 marks]

(d) Calculate the numerical values of the coefficients appearing in the expression

for the linearised loss operator l ]  on day t0  := 490, i.e., 21 Dec 2021.  [1 mark] (e) Compute the method-of-moments estimates of the mean vector and covariance matrix for the vector xt  of the risk factor changes, basing on the whole data set (from 02 Jan 2020 to 30 Dec 2021).  [2 marks]

(f) Use the Variance–Covariance Method and your results from parts (d) and (e) to calculate VaR0.95 (Lt0 +1 ) and ES0.95 (Lt0 +1 ).   [This means you will be using “future data” (relative to time t0 ), cf. (e). That’s OK, just do that.]  [3 marks]

(g) Use the historical simulation method to produce a sample of simulated losses u  = l[t0 ] (xu )← u = t0 - n + 1← t0 - n + 2 ← - - - ← t0 ← for n = 400 and plot a histogram for it.  Use the sample to give a quantile estimator for VaR0.95 (Lt0 +1 ) and an estimator for ES0.95 (Lt0 +1 ). Compare your estimates with the results of part (f) and comment.  [4 marks]

Hints:  (g) Note that you should get t6 +1  = Lt6 +1  (just in case: to check if what you are doing is correct). To estimate ES0]95  use an empirical quantile-based analog of that quantity (it was given in lectures and, of course, is referred to in the text as well).

3.  (a) Show that

Σ = 4-2 ( 1

-2

5

2

is a covariance matrix.  [1 mark]

(b) Compute (by hand!) the (lower triangular) Cholesky factor for the matrix Σ . Show your work.  [2 marks]

(c) Let x = (Ⅹ1 ← Ⅹ2 ← Ⅹ3 )\ be a normal random vector with mean (1 ← 2 ← 3)\ and co- variance matrix Σ - Compute and plot the densities of the subvectors [i] (Ⅹ1 ← Ⅹ2 )\ ←

[ii] (Ⅹ1 ← 3 )\ ← and [iii] (Ⅹ2 ← Ⅹ3 )\ - In each of the three cases [i]– [iii], make a 3D sur- face plot and a contour plot, both on the square [-3 ← 7]2 .  Briefly comment on your findings.  [3 marks]

(d) Make a 3D surface plot and a contour plot for the mixture density 0-8f(X1,X2 )\ (21 ← 22 ) + 0-2f(X2,X3 )\ (21 - 1← 22 - 1)-

Looking at the plots, would you ever think they are of a simple normal mixture with just two components?  [1 mark]

Hint:  (c) This is a simple technical task that can easily be done using, say, MATHEMATIcA. One may wish to use any other suitable software package, of course.  (d) Ditto.