0
$\begingroup$

As my previous questions I'm trying to solve a problem with my stocks tests. I tried Breusch-Pagan test for heteroscedasticity but some residuals still pass these tests.

My procedure is:

  • Get two stocks prices (I have a matrix with two columns that represent the price lists)

  • I do a linear regression, like: lm(prices[,1] ~ prices[,2])

  • Then I test the residuals of the linear regression with Unit Root tests (PP and KPSS)

  • After these tests I do Breusch-Pagan test because I only need to work with stocks that have constant variance during all the period. I do: bptest(prices[,1] ~ prices[,2])

Ok, now I still get strange results, with strange i mean that when i plot the residuals i see that the variance is not constant (take a look at the chart below). So now, I need to understand how better test is the variance is constant.

I read someone use GARCH (1,1) but I never used it, could someone exmplain it or maybe give me other tests to try?

enter image description here

$\endgroup$
  • $\begingroup$ This is not a new question. If you wanted to add the part about to GARCH, you should edit your original question, which will bump it back up in the list. Plus, what happened to the approach that we came up with in chat? $\endgroup$ – Charlie Sep 15 '11 at 14:02
  • $\begingroup$ i'm in chat @Charlie, if you came I will explain the problem $\endgroup$ – Dail Sep 15 '11 at 14:41
  • 1
    $\begingroup$ Your problem is far worse than non-constant variance: obviously the means of the residuals vary strongly with the 'index'. GARCH will not be the cure! $\endgroup$ – whuber Sep 15 '11 at 16:30
4
$\begingroup$

As a follow-up to the chat that Dail and I had regarding his first question...

A key assumption is that the variables in the model, not just the residuals, do not have unit roots. Upon testing, we see that the price variables do have unit roots. As a result, you can get biased answers (see CV question on spurious causation). Hence, your model is likely biased. Fixing the standard errors, as @whuber says in the comments, ignores far worse problems.

I recommended taking first differences of each variable and regressing one on the other. This gets around the spurious causation problem. In this regression, the residuals did not have any autocorrelation and did not exhibit heterogeneity. A plot of the residuals did not show any temporal patterns. Further, this model has an algebraically identical interpretation as your original one. See that $$\begin{align*} y_t &= \alpha + \beta x_t + \epsilon_t \\ - y_{t-1} &= -\alpha -\beta x_{t-1} -\epsilon_{t-1} \\ \Delta y_t &= \beta \Delta x_t + \Delta \epsilon_t \end{align*} $$ Technically, this implies that you shouldn't have an intercept term in this regression, but I think that it's generally a good idea to include one (and, in your example, the intercept term is small anyway, so it doesn't matter much).

This model displays the necessary properties to get good regresssion results while maintaining the interpretation that you are looking for.

I am reluctant to make any new suggestions (GARCH, etc), as @whuber said, because you haven't fixed any of the primary problems with your model.

$\endgroup$
  • 2
    $\begingroup$ (+1) I think the RHS of the second equation needs some more negative signs though! $\endgroup$ – Andy W Sep 15 '11 at 18:28
  • $\begingroup$ Oh, okay, I'll add those in. I was thinking of the one in front as a negative for the whole equation, but I see what you mean. $\endgroup$ – Charlie Sep 15 '11 at 20:02

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.