Why Log Returns
A reader recently asked an important question, one which often puzzles those new to quantitative finance (especially those coming from technical analysis, which relies upon price pattern analysis):
Why use the logarithm of returns, rather than price or raw returns?
The answer is several fold, each of whose individual importance varies by problem domain.
Begin by defining a return: at time
, where
is the price at time
and
:
Benefit of using returns, versus prices, is normalization: measuring all variables in a comparable metric, thus enabling evaluation of analytic relationships amongst two or more variables despite originating from price series of unequal values. This is a requirement for many multidimensional statistical analysis and machine learning techniques. For example, interpreting an equity covariance matrix is made sane when the variables are both measured in percentage.
Several benefits of using log returns, both theoretic and algorithmic.
First, log-normality: if we assume that prices are distributed log normally (which, in practice, may or may not be true for any given price series), then is conveniently normally distributed, because:
This is handy given much of classic statistics presumes normality.
Second, approximate raw-log equality: when returns are very small (common for trades with short holding durations), the following approximation ensures they are close in value to raw returns:
,
Third, time-additivity: consider an ordered sequence of trades. A statistic frequently calculated from this sequence is the compounding return, which is the running return of this sequence of trades over time:
This formula is fairly unpleasant, as probability theory reminds us the product of normally-distributed variables is not normal. Instead, the sum of normally-distributed variables is normal (important technicality: only when all variables are uncorrelated), which is useful when we recall the following logarithmic identity:
Thus, compounding returns are normally distributed. Finally, this identity leads us to a pleasant algorithmic benefit; a simple formula for calculating compound returns:
Thus, the compound return over n periods is merely the difference in log between initial and final periods. In terms of algorithmic complexity, this simplification reduces O(n) multiplications to O(1) additions. This is a huge win for moderate to large n. Further, this sum is useful for cases in which returns diverge from normal, as the central limit theorem reminds us that the sample average of this sum will converge to normality (presuming finite first and second moments).
Fourth, mathematical ease: from calculus, we are reminded (ignoring the constant of integration):
This identity is tremendously useful, as much of financial mathematics is built upon continuous time stochastic processes which rely heavily upon integration and differentiation.
Fifth, numerical stability: addition of small numbers is numerically safe, while multiplying small numbers is not as it is subject to arithmetic underflow. For many interesting problems, this is a serious potential problem. To solve this, either the algorithm must be modified to be numerically robust or it can be transformed into a numerically safe summation via logs.
As suggested by John Hall, there are downsides to using log returns. Here are two recent papers to consider (along with their references):
Trackbacks
- Finanzas 101: Calculos con Retornos « Quantitative Finance Club
- Why Minimize Negative Log Likelihood? « Quantivity
- Why log returns? « mathbabe
- Geometric Efficient Frontier « Systematic Investor
- Pathetic Model Using VIX To Predict S&P 500, Part 1 | Curated Alpha
- Links 30 Mar « Pink Iguana
- franziss | Pearltrees
- Pair Trading Model « ickyatcity
I’m glad you posted this. It certainly was something I struggled with for a long time. This is one of those things that I never learned in school or on the CFA curriculum and if I didn’t start reading academic papers I never would have figured out.
In my own study, I was convinced most by the explanation in Meucci’s Risk and Asset Allocation book. There are hints of what he says in what you say. Basically, his argument is that you should take some invariants and then map them to expected market prices. Since you should be concerned about how these invariants move forward into time and how they can be combined into market prices, the properties of the invariants are more important than the properties of the final market prices (arithmetic returns are easy to aggregate for 1 point in time, but geometric returns are better to aggregate through time). Also, as you note, there is an easy formula to convert one to the other.
I was a bit tripped up in his analysis b/c if the geometric returns follow some garch or regime-switching process, then they aren’t IID. However, the log returns of these variables can still be projected in each period following these processes and then mapped to market prices for use in optimization. Meucci has a good short paper on why you shouldn’t use the projection of log returns in optimization on ssrn.
Good point to highlight the downsides. Updating post now to include links to several relevant papers.
With respect to the paper on high frequency trading, the variable that is modelled as iid is the cross-sectional volatility of principal components. There is absolutely no relationship between this independence and the returns of stocks in the original dimension. It is intuitive to model on a short term horizon the shocks that dislocate the relative relationships of principal components as iid events. This characteristic makes the Euclidean distance a good tool to measure aggregate change in these dislocations over a period of time H. Under this scenario, returns in the original dimension can very well show autoregressive behavior, and by no means there is an assumption of independence between them. I think the main point of the paper lies here: the real model is on the cross-sectional vol of principal components, and not in the returns themselves. Hope this helps. P.-
Regarding the paper links: There is no perfect objective metric. Log returns assumes that investors hate variance per se, whereas in fact investors hate drawdowns. Investors also hate some integral of drawdowns convolved with a convex function of time. Unless they subscribe to some philosophy, e.g. buy-and-hold-and-never-let-go, that has taught them otherwise.
@human: agreed, thanks for your comment; more formally, investors appear to hate negative semi-variance and express that temporal preference non-linearly. I am working on an Asset Allocation post that introduces more formality of both ideas; would be interested to get your ideas / comments on that, after it is posted.
Are you a former geologist? I was using the word “quasimetric” rather than “semivariance”
Did you read Danny Kahneman’s paper on remembered utility? That gave me some ideas on what kind of function to convolve the downside against.
It might be even more complicated than downsides — maybe brief upsides vs spiky upsides vs long-and-steady affects how investors take the downside. I’m reading The Big Short right now. It’s incredible how Michael Burry’s investors lampooned him, even when he was RIGHT, calling the biggest short of the last decade with surgical precision. http://books.google.com/books?id=eParwQ0YdrcC&printsec=frontcover&dq=the+big+short&hl=en&src=bmrr&ei=vQ9VTpCDN8K_tgfDl_CPAg&sa=X&oi=book_result&ct=book-thumbnail&resnum=1&ved=0CEIQ6wEwAA#v=onepage&q=his%20investors&f=false
Sure – you have my email now – so beep at me when you’ve finished it.
Another answer to the question of the title is http://www.portfolioprobe.com/2010/10/04/a-tale-of-two-returns/
Well,with due respect, I opine that the real answer to the ‘why ln(x), instead of x’ question is more elegant than the articlesuggests:
‘X’ amount of profit is a quantity in a 10-digit space,which gives a distorted view of natural quantities. One has to take the natural logarithm of a naturally occured quantity to bring it down to the undistorted /real scale. This is why it is called ‘Natural’ Logarithm. Hence, we takke the natural logiartihm of the returns to apply summation and substraction operations on them.
This is also why , the ln() of the returns has a normal distribution..This is also why, linear interpolation works on the ln() of the returns.
Hello, let me ask something. Do you know if i can use excess returns with logs? Moreover, if i decide to use log how can derive the difference with risk- free rate?
Do really mean $\log(p_n) – \log(p_0)$?
Why dont you write $\log(r_n) – \log(r_0)$ instead?
@Michael: expression is correct, due to identity:
I’m a writer from Stonefield, Great Britain just forwarded this onto a coworker who was running some research on this. And she actually ordered me lunch just because I came across it for her… lol. So allow me to reword this…. Thanks for the meal… But yeah, thanx for spending some time to talk about this issue here on your blog.
At last, after surfing http://quantivity.wordpress.com/2011/02/21/why-log-returns/ for quite some time, I got a site from which I was able to genuinely discover worthwhile facts in regard to the studies and the knowledge that I
want. There need to be more things like this on WordPress