1

Suppose I am looking to forecast the 2 Year Treasury Bond rate with an ARIMA type model. The series is I(1) but its first difference does not look stationary due to non-constant variance. A general rule of thumb is that one way to stabilize the variance is to take the natural log of the series. Is there anything wrong with taking the natural log of an interest rate series? I don't see it done much and I don't understand why. If not, then in this case, the solution could be to take the natural log first and then first difference it to obtain a stationary looking series.

Here is a professor's opinion (that I do not agree with), in which he says "taking logs of an interest rate is pointless (no exponential trend to linearize), taking logs of an exchange rate can make sense (it can stabilize the variance of the time series)." https://www.researchgate.net/post/Log_transformation_of_variables_in_Rates_or_percentage/58f340875b4952592f7d0ff5/citation/download

Here's a sentence from Brockwell and Davis (page 14)"...if the magnitude of the fluctuations appear to grow roughly linearly with the level of the series, the the transformed series {lnX1,...,lnXn} will have fluctuations of more constant magnitude... If some of the data are negative, add a positive before taking logarithms". So negative rates aren't really much of a concern. We can add 1000 to every rate and move forward.

Here's prof. Hyndman on the topic: "Plot a graph of the data against time. If it looks like the variation increases with the level of the series, take logs. Otherwise model the original data." No statement about how this does not apply to interest rates. https://stats.stackexchange.com/a/6333/198058

I followed prof. Hyndman's advice and plotted the data. The variation decreases with the level - therefore I took the log.

