Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • help with lags and autocorrelation

    Hello!!! So i am trying to choose how many lags to do, and someone helped me with some code but i don't know how to interpret it..
    I have daily data for stock returns for two cities

    they've looked at the PACF and ACF (code is: "ac" and "pac") as well as done:
    "dfuller returns, lags(12) regress"

    they also put all 12 lags in the regression, like this:
    "regress returns cloud temp sunhour l(1/12).returns i.month"

    How do I choose the number of lags using all this? is it with whichever has a significant p>z value ?
    or do i count on the pacf or acf graph and if so do i use pacf or acf?

    they also did
    lmalb returns, lags(5)

    please help, im stuck on this!!


  • #2
    Hi Selina,

    I would first advice you to have a look at the FAQ where they say to report Stata codes using delimiters. You can do it by clicking the "#" symbol.
    Your question is more about textbook theory rather than coding, so my advice would be to look up on Google/books. Said this,

    - Both ACF and PACF provide you a graphical interpretation of the autocorrelation. It is mostly used for residuals. The idea behind is that autocorrelation should decay to zero quite quickly. If you see a slow decay then you have problems of autocorrelation.

    - dfuller is a test of stationarity of the time-series. You might consider trying different lag lengths and see if you have a rejection of the null hypothesis of a unit root. It is more concerning the presence of a trend and/or a drift, rather than the lag length. If you have returns then you already have a differenced series (by taking the difference of subsequent log prices). In my experience, although very little, I have almost never seen a non-stationary series of returns unless for very very long time periods. REMEMBER: do not perform any linear models on non-stationary time-series.

    - To assess the optimal lag length you might consider using varsoc

    - Alternatively, you can try to fit a model such as AR, MA, ARMA, ARIMA and choose the optimal lag length using the AIC criterion. Your best model is the one that minimizes AIC.

    Hope this helps

    Stefano

    Comment

    Working...
    X