0
$\begingroup$

Let's say you want to measure intra day autocorrelation from 9:30 am to 1pm using 5-minute prices should you calculate the autocorrelation using raw prices or log returns (i.e. diff(log(prices)))? Can you explain?

Below is an example showing using price recognizes high serial autocorrelation in the price while log returns does not recognize it.

set.seed(12345)
###auto correlation in price
r =rep(seq(1,20,1),20)
plot(r,type='l')
acf(r, lag.max= 1)$acf #this DOES recognize the price dynamics of high serial correlation for runs of 20 at a time
arima(r, c(1,0,0))


### autocorrelation in log returns
r =diff(log(rep(seq(1,20,1),20)))
plot(r,type='l')
acf(r, lag.max= 1)$acf   #this DOES NOT recognize the price dynamics of high serial correlation for runs of 20 at a time
arima(r, c(1,0,0))
$\endgroup$
2
$\begingroup$

The high serial correlation you are getting in the first case is a spurious correlation. The correct way to do it is with returns. The price series has a unit root. You need to take diff(log(prices))) in order to have a stationary time series, on which you can then estimate autocorrelations, auto regressive coefficients, etc. properly. This was shown by Granger and Newbold in their paper 'Spurious Regression in Econometrics' (1974).

To test this yourself, generate uncorrelated returns yourself by monte carlo and the corresponding prices. Compute the correlation both ways. The return correlations will be near zero [correctly so], the price correlations will be biased and will often appear to be significantly different from zero.

$\endgroup$
  • $\begingroup$ In that paper by Granger he is bascially stating do not do regression with autocorrelated errors. Instead make things stationary in order to get a robust model for forecasting, valid coefficients and significance tests. In my case I am not actually doing a regression using the autocorrelated time series. I acutally want to measure that degree of autocorrelation. Granger says "As regards economic time series, one typically finds a very high serial correlation (cont.) $\endgroup$ – joesyc Aug 18 '15 at 16:05
  • $\begingroup$ (...continuted)"between adjacent values, particularly if the sampling interval is small, such as a week or a month. This is because many economic series are rather ‘smooth’, with changes being small in magnitude compared to the current level. " So Granger recognizes there IS valid autocorrelation in the what he calls "no change" series. I want to measure that degree of autocorrelation so i am leading towards using price. Thoughts? $\endgroup$ – joesyc Aug 18 '15 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.