ColorStatistics
  • 2,699
  • 1
  • 10
  • 26
  • 2
    I think there could be a problem since the log function changes very quickly for values close to 0. Also, if your rates ever go negative log would be undefined. A less 'harsh' variance stabilizing transformation you could try is the square root transformation (although does not help with the negative rate case). – David Veitch Sep 14 '21 at 17:47
  • Good points, David. To try to focus my question, let's assume that the series always stays positive (I believe the 2 year treasury bond rate has always stayed positive). – ColorStatistics Sep 14 '21 at 17:55
  • In ARIMA modeling, the goal of such a pre-transformation before removing the deterministic trend and deterministic seasonality (in this case there is none) is to obtain a stationary residual. Suppose that taking the natural log of the 2 year treasury rate and then first differencing it has accomplished just that - it produces a stationary looking residual. Anything wrong with proceeding this way? – ColorStatistics Sep 14 '21 at 17:59
  • 2
    Let’s say that a very low interest rate is of the order of 0.1% and a high interest rate of the order of 10%, so a range of two orders of magnitude. Then logarithmic thinking commits you to regarding the difference between 0.1 and 1% as equivalent to that between 1 and 10%. I know as an individual in the economy I don’t believe that at all; the deeper question is surely whether e.g. firms, sectors, economies behave that way. What does your data tell you? If interest rates are negative, cube roots, neglog and asinh are available, but the doubt remains. – Nick Cox Sep 14 '21 at 18:28
  • Thank you, Nick. I wanted to have an informed contrarian perspective such as yours on the table for discussion. Let's go back to the objective of pre-transforming a series - we want to obtain stationary residuals. I don't see a single textbook inserting cautionary remarks that this does not apply to interest rates. Taking the log of the interest rate and then first differencing accomplishes that. The objective of a pre-transformation in ARIMA is solely to obtain a stationary residual. Done. I don't see why the concerns you raise would have to be heeded by the forecaster. Maybe you can expand. – ColorStatistics Sep 14 '21 at 18:39
  • The advice to take a log when the spread increases with the level only sometimes works. It is a crude simplification of a principled, theoretically-justified method used in Exploratory Data Analysis, the [spread vs. level plot](https://stats.stackexchange.com/a/74594/919). For the theory, see https://stats.stackexchange.com/a/66038/919. – whuber Sep 14 '21 at 19:06
  • Thank you, whuber. I appreciate what you're saying, but I want to steer away from the question of level vs. spread and refocus on the mission in forecasting with ARIMA - obtain stationary residuals. Brockwell and Davis (page 12) "Remove the trend and seasonal components to get stationary residuals. To achieve this goal it may sometimes be necessary to apply a preliminary transformation to the data." I did just that; taking logs and then first differencing accomplished the goal of producing a stationary series. First-differencing alone doesn't because the variance is not constant. – ColorStatistics Sep 14 '21 at 19:21
  • 1
    Have you looked at `auto.arima()` in the `forecast` package for R (whose author is precisely Rob Hyndman)? It will try to fit an appropriate Box-Cox transformation, which is more general than the log. Also, do remember the bias adjustment if you back-transform forecasts. See https://otexts.com/fpp3/ftransformations.html. – Stephan Kolassa Sep 14 '21 at 20:12
  • Those are both excellent points, Stephan. I will keep them in mind. As you point out, Box-Cox is a more systematic way to find the best transform. I accidentally noticed that taking the log and then first differencing turns out be a transformation that works in this case, because it produces stationary residuals. Can I proceed? I will need to keep in mind the back-transform bias (again excellent point that I was not fully aware of). – ColorStatistics Sep 14 '21 at 20:25
  • If you want to "obtain stationary residuals," then the level vs. spread plot is *the* diagnostic tool to use. It indicates a useful range of Box-Cox parameters to apply. – whuber Sep 15 '21 at 13:09
  • @whuber: I'll trust your opinion on that. I cannot comment on it one way or another as I haven't had the time to read your post in detail. – ColorStatistics Sep 15 '21 at 13:49
  • What you're saying is you're uninterested in a full, effective answer to your problem. – whuber Sep 15 '21 at 14:43
  • @NickCox: Thank you for helping me see the light. I think you hit the nail on the head. – ColorStatistics Sep 16 '21 at 17:38

2 Answers2

3

Let’s say that a very low interest rate is of the order of 0.1% and a high interest rate of the order of 10%, so there is a likely range of say two orders of magnitude.

Then logarithmic thinking commits you to regarding the difference between 0.1 and 1% as equivalent to that between 1 and 10%. Is that sensible or accurate economically?

I know as an individual in the economy I don’t believe that at all. I use logarithmic thinking in thinking about house prices -- participants play with adding or subtracting large sums to buy or sell a house -- but not about interest rates.

The deeper question is surely whether e.g. firms, sectors, economies behave that way. What does your data tell you?

If interest rates are ever negative, then transformations such as cube roots, neglog and asinh are available, but the doubt remains whether logarithms help here.

Nick Cox
  • 48,377
  • 8
  • 110
  • 156
  • Gelman & Hill in their book "Data Analysis Using Regression and Multilevel/Hierarchical Models" discuss transformations along these same lines: page 65, for example. – ColorStatistics Sep 21 '21 at 10:27
  • "Fitting a linear model to the raw, untransformed scale seemed inappropriate. Expressed in a different way than before, we would expect the differences between people earning nothing versus those earning USD10,000 to be far greater than the differences between people earning, say, USD80,000 versus USD90,000.". "With logarithms, the differences between populations earning USD5000 versus USD10,000 is equivalent to the differences between those earning USD40,000 versus those earning USD80,000. Gelman, Andrew; Hill, Jennifer. Data Analysis Using Regression and Multilevel/Hierarchical Models – ColorStatistics Sep 21 '21 at 10:34
1

Not a finance expert, but there’s nothing wrong with taking a log transform, provided your values are all greater than zero.

I guess your question is more generally about taking log transforms of values which are percentages? Again, I don’t see an issue. If the transform is useful for improving forecasts and there’s a convenient inverse transform for regaining raw values then it’s all good (again assuming you’ll never want to predict a negative/zero value).

Adam Kells
  • 908
  • 1
  • 12
  • Thank you, Adam. This is my opinion as well, but I ask myself why I have never seen it done in any textbook. Can you point to a textbook or an article where the author takes the natural log of an interest rate. – ColorStatistics Sep 14 '21 at 18:13
  • I don’t have a good answer why it isn’t done in practice. I would guess it has to do with either the fact that interest rates can in some cases be zero or negative (or positive but very very small). There is a similar question with a good answer [here](https://stats.stackexchange.com/questions/6330/when-to-log-transform-a-time-series-before-fitting-an-arima-model) – Adam Kells Sep 14 '21 at 18:21
  • Adam, note that the accepted answer there is one that I do not agree with for the reasons stated above. Prof. Hyndman commented below there and gathered more votes than the accepted answer by saying "Plot a graph of the data against time. If it looks like the variation increases with the level of the series, take logs. Otherwise model the original data." That is exactly what I am suggesting. Interest rates are no special in this context, contrary to what some are saying. – ColorStatistics Sep 14 '21 at 18:55
  • Please see Nick Cox' comment. I think that's the main point. – ColorStatistics Sep 16 '21 at 17:40