Question: The following programming question is in R Studio, I've already done part (a) and the code is down below. Could you please help me with

The following programming question is in R Studio, I've already done part (a) and the code is down below. Could you please help me with part (b) and (c)? Thank you very much!

The following programming question is in R Studio, I've already done part

(a)

library(reshape2) library(imputeTS) library(tidyquant) library(readxl) library(e1071) library(bookdown)

#Data preparation price_data

(a) Download the daily prices of the Hang Seng Index from Jan 2, 2019 to Mar 30, 2020. Calculate the daily simple returns. (b) Let T be the number of returns in the data set in (a). Using a moving window of size m=250, predict t+1, the 1-day ahead volatility, and VaRt+10.01, the 1-day ahead 1% VaR using the data from tm+1 to t using the models: Model 1: GARCH(1,1)-N(0,1) model, Model 2: GARCH(1,1)t~(d) model for t=m,,T1. Plot time series of the predicted VaRt+10.01 from the two models in the same plot. (c) Plot time series of t+1min{Rt+1(VaRt+10.01),0} where Rt+1 is the return of HSI on date t+1, using the prediction obtained by models 1 and 2 in the same plot. Which model performs better

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!