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

Coursework Instructions

General information

In this coursework (15% of the final), you will work with a portfolio of 30 stocks, calculate 5 measures of VaR and assess VaR in back-testing.

1.   The data is the daily closing price of stocks traded on Shanghai and Shenzhen Stock Exchanges in the sample period from 20210104 to 20221031.

2.   The data source is CSMAR. Imposing the constraint that there is stock price data on each trading day we have obtained 3602 out of a total of 5131 stocks.

3.   Each student is randomly assigned 30 stocks for the analysis.

4.   See the data file “MTH305_CW2_data.xlsx”, where the sheet “Stock Close Price” is   stock code with daily closing price, and the sheet “Stock Assignment” is the 30 stock codes assigned to you.

5.   Let the module leader know if your name is not on the list.

Data Analysis

1.   Open the template MATLAB file “MTH305_CW2.m” and follow the instructions there.

2.   Import data and calculate the portfolio return. [15 marks]

3.   Calculate 5 measures of VaRs of your portfolio.

1)   historical simulation, equal weight [10 marks]

2)   historical simulation, EWMA weight [10 marks]

3)   historical simulation, volatility adjusted [20 marks]

4)   variance-covariance approach, equal weight [10 marks]

5)   variance-covariance approach, EWMA weight [ 15 marks]

4.   Assess VaR of 3. 4) in back-testing.

1)   Count exceptions. [10 marks]

2)   Hypothesis test. [10 marks]

MATLAB instructions

1.   Please do not change the name of variables.

2.   The function VaR_count.mcan be used to compute VaR in historical simulation.

3.   Typos in the MATLAB template file MTH305_CW2.m” .

1)   Line 53     : % The value of the portfolio is $10,000.     Should be: % The value of the portfolio is CNY10,000.

2)   Line 64     : % [L1       ]: (T-1)-by-1, loss of portfolio value in dollar Should be: % [loss1  ]: (T-1)-by-1, loss of portfolio value in CNY

3)   Line 80     : % [L2       ]: (T-1)-by-1, loss of portfolio value in dollar Should be: % [loss2  ]: (T-1)-by-1, loss of portfolio value in CNY

4)   Line 176: savefilename='results.mat';

Line 177: save results.mat y_price y_return loss1 weight1 VaR1 loss2 weight2 VaR2 loss3 weight3 VaR3...

4.   You need to use MATLAB only for the coursework, and please use the provided data

file only and work with the raw data in MATLAB.

Submission

1.   The submission deadline is Wednesday, 30 November, 3pm.

2.   Submit one zip file (student ID as file name) that contains the following files.

1)   MTH305_CW2.m that contains your work

2)   Any other function files you have used (not MATLAB built-in functions)

3)   results.mat (see instructions in MTH305_CW2.m)

3.   Submit one PDF file of MATLAB code in Submission 2. 1) and 2) at Turnitin.

4.   You can submit only ONCE.

5.   Late submission will have a penalty of 5 marks/day.

6.   Abnormal similarity of MATLAB code will be subjected to investigation as per the academic integrity policies, and in the worst case, resulting in Nil mark and the    disciplinary process.