# Why are my VAR models working better with nonstationary data than stationary data?

I'm using python's statsmodels VAR library to model financial time series data and some results have me puzzled. I know that VAR models assume the time series data is stationary. I inadvertently fit a non-stationary series of log prices for two different securities and surprisingly the fitted values and in-sample forecasts were very accurate with relatively insignificant, stationary residuals. The $R^2$ on the in-sample forecast was 99% and the standard deviation of forecast residual series was about 10% of the forecast values.

However, when I difference the log prices and fit that time series to the VAR model, the fitted and forecast values are far off the mark, bouncing in a tight range around the mean. As a result, the residuals do a better job forecasting the log returns than the fitted values, with the standard deviation of the forecast residuals 15X larger than the fitted data series a .007 $R^2$ value for the forecast series.

Am I misinterpreting fitted vs. residuals on the VAR model or making some other error? Why would a non-stationary time series result in more accurate predictions than a stationary one based on the same underlying data? I’ve worked a good bit with ARMA models from the same python library and saw nothing like this modeling single series data.

• Two facts: (1) When you regress one random walk on another random walk and incorrectly assume stationarity, you almost always get highly statistically significant results, even if they are independent processes!. (2) If two variables are cointegrated, you can regress one on the other and your estimator will converge faster than usual regression, a result known as super-consistency. – Matthew Gunn Oct 2 '16 at 22:47
• Thank you very much. Fact #1 surely explains the results for the non-stationary series. The results from the stationary series certainly act as if they are showing what you called super-consistency, except that the two series aren't cointegrated, as far as I can tell. I ran a linear regression on the two price series and the residuals were far from stationary. So I would have to assume then that the VAR model is forecasting so poorly because the two return series aren't strongly cross auto correlated. The granger test confirms that also. – jpeginternet Oct 4 '16 at 14:22
• @MatthewGunn, your comment could better fit as an answer. – Richard Hardy Oct 26 '16 at 9:51

Pretending the usual OLS assumptions apply and regressing two independent random walks on each other will generally lead to regressions with huge $$R^2$$, highly significant coefficients, and it's all entirely bogus! When there's a random walk and you run a regression in levels the usual assumptions for OLS are violated, your estimate does not converge as $$t \rightarrow \infty$$, the usual central limit theorem does not apply, and the t-stats and p-values your regression spits out are all wrong.