I'm working with a time series of macroeconomic data (independent variables) and bank loss rates (dependent variable) to show how bank losses vary based on the state of the economy. What I'm doing is two-fold: I need to identify the most predictive economic indicators for my model and then I need to regress those variables against bank losses using OLS. The ultimate application of this is to forecast loss rates in varying economic climates.

One topic that has been coming up over and over again in terms of my model structure is regarding the stationarity of the data. As most on this board know, time series of economic data rarely pass stationarity tests. My question to everyone is how I should proceed in the event that my model does not satisfy stationarity test results.

Let's assume for the example below that I have a simply univariate model where Loss = a + B*UnemploymentRate + e. Please note that the univariate model is only for example - when I'm constructing the actual model, I use multiple economic variables in my regression.

Below is an example of my model construction process, and was hoping for feedback on what's wrong with my process

1: Cleaning the dependent data using decompose() in R

Because I'm using quarterly data, I want to remove seasonality as well as remove noise. I use the decompose() function to do this. My final dependent variable is the trend series shown in the plot below:

I don't clean the economic variable because I'm using the seasonally adjusted unemployment rate that's provided by Bureau of Labor Statistics.

2: Regress the variables

When I regress unemployment rate against bank losses, I get the following regression output:

                     Estimate Std. Error t value Pr(>|t|)    
(Intercept)       -1.236e-03  2.077e-04  -5.954 4.96e-08 ***
Unemployment Rate  3.762e-04  3.077e-05  12.225  < 2e-16 ***
Multiple R-squared:  0.6242,    Adjusted R-squared:   0.62 

The fitted results (red) vs. dependent variable (black) is plotted below. For a single factor model, the fitted results mostly capture the trend in my data:enter image description here

3: Validate the Results

Finally, I perform validation tests by testing my model residuals for a unit root using the PP test. As shown by the test below, the residuals have a unit root. However, if I were to perform a multivariate regression with more than one economic variable, I would greatly reduce the size of the residuals and mostly eliminate the autocorrelation of the residuals.

Phillips-Perron Unit Root Test

data:  na.omit(varDiff$residuals)
Dickey-Fuller Z(alpha) = -11.018, Lag parameter = 3, p-value = 0.47033

Third Party Feedback

When having internal reviewers evaluate my model, the review teams are latching on to the non-stationarity of my independent and dependent variables. Both variables show a clear presence of a unit root (when testing them using ADF.test or pp.test), and fail all test measures for stationarity. My question is two fold: 1) does the non-stationarity of my model variable's render these models void? 2) If so, what measures should I take to correct for the non stationarity?

I've thought about the second point a bit, and the two solutions I keep reading are cointegration and differencing. I've tried cointegration and these economic factors are not passing cointegration tests.

On the differencing side of the spectrum, below are the OLS results when I difference both the dependent and indendent variable: diff(Loss) = a + B*diff(UnemploymentRate) + e

                        Estimate Std. Error t value Pr(>|t|)    
(Intercept)             3.011e-06  1.530e-05   0.197    0.844    
diff(Unemployment Rate) 3.055e-04  4.439e-05   6.883 7.93e-10 ***
Multiple R-squared:  0.3474,     Adjusted R-squared:   0.34 

As you can see, the variable is still highly significant, but the R-squared drops to unacceptable levels. From a review standpoint, differencing solves the stationarity issue but creates a new finding as the reviewers would jump on the low fit statistics.

Given everything I've layed out, I want to see what modeling techniques I should consider moving forward?


2 Answers 2


There is nothing wrong with your OLS model. You are on the right track. It is well specified as the variables are differenced (if that is a word). So, they are fully detrended. Even if they do have remaining unit root issues (most macroeconomics time series even when fully differenced still have unit root issues), such unit root issues can be considered as benign and not affecting the results of your models. This type of mild unit root is easily resolvable by testing whether the residuals are stationary. More often than not, they are and you have a successful cointegration model. Actually, in such cases you should check whether you have a mild unit root on both sides of your regression equation (Y and at least one of the X variables). You most probably do.

The key thing is that you have to add independent variables to your model. You can't expect that one single independent variable can generate an adequate econometrics model.

A slightly different approach is to use the same overall approach but not deseasonalize your dependent variable. In such a case, you would use seasonal dummy variables among your independent variables. And, that will boost the R Square of your model a lot. And, this method is perfectly acceptable. I suspect most of the bank data and model outputs you submit to regulators, peer reviewers, accountants is not adjusted for seasonality. This would justify using this approach.

  • $\begingroup$ most macroeconomics time series even when fully differenced still have unit root issues That is too broad a statement. I would say there are few such variables, e.g. prices, but not much more. $\endgroup$ May 12, 2017 at 7:41
  • $\begingroup$ Thank you for this - I've thought the same that my model is well specified, but I think my issue has been more on the documentation side in that I have been doing a bad job defending why its okay for my Y and X to not pass formal stationarity tests. If I go for the cointegration defense for why non-stationarity is okay, then I need the residuals of my model to be stationary, correct? I ask because in the above regression, the residuals are not stationary. $\endgroup$
    – RLH
    May 12, 2017 at 15:31
  • $\begingroup$ RLH, you are correct. Your residuals have to be stationary. But, given that your model is currently totally incomplete (just one single independent variable); it can be expected that your residuals are not stationary. First, complete your model, make sure residuals are stationary. Test your model. Then you are ready for documentation. Not before. Remember, if you just take your detrended Y data before seasonally adjusting the data. And, model that data using seasonaly dummy variables; then your residuals will most probably be stationary. $\endgroup$
    – Sympa
    May 12, 2017 at 21:56

Non-stationarity of variables can be an issue, it can lead to spurious regressions. It's a well known trap in regression analysis. The typical undergrad level solution is to difference the series. All unit roots will magically disappear and you can continue modeling. Your $R^2$ will tank, of course. That's a simplistic world view which is shared by many model validation folks.

There are two problems with this kind of approach. The first is cointegration. It's an involved discussion, so I won't go into details. It happens so that when the variables are in some kind of a long term relationship, it's Ok to run a regression on levels (without differencing) and get meaningful results. You could apply error correction models and do other fancy stuff too.

I'd argue that yours is precisely the case where cointegration is to be suspected. Consider this: both bank losses and unemployment rate could be consequences of a bigger economy wise phenomenon. The losses are caused by businesses and other clients unable to pay the loans. Unemployed people do not pay loans. Struggling business both are late with loan payments and layoff employees. There's clearly going to be a relationship between unemployment and losses, hence, the cointegration, hence differencing is probably a wrong medicine.

The second issues is the unit root testing itself. Do you really think that unemployment and loss rates have unit roots? Both are bounded (zero to one) variables how likely are they to have unit roots? I'll argue that they're mean reverting stationary processes. Think of something like Ornstein-Uhlenbek process. In the short term they behave like random walks, but in long-term they're stationary. So, if you have more than business cycle data, is differencing appropriate at all? I'd say, no, and stick with levels.

  • $\begingroup$ You could also note that $R^2$ are not comparable for levels vs. differenced variables. So it will not tank in the sense that it will be measuring a different thing. The $R^2$ on levels will not be comparable to the one on first differences. $\endgroup$ May 12, 2017 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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