T05 GARCH_3 example

pptx

School

Georgia Institute Of Technology *

*We aren’t endorsed by this school

Course

6402

Subject

Industrial Engineering

Date

Dec 6, 2023

Type

pptx

Pages

23

Uploaded by ConstableGazelle2633

Report
I. Exchange Rates Prediction: ARCH Modeling II. Exchange Rates Prediction: ARMA+GARCH Modeling III. Exchange Rates Prediction: Comparing Predictions Time Series Analysis: Modeling Heteroskedasticity (3): Examples ARCH ARMA GARCH compare
# What order? pacf(resids^2, ,main="Squared Residuals") # Fit ARCH model of order 8 library(tseries) garch.fit = garch(resids, order = c(0,8),trace=F) summary(garch.fit) #Evaluate goodness of fit resids.fgarch = residuals(garch.fit)[-c(1:7)] resids.fgarch=resids.fgarch[!is.na(resids.fgarch)] par(mfcol=c(2,1)) acf(resids.fgarch,main="ACF of ARCH Residuals (USD/EUR)") acf(resids.fgarch^2,main="ACF of Squared ARCH Residuals (USD/EUR)") Box.test(resids.fgarch,lag=9,type='Ljung',fitdf=8) Box.test(resids.fgarch^2,lag=9,type='Ljung',fitdf=8) ARCH Fit ARCH ARMA GARCH compare
ARCH Fit: Summary (USD/EUR) Order: p=8 All coefficients are statistically significant Reject the null of uncorrelated residuals but do not reject for squared residuals ARCH ARMA GARCH compare
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
ARCH Fit: Summary (USD/BRL) Order: p=6 All coefficients are statistically significant Reject the null of uncorrelated residuals but do not reject for squared residuals ARCH ARMA GARCH compare
ARCH Fit: Residual Analysis ACF of White Noise ACF of White Noise ARCH ARMA GARCH compare
I. Exchange Rates Prediction: ARCH Modeling II. Exchange Rates Prediction: ARMA+GARCH Modeling III. Exchange Rates Prediction: Comparing Predictions Time Series Analysis: Modeling Heteroskedasticity: Examples ARCH ARMA GARCH compare
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
#GARCH Order Selection library(rugarch) #Select model with smallest BIC final.bic = Inf final.order = c(0,0) for (m in 0:3) for (n in 0:3){ spec = ugarchspec(variance.model=list(garchOrder=c(m,n)), mean.model=list(armaOrder=c(6, 3), include.mean=T), distribution.model="std") fit = ugarchfit(spec, data.train, solver = 'hybrid') current.bic = infocriteria(fit)[2] if (current.bic < final.bic){ final.bic = current.bic final.order = c(m, n) }} GARCH Order Selection Selected Orders for modeling the conditional variance : m=1, n=2 USD/EUR case ARCH ARMA GARCH compare
#Refine the ARMA order final.bic = Inf final.order.arma = c(0,0) for (p in 0:6) for (q in 0:6){ spec = ugarchspec(variance.model=list(garchOrder=c(1,2), mean.model=list(armaOrder=c(p, q), include.mean=T), distribution.model="std") fit = ugarchfit(spec, data.train, solver = 'hybrid') current.bic = infocriteria(fit)[2] if (current.bic < final.bic){ final.bic = current.bic final.order.arma = c(p, q) } } ARMA Order Selection (refined) Selected Orders for modeling the conditional mean : AR=0, MA=0 USD/EUR case ARCH ARMA GARCH compare
#Refine the GARCH order final.bic = Inf final.order.garch = c(0,0) for (m in 0:3) for (n in 0:3){ spec = ugarchspec(variance.model=list(garchOrder=c(m,n)), mean.model=list(armaOrder=c(final.order.arma[1], final.order.arma[2]), include.mean=T), distribution.model="std") fit = ugarchfit(spec, data.train, solver = 'hybrid') current.bic = infocriteria(fit)[2] if (current.bic < final.bic){ final.bic = current.bic final.order.garch = c(m, n) } } GARCH Order Selection (refined) USD/EUR case Selected Orders for modeling the conditional variance : m=1, n=2 ARCH ARMA GARCH compare
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Order Selection: Comparison ARMA(6,3)+GARCH(2,1) ARMA(0,0)+GARCH(2,1) ARMA(0,0)+GARCH(2,1) USD/EUR currency USD/BRL currency USD/CYN currency ARMA(9,8)+GARCH(1,1) ARMA(0,0)+GARCH(1,1) ARMA(0,0)+GARCH(1,1) ARMA(9,1)+GARCH(3,3) ARMA(1,0)+GARCH(3,3) ARMA(1,0)+GARCH(3,3) ARCH ARMA GARCH compare
ARMA+GARCH: Goodness of Fit #Goodness of Fit spec.1 = ugarchspec(variance.model=list(garchOrder=c(1,2)), mean.model=list(armaOrder=c(6,3), include.mean=T), distribution.model="std") final.model.1 = ugarchfit(spec.1, data.train, solver = 'hybrid') spec.2 = ugarchspec(variance.model=list(garchOrder=c(1,2)), mean.model=list(armaOrder=c(0,0), include.mean=T), distribution.model="std") final.model.2 = ugarchfit(spec.2, data.train, solver = 'hybrid') #Compare Information Criteria infocriteria(final.model.1) infocriteria(final.model.2) ARCH ARMA GARCH compare
ARMA+GARCH: Goodness of Fit (cont’d) Both models perform similarly: choose least complex model USD/EUR USD/BRL USD/CNY ARCH ARMA GARCH compare
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
I. Exchange Rates Prediction: ARCH Modeling II. Exchange Rates Prediction: ARMA+GARCH Modeling III. Exchange Rates Prediction: Comparing Predictions Time Series Analysis: Modeling Heteroskedasticity: Examples ARCH ARMA GARCH compare
#Prediction of the return time series and the volatility sigma nfore = length(data.test) fore.series.1 = NULL fore.sigma.1 = NULL for(f in 1: nfore){ data = data.train if(f>2) data = c(data.train,data.test[1:(f-1)]) final.model.1 = ugarchfit(spec.1, data, solver = 'hybrid') fore = ugarchforecast(final.model.1, n.ahead=1) fore.series.1 = c(fore.series.1, fore@forecast$seriesFor) fore.sigma.1 = c(fore.sigma.1, fore@forecast$sigmaFor) } Computing Prediction ARCH ARMA GARCH compare
Prediction Accuracy (USD/EUR) ARMA-GARCH Model 2 performs best for all measures ARCH ARMA GARCH compare
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Prediction Accuracy (USD/BRL) ARMA+GARCH Model 2 performs best across all measures ARCH ARMA GARCH compare
Prediction Accuracy (USD/CYN) ARMA+GARCH Model 2 performs best across all but MAPE measures ARCH ARMA GARCH compare
#Mean Prediction Comparison Plots ymin = min(c(as.vector(data.test),fore.series.1,fore.series.2)) ymax = max(c(as.vector(data.test),fore.series.1,fore.series.2)) data.plot = data.test names(data.plot)="Fore" plot(data[c(n-53):n],type="l", ylim=c(ymin,ymax), xlab=" ", ylab="USD/EUR Exchange Rate",main="Mean Prediction Comparison (USD/EUR)") data.plot$Fore=fore.series.1 points(data.plot,lwd= 2, col="blue") data.plot$Fore=fore.series.2 points(data.plot,lwd= 2, col="brown") Mean Prediction Comparison ARCH ARMA GARCH compare
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Mean Prediction Comparison ARCH ARMA GARCH compare
#Compare squared observed time series with variance forecasts ymin = min(c(as.vector(data.test^2),fore.sigma.1^2,fore.sigma.2^2) ymax = max(c(as.vector(data.test^2),fore.sigma.1^2,fore.sigma.2^2)) plot(data.test^2,type="l", ylim=c(ymin,ymax), xlab=" ", ylab="USD/EUR Exchange Rate") data.plot$Fore=fore.sigma.1^2 points(data.plot,lwd= 2, col="blue") data.plot$Fore=fore.sigma.2^2 points(data.plot,lwd= 2, col="brown") Variance Prediction Comparison ARCH ARMA GARCH compare
Variance Prediction Comparison ARCH ARMA GARCH compare
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Other Models: R Implementation #GARCH spec.1 = ugarchspec(variance.model=list(garchOrder=c(1,2)), mean.model= list(armaOrder=c(0,0), include.mean=T), distribution.model="std") #GJR-GARCH spec.2 = ugarchspec(variance.model=list(model = "gjrGARCH",garchOrder=c(1,2)), mean.model=list(armaOrder=c(0,0), include.mean=T), distribution.model="std") #EGARCH spec.3 = ugarchspec(variance.model=list(model ="eGARCH",garchOrder=c(1,2)), mean.model=list(armaOrder=c(0,0),include.mean=T), distribution.model="std") #APARCH spec.4 = ugarchspec(variance.model=list(model = "apARCH",garchOrder=c(1,2)), mean.model=list(armaOrder=c(0,0), include.mean=T), distribution.model="std") #IGARCH spec.5 = ugarchspec(variance.model=list(model = "iGARCH",garchOrder=c(1,2)), mean.model=list(armaOrder=c(0,0), include.mean=T), distribution.model="std") ARCH ARMA GARCH compare
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Variance Prediction Comparison ARCH ARMA GARCH compare
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help