4
$\begingroup$

I always face a dilemma on whether to assume prices to have a time trend or not while modelling. It is also partly a statistics problem. Let me explain. Assume I have time series, $y_t$ of price of a commodity which on plotting appears to be having an upward slope (which is after all true for majority of items).

When I apply unit root test without drift, the result is non-rejection of unit root. However, if I include a drift term, the result is rejection of unit root.

Now, if the true process is random walk without drift, inclusion of drift is very likely to incorrectly reject the null (below is a simulation study that shows that if the true process is pure random walk, inclusion of drift rejects the null around 34% of times). The red-line is the distribution of t-statistic when ADF test is applied with drift, and blue-line when applied without drift (which is the true process).

enter image description here

(the vertical line is the 0.05 quantile value for DF-distribution - blue curve)

Now if the series did have a time trend (without unit root), ADF test (without drift) almost never rejects the null of unit root.

Hence the dilemma. My take is that the answer (whether trend is stochastic or deterministic) has to come from theory. So the question boils down to Why should prices have a deterministic trend? What economic dynamics would justify modelling the series as, say AR(1) process with time trend?

Code:

'%>%'=magrittr::'%>%'
n=1e4
tt_coef = 0.1

ar1 = function(phi, n=1000, tt=0, tt_coef=0,sd) {
  y = numeric(1000+100)
  for (i in 2:length(y)) {
    y[i] = phi*y[i-1] + tt*tt_coef*i + rnorm(1,mean = 0, sd = 1)
    }
  return(tail(y,n)) # first 100 observations burned to remove impact of initial condtns
}

samples_tt = replicate(n,ar1(phi = 0.7,tt = 1, tt_coef = tt_coef, sd = 8),simplify = F)
df_stats_tt = lapply(samples_tt, function(x) urca::ur.df(x,lags = 0,
                                                         type = 'none')@teststat) %>%
  unlist()

samples_rw = replicate(n,ar1(phi = 1, sd = 1),simplify = F)
df_stats_rw = lapply(samples_rw, function(x) urca::ur.df(x,lags = 0,
                                                         type = 'none')@teststat) %>%
  unlist()

df_stats_drift = lapply(samples_rw, function(x) urca::ur.df(x,lags = 0,
                                                            type = 'drift')@teststat[,1]) %>%
  unlist()

sum(df_stats_drift<quantile(df_stats_rw, probs = 0.05))/n
sum(df_stats_tt < quantile(df_stats_rw, probs = 0.05))/n


plot(density(df_stats_drift), type = 'l', lwd = 2, 
     col = 'red', main = 'DF-Distribution', xlab = '')
lines(density(df_stats_rw), type = 'l', lwd = 2, col = 'blue')
abline(v = quantile(df_stats_rw, prob = 0.05))
legend('topleft', legend = c('Without Drift', 'With Drift'), 
       col = c('blue', 'red'), lwd = 2, bty = 'n')
$\endgroup$
3
  • $\begingroup$ +1, I overall think it is a interesting question but it could be still improved if you would first attempt to look at the literature for the solution/partial solution and build the question on that. $\endgroup$ – 1muflon1 Mar 7 at 9:40
  • $\begingroup$ @1muflon1: I have tried to do that and in what I could find is that most of the time prices are modelled as random walk (without drift). But then there are papers which (without giving economic justification) allow for drift term - for example by adding an intercept term in ECM. $\endgroup$ – Dayne Mar 7 at 9:44
  • 1
    $\begingroup$ sometimes even if books/papers do not offer solution it is good if you mention you had look at them because then people know what you already know or what other arguments you looked at but found unconvincing. It will help them to give you better answer $\endgroup$ – 1muflon1 Mar 7 at 9:46
0
$\begingroup$

Should Prices (or Price Indices) be modelled with deterministic trend?

Often yes. Prices could have time trend for various reasons. For example, the most obvious one is inflation. While inflation is the increase in aggregate prices not necessary in every individual one, aggregate price level would not increase if significant number of prices would not. Thus you would expect prices to have upward time trend in many prices in any country experiencing inflation. For this reason when people analyze CPI they typically test unit root hypothesis against trend stationary (often even with non-linear trends like in Bierens 1997)

The CPI logic might not be applicable to every single individual price, some of them might happen to be stable, but it can be extended to many individual prices.

The rationale for trend in CPI is simply that central banks target increase in CPI, so you would expect it to have positive trend because based on economic theory central banks are able to control (with more or less precision) inflation (see various rigorous models of this in Romer Advanced Macroeconomics). If on the other hand central banks would target $0\%$ inflation you would not want to include the trend.


Edit: In response to question about inclusion of drift term where there is no trend it does not lead to bias in general. To explain this consider the Dickey-Fuller test and its mechanics:

The DF test with drift is given as:

$$\Delta Y_t = \delta + (\theta-1) Y_{t-1} +\epsilon$$

Now this is at its hart estimated just by OLS. Consequently, if the model is supposed to have drift but you exclude it and estimate $$\Delta Y_t = (\theta-1) Y_{t-1} +\epsilon$$ you will bias your estimation of $(\theta-1)$, but the converse will not hold. If you estimate $\Delta Y_t = \delta + (\theta-1) Y_{t-1} +\epsilon$ but series has no drift then in expectations $\delta$ will just be zero and estimation of $(\theta-1)$ will not be biased. This is crucial because even though we do not care about $(\theta-1)$ per se but about value of the DF test, if $(\theta-1)$ is estimated in a biased manner any subsequent DF statistics is useless (also note running auxiliary DF test and examining if $\delta$ is significant and close to zero or not is cheap way of quickly assessing if it is important).

Now when it comes to $t$ values from DF test you have to realize that you are not using critical values based of DF distribution. Under the null the DF test distribution is non-standard so appropriate critical values have to be tabulated using Monte-Carlo simulations for the non-standard distribution that holds under the null (see Verbeek, A Guide to Modern Econometrics. pp 292).

The correct critical values for DF test with trend and with drift are given in the table below (from ibid).

enter image description here

The table does not include appropriate value for specification with no drift but I found that here.

You will note if you apply these appropriate critical values to the distribution of $t$-statistics of DF test from your simulations you will find that areas in the tail are virtually identical between the DF test with and without drift. The area left of green line $t^* = -2.87$ below red dist. is very close to the area left of orange line $t^*=−1.942$ below blue dist*.

The areas wont be exactly same of course, and using DF test with drift will in marginal cases lead to incorrect inferences, so you are right into being interested in theoretical reasons for whether there should be drift or no if you want to be pedantic about it (which you should - don't get me wrong). However, this being said, whenever in doubt you should use DF with drift, because excluding it might lead to bias in $\theta-1$ itself and at that point any inferences are completely useless and it is not possible to even get right $t$-stat since $DF_t= \frac{\hat{\theta}-1}{se(\hat{\theta})}$ - if you get numerator wrong then that is the end.

enter image description here

*: note I modified the code to have only 500 observations so I can apply appropriate critical values. In addition, I change the series to be just random walk because there is no qualm that non-drift version is wrong if there is a drift.

$\endgroup$
26
  • $\begingroup$ I think I wasn't clear enough in my question. (1) the fact that random walk process doesn't necessarily has an upward slope, is actually a motivation of this question. Given that most prices have an upward slope - modelling them as random walk without drift seemed a little uncomfortable (as they seem to be representing only a subset of possibilities). $\endgroup$ – Dayne Mar 7 at 11:11
  • $\begingroup$ (2) Your example of that price can be modelled is cumulative sum of past errors is just assuming it to be random walk without drift. The problem is I am looking for economic justification of also including a time trend in that equation. $\endgroup$ – Dayne Mar 7 at 11:13
  • $\begingroup$ @Dayne you can have random walk with a time trend (here that would be the changes in price due to shocks + trend caused by inflation). I will edit that in my answer but you should edit, your question - also this is an example why some evidence of prior search would help as that would clarify your question right away $\endgroup$ – 1muflon1 Mar 7 at 11:13
  • $\begingroup$ (3) The economic justification of the argument that time trend can be because of inflation is exactly what I am looking for. If an item has a time trend because of inflation, then it makes the argument circular as what would explain a time trend in the index? $\endgroup$ – Dayne Mar 7 at 11:16
  • 1
    $\begingroup$ sure. I'll add the code below the question. $\endgroup$ – Dayne Mar 7 at 13:28

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.