SP500 <- matrix(scan("../datasets/SP500",skip=15),ncol=5,byrow=T) SP500 <- rev(SP500[,5]) #closing prices SP500 <- as.numeric(SP500) t1_SP500[1:7075] t2_SP500[2:7076] retur_t2-t1 abretur_abs(retur) a1 <- acf(retur, lag.max = 500) a2 <- acf(abretur, lag.max = 500) ps.options(horizontal=F, width=4.4, height=2.5, reset=T) postscript("Fig27.ps", onefile=F, print=F) par(mfrow = c(1, 2),mar=c(3,2,2,1)+0.1, cex=0.2) par(mex=0.3,csi=0.11, mgp = c(1.4, 0.6, 0)) acf.plot(a1, main='(a) Difference', ylab='ACF') acf.plot(a2, main='(b) Absolute difference', ylab='ACF') dev.off()