1 / 15

S&P/TSX Capped Composite 4/26/2010 to 4/26/2013 Financials, energy, industries, materials

An ARCH(m) example. S&P/TSX Capped Composite 4/26/2010 to 4/26/2013 Financials, energy, industries, materials TSX listed stocks 4 banks. r ate log (ratio) volatility smo (y) lowess (y) lowess (|y – smo (y)|

rosina
Download Presentation

S&P/TSX Capped Composite 4/26/2010 to 4/26/2013 Financials, energy, industries, materials

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. An ARCH(m) example S&P/TSX Capped Composite 4/26/2010 to 4/26/2013 Financials, energy, industries, materials TSX listed stocks 4 banks

  2. rate log (ratio) volatility smo(y) lowess(y) lowess(|y – smo(y)| library(tseries)junk0<-scan("SPTXT.txt")p<-rev(junk0)y<-diff(log(p))ny<-length(y)par(mfrow=c(2,1))xaxis<-1:nyy<-ts(y,start=1,end=ny)plot(y,main="SPTXT 2010 to 2013",xlab="trading day",ylab="return")lunk<-lowess(xaxis,abs(y-mean(y)),f=.001)yabs<-ts(lunk$y,start=1,end=ny)plot(yabs,main="Smoothed abs(deviation)",xlab="trading day",ylab="")

  3. acf, pacf ARCH? par(mfrow=c(2,1))acf(y,main="ACF SPTXT returns",xlab="lag (days)")yy<-y-mean(y);yy<-yy^2pacf(yy,main="PACF SPTXT returns^2",xlab="lag (days)")

  4. Fitted conditional variance useful in forecasting plugin estimate of library(tseries)P<-5PP<-P+1junk1<-garch(y,order=c(0,P),grad="analytic")summary(junk1)par(mfrow=c(2,1))yvol<-ts(junk1$fit[,1],start=1,end=ny)plot(yvol,type="l",ylim=c(0,max(abs(y))),main=paste("Estimated volatility - ARCH",P),xlab="trading day",ylab="volatility") Standardized residuals yres<-ts(junk1$res,start=1,end=ny)

  5. one step ahead cdl se standardized

  6. Standardized residuals yres<-ts(junk1$res,start=1,end=ny)plot(yres,main="Residuals of ARCH(5)",type="l",xlab="trading day",ylab="return")

  7. plot(junk1$coef[2:PP],type="l",las=1,main="Coefficients",ylim=c(0,max(junk1$coef[2:PP])),ylab="coef")plot(junk1$coef[2:PP],type="l",las=1,main="Coefficients",ylim=c(0,max(junk1$coef[2:PP])),ylab="coef") ave<-mean(junk1$coef[2:PP]) abline(h=ave) junk1$asy<-sqrt(diag(junk1$vcov)) lines(ave+junk1$asy,lty=3) lines(ave-junk1$asy,lty=3)

  8. GARCH(m,r)

More Related