Individual Assignment - Reference

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 24

125.

811
Advanced Risk Analytics

Vietnam semester
2022

Total marks: 74 out of 100


Reward marks (correct workout in lectures) : +6
Final mark: 80 out of 100

Lecturer: Professor Hung Do


Student’s name: Nguyen The Minh Quang
Student’s ID: 21007981
Part I – Market Risk Modelling (70 marks)

GARCH model and Value-at-Risk (Review Week 4 Practice Note)

1. Get access to Yahoo Finance and download five-year historical daily prices of a stock or stock index.

2. Divide the sample into two sub-samples: in sample for model estimation, and out-of-sample for
forecasting. The length of the out-of-sample is two weeks (10 trading days)

3. (10 marks) Calculate the logarithm returns for the stock. Analyze the stock return characteristics,
including, return distribution, serial correlation, and volatility clustering for the in-sample period.

The chosen company which stock is going to be leveraged for performing tasks relating to the GARCH
model and Value-at-Risk in the Market Risk modelling section will be Synopsys, Inc. (“SNPS” or “the
Company”), with the time horizon for the five-year historical daily prices is from 01-Jan-2017 to 15-Dec-
2021 as the in-sample period and from 16-Dec-2021 to 30-Dec-2021 as the out-of-sample period. After
computing the returns of the stock prices, below are the key characteristics of the returns from the in-
sample period.

 Return distribution:

The Jarque-Bera statistic of APPL’ stock price returns is 1152.581 which is different from 0 indicating that
the data was not normally distributed. In particular, returns of APPL’ stock price is left-skewed with a
negative skewness statistic of -0.256, indicating the stock price was growing at a fairly moderate level
during the last 5 years. Furthermore, the distribution of the stock price’s returns had heavier tails than a
normal distribution (i.e., 7.68), indicating APPL’ stock price was volatile and sensitive to changes in the
market, which is represented via the Company’s slightly high beta of 1.22.

 Serial correlation:

As indicated in the summary of results from correlogram table below, it can be observed that there is a
serial correlation among APPL’s square stock price returns which is represented through either the high
Q-Stat or the p-value being very close to zero for all lags. Each lag represents a joint test to examine
whether at least one of the previous lags or the current one is significant to auto correlation (“AC”) (i.e.,
at least one pair of returns from lag 1 up to lag n experienced AC).

In addition, the AC effect can be captured using the ARMA model. For this particular case, the ARMA
(2,2) model was employed to significantly capture the AC effect as shown in the table below.
 Volatility clustering:

To test whether the returns of SNPS’s stock price experienced volatility clustering (i.e., ARCH effect), we
can either use the correlogram function to check for the AC effect of the squared returns or make
analysis based on a graph of the returns of APPL’ stock price.

As a result, the returns of the stock price experienced the ARCH effect. Similar to testing for auto
correlation, p-values of all lags indicates rejecting the null hypothesis of there is no ARCH effect.
Furthermore, the graph of APPL’s stock price returns also indicates the volatility clustering effect as
shown below, especially during the first quarter of 2020 when the COVID-19 started to spread.
4. (10 marks) Based on analyses in step 3, build an appropriate GARCH model for the return volatility
using the in-sample period and explain why the model specification is appropriate. (Note that: you may
not need to capture the serial correlation of the return level using ARMA model, but if you do so, you
can earn the reward mark of 5 marks). Coi cách explain GARCH model

From the analyses of the ARCH effect above, a GARCH model was built to capture such effect, using the
student t’s distribution since the data series was not normally distributed. As a result, the built model
was appropriate for further use in later sections since it successfully captured both the AC and the
volatility clustering issue of the Company’s stock price returns as shown below.
Second, we can look at the ARCH LM test (say choose lag 5, that is, we jointly test for the serial
correlation from time t-5 up to now)

Prob is also high, indicating the joint test shows evidence of insignificant serial correlation in the squared
standardized residual.
In summary, the GARCH(1,1) has captured the heteroskedasticity efficiently.

5. (10 marks) Fix the model specification you found in Step 4, fix the size of the in-sample period as the
window size, using 1-step (day) rolling window method to re-estimate the model, make 1-step ahead
forecasts of the volatilities, and calculate the 99% Value-at-Risk for the out-of-sample period.

After using the rolling window method to forecast for the estimation of GARCH, the 99% Value-at-risk
(“VAR”) would then be computed as equals to -2.33*GARCH estimation. Below is the table of the results
of calculating the VAR.
Out-of-sample GARCH 99% Value-at- Observed z-
period Date forecast risk returns Hits value
1 12/16/2021 0.00002 0.0% -2.4% 0 2.33
2 12/17/2021 0.00002 0.0% -1.4% 0
3 12/20/2021 0.00002 0.0% -0.5% 0
4 12/21/2021 0.00003 0.0% 3.7% 1
5 12/22/2021 0.00004 0.0% 1.6% 1
6 12/23/2021 0.00005 0.0% 0.4% 1
7 12/27/2021 0.00003 0.0% 2.6% 1
8 12/28/2021 0.00004 0.0% -0.9% 0
9 12/29/2021 0.00006 0.0% 0.3% 1
10 12/30/2021 0.00007 0.0% -0.7% 0
Hit rate: 50%

6. (5 marks) Graph the calculated 99% Value-at-Risk and the observed returns in one figure, calculate
the hits rate (hits =1 if a daily observed return is greater than the calculated 99% Value-at-Risk and hits
=0 otherwise; and ℎ𝑖𝑡𝑠 𝑟𝑎𝑡𝑒=Σℎ𝑖𝑡𝑠𝑁𝑡=1𝑁) and comment about the accuracy of the model.

99% Value-at-Risk
5.0%

4.0%

3.0%

2.0%

1.0%

0.0%
1 2 3 4 5 6 7 8 9 10
-1.0%

-2.0%

-3.0%

99% Value-at-risk Observed returns

From the graph and the table above, we can state that 50% of the time, the returns of SNPS’ stock price
will fall below the threshold of 0.0% with a 99% confident level. However, we cannot indicate that the
forecast model is insufficient since there are only 10 observations. With this model, financial practitioner
can better monitor their portfolios. As such, to enhance the performance of this model, more data and
stress tests are needed to truly reflect its performance.

Dynamic Conditional Correlation – Bivariate GARCH model (Review Week 5 Eviews Practice Note)

1. Using one pair of data (including the spot and futures price) from the given data file on stream (file
name: Data for assessment 2). Look at the first tab of the file for the assigned data.
2. (15 marks) Estimate their dynamic conditional correlation using the DCC-MGARCH (1,1) model.

The target commodity is sugar.

Before performing the GARCH model, we need to similarly test for the ARCH effect. With the result table
as below, we can observe that there is ARCH effect in returns of spot prices (“spot”) since all the p-
values up to the 10th lag are statistically significant

For the future price (“future”), there is no ARCH effect in the first lag of returns for future price since
prob. > 1%. However, there is ARCH effect in returns of future prices from the 2 nd lag since all the p-
values from that point are statistically significant
After performing the GARCH (1,1) model, we can observe that such model did not capture the ARCH
effect for returns of spot. Therefore, the GARCH (2,2) model was performed which resulted in the ARCH
effect being successfully captured.
On the other hand, the GARCH (1,1) model successfully captured the ARCH effects for returns of future
as shown below

After performing the GARCH models for returns on spot and future prices of sugar, the standardized
residual of spot and future (z1 and z2, respectively), the starting values of variance and covariance for
spot and future will then be generated using the “Generate series” function in eviews. Next, the
Maximum Log-Likelihood Estimation was applied to obtain the estimated theta 1 and theta 2, and the
DCC was generated via creating a LogL object.
As a result, we can observe that being a consumer staple good, which is necessary for consumers’ daily
lives, most of the DCC would fluctuate below 1, indicating that the market projects the prices of such
goods will either always grow or be maintained at the spot price even if the market is experiencing crisis.

3. (10 marks) Based on the estimated dynamic conditional correlation (𝜌𝑡) and estimated standard
deviation of the spot (𝜎𝑆,𝑡) and futures (𝜎𝐹,𝑡), calculate the dynamic optimal hedge ratio as follows:

ℎ𝑡∗=𝜌𝑡*(𝜎𝑆,𝑡/𝜎𝐹,𝑡 )
Similar to the DCC, the optimal hedge ratio also indicates that being a consumer staple goods
which is less likely to be impacted by distress in the market, the ratio would hover around the level
above 0 and around 1.

4. (10 marks) Identify at least one variable that significantly drives the dynamic optimal hedge ratio
(Hint: to prove the significance, you can use the OLS regression with dependent variable is the optimal
hedge ratio)

Part II – Credit Risk Modelling (30 marks)

1. Employ the Mortgage.sas7bdat and lgd.sas7bdat datasets downloaded from

http://www.creditriskanalytics.net/datasets.html

2. Build the best Probability of Default model you could and assess its performance. (15 marks)
Above are the results from estimating the Probability of Default (“PD”) model. As we can see, all the
explanatory variables are significant at 1% level of significance. In addition, all the variables are
appropriate in determining the dependence of default time with rationales as follows:

 FICO_orig_time has an appropriately negative coefficient, indicating that the lower a company’s
FICO score (a credit rating measurement for mortgage), the higher chance such company will
default on the borrowings.
 LTV_orig_time has an appropriately positive coefficient, indicating that the higher a company’s
Loan-to-Value ratio the higher the chance such company will default on the borrowings since
the higher the loan amount compared to the value of the appraised property the harder a
company be willing to recover the property back.
 gdp_time has an appropriately negative coefficient, since the better the economy is performing,
the lower the chance a company will go default on its loans.
 Interest_Rate_orig_time has an appropriately positive coefficient, indicating that the higher the
prime interest rate, which results in higher borrowing rate, the more difficult it is for firms to
meet their debt obligation, hence the default issues.
 hpi_orig_time has an appropriately positive coefficient since the higher the housing price, the
higher the chance of default on loans since it is more difficult for citizen to meet their
obligations.

3. Build the best Loss Given Default model you could and assess its performance. (15 marks)

You might also like