It was the best of times, it was the worst of times.

As you may have guessed, this is a mashup of a novel by Charles Dickens and an explanation of financial returns.

The key plot element of *A Tale of Two Cities* is that there are two men, Charles Darnay and Sydney Carton, who look almost identical. They are different, but in some respects interchangeable.

Simple returns and log returns are different, but in some respects interchangeable.

## Return definitions

Traditionally simple returns are denoted with a capital *R* and log returns with a lower-case *r*. These are defined as:

*R _{t} = (P_{t} – P_{t-1}) / P_{t-1} = P_{t} / P_{t-1} – 1*

*r _{t} = log(P_{t} / P_{t-1}) = log(P_{t}) – log(P_{t-1})*

where *P _{t}* is the price of the asset at time

*t*. We are defining the return from time

*t-1*to time

*t*. The

*log*function here is the natural logarithm.

## R computation

In the R language if you have a vector of prices (for the same asset at different times), you can compute the simple returns with:

`> R <- priceVec[-1] / priceVec[-length(priceVec)] - 1`

It is slightly different if you have a price matrix (with times in the rows and assets along the columns):

`> R <- priceMat[-1, ] / priceMat[-nrow(priceMat), ] - 1`

For log returns you can do the same command in either case:

`> r <- diff(log(prices))`

**Caveat:** This assumes the positions are all long. Read on for an explanation of returns for short positions.

## Nomenclature

We have two similar concepts and we need to distinguish between them. Unfortunately this is about as messy as the French revolution in which our Dickensian characters are embroiled.

First off, some would think that what we are calling “return” is an abbreviation of “rate of return”.

Table 1: Names for return concepts.

r |
R |
R+1 |

log | simple | total |

continuously compounded | net | gross |

I find it hard to believe that Table 1 lists all the words that are used. Let me know if there are others.

Extreme care is needed. Some of these words are used inconsistently by different people.

The word “total” can (and in my experience more probably does) mean the return that includes dividends as well as prices. A (simple) total return in this sense is:

*R _{t} = (P_{t} + D_{t} – P_{t-1}) / P_{t-1}*

where *D _{t}* is the dividend or interest that is paid between times

*t-1*and

*t*. This concept is sometimes expressed as the “overall” return.

The terms “gross” and “net” are more commonly used to mean something like before and after tax.

**Take-away message:** There is no magic potion. You’ll need to threaten violence on whomever is speaking until they make clear what they mean.

## Transmutation

It is easy to convert one type of return into the other. Shortly we’ll see why that is useful.

To go from simple to log returns, do:

*r = log(R + 1)*

To go from log return to simple return, do:

*R = exp(r) – 1*

These formulas work exactly as is in R — whether the returns are vectors or matrices.

Figure 1: Comparison of simple and log returns.

Figure 1 compares simple and log returns. It shows that log returns are always smaller than simple returns. (You can remember which is smaller because the smallest possible simple return is -100%, that is minus infinity for the log return.) For daily returns or intraday returns the differences between the two types are going to be trivial, generally.

## Aggregation

The two types act very differently when it comes to aggregation. Each has an advantage over the other:

- simple returns aggregate across assets
- log returns aggregate across time

The simple return of a portfolio is the weighted sum of the simple returns of the constituents of the portfolio.

The log return for a time period is the sum of the log returns of partitions of the time period. For example the log return for a year is the sum of the log returns of the days within the year.

## Time reversal

Physicists tend to think that time only goes one way. In finance time can go backwards — you can short an asset.

Or you can think of it as having been misled so far. What has been identified as the initial time in the return formulas should really be called the buying time, and what has been identified as the final time should be the selling time. When we short an asset, the buying time is after the selling time.

The log return of a short position is the negative of the log return of the long position. The relationship of the simple return of a short position relative to that of the long position is a little more complicated:

*-R / (R + 1)*

The computations we saw before in the R language assume that the positions are long and the times are in order. When computing log returns of short positions, you can always just take the negative of the computation for the long positions. For simple returns, you have some choices.

## Foreign exchange

The return you experience for an asset that is priced in a foreign currency depends both on the return in the foreign currency and the return of that currency relative to your home currency.

There is a simple relationship for log returns: it is the sum of the log return of the asset in the foreign currency and the log return of the currency. The formula for simple returns is slightly complicated.

If you have the return for euros per dollar, then what is the return for dollars per euro? Again, it is easy for log returns: one is the negative of the other.

## Questions

The material in this post is fairly pedestrian, and most people in finance at least sort of know a lot of it. So why is this information so hard for a novice to find?

## Epilogue

*A Tale of Two Cities* ends with Carton taking the place of Darnay in prison and at the guillotine. He does this for the woman that they both love who chose Darnay and not Carton to marry. The final sentence of the novel is the thoughts of Carton just before he is executed:

It is a far, far better thing I do, than I have ever done; it is a far, far better rest that I go to, than I have ever known.

#### Update 2012 July 30

See also “Returns with negative asset values”.

## Appendix R

To create Figure 1 for your own consumption with R you might do commands like:

> retseq <- seq(-.75, .75, length=100)

> plot(retseq, log(retseq + 1), type='l')

> abline(0,1, lty=2)

The commands that actually created Figure 1 were:

> retseq <- seq(-.75, .75, length=100)

> plot(retseq, log(retseq + 1), type="l",

+ axes=FALSE, col="blue", lwd=3, xlab="Simple return",

+ ylab="Log return")

> axis(1, at=c(-.5, 0, .5), label=c("-50%", "0%", "50%"))

> axis(2, at=c(-1, -.5, 0, .5),

+ label=c("-100%", "-50%", "0%", "50%"))

> box()

> abline(0,1, lty=2, col="gold")

Pingback: Lesestunde 04.10.2010 | ECONinfo

[Comment by Mark Breman but erased in a hardware crash.]

Hi Pat,

“I find it hard to believe that Table 1 lists all the words that are used. Let me know if there are others.”

The quantmod package uses the term “arithmetic” for simple returns.

Kind regards,

-Mark-

Correspondingly “geometric” for log returns.

Pat,

I also often hear (and use myself) the terms “discrete return” (for simple return) and “continuous return” (for log return), indicating the underlying assumption about the frequency of return payments.

Zeno

I thought that Latane et al had used “holding period return” for 1+R but I am unsure whether it has remained in popular use.

In Matlab if you have a vector of prices (for the same asset at different times),

you can compute the simple returns with:

>> now = 2:length(prices);

>> returns = prices(now)./prices(now-1) – 1;

>> plot(returns’)

It is slightly different if you have a price matrix (with times in the columns and assets along the rows):

>> returns = prices(:,now)./prices(:,now-1) – 1;

For log returns you can do the same command in either case:

>> plot(diff(log(prices’)))

To reproduce figure 1:

>> retseq = [-.75:98:.75];

>> plot(retseq, log(retseq + 1), ‘b’); hold

>> plot(retseq, retseq, ‘y -‘); hold

>> xlabel(‘Simple return’);

>> ylabel(‘Log Return’);

Louis,

Thanks for adding the Matlab code. I see the potential for confusion if the Matlab convention is assets along rows while the R convention is assets along columns.

Others who know other languages are encouraged to add the computations for the two types of returns similar to what Louis has done for Matlab.

My pleasure. The convention might actually be my personal preference. Other than this, I tried to keep it similar to your R. I would also suggest that Freemat is an open source alternative to paying for matlab.

that is,

returns = prices(now,:)./prices(now-1,:) – 1; works as ./ is an element by element operation

Pingback: Geometric Efficient Frontier « Systematic Investor

I realise I’m commenting on an old post but I’ve come across this post via google and other might as well. It’s important to distinguish short selling and simply selling an instrument.

Simply put, I think the

-R/(1+R)

is the correct formula if you are selling an instrument and buying it back at a later time with the proceeds you got from selling it in the first place. However, note that you cannot lose more than you invested in this case.

When short selling a stock, you can lose more than you invested. In fact the downside is unbounded. The return in this case is simply the negative of the long position: -R

Sergiusz,

I don’t understand where -R/(1+R) comes from. Can you explain?

This subject is a bit related to the negative net asset value post.

It’s quoted from the blog post under time reversal as the way to calculate the proportional return for a short position.

Sergiusz

Of course. I guess I should read my own stuff periodically.

I see what you are saying now.

I think the “right” way is to always look at the changes to the net asset value of the portfolio. That is simple, and really what I think people have in mind. But even that is subject to a discussion of how much cash is really backing the portfolio.

You wrote, “So why is this information so hard for a novice to find?”

(Amen + Thanks)^n. I have one question.

People write all the time about how this security or index is “correlated” with that one, without specifying exactly what they are correlating. I’ve been using simple returns but should I be using log returns? Is there one right answer? If not, how does one decide which to use?

Thanks

jg

Jim,

That’s a great question. This is finance so I think the answer has to be that there isn’t one right answer. But I think if there were one right answer it would be log returns.

My thinking is that we have reason to believe that log returns have a symmetric distribution and correlations are more sensible for symmetric distributions than skewed ones.

But it is important to remember that all of this is just modeling. A better question than ‘What is “right”?’ is ‘What is best for the particular application that I’m doing?’

Pingback: Volatility estimation and time-adjusted returns | Portfolio Probe | Generate random portfolios. Fund management software by Burns Statistics

Pingback: Popular posts 2012 May | Portfolio Probe | Generate random portfolios. Fund management software by Burns Statistics

Pingback: A slice of S&P 500 skewness history | Portfolio Probe | Generate random portfolios. Fund management software by Burns Statistics

Pingback: Popular posts 2012 March | Portfolio Probe | Generate random portfolios. Fund management software by Burns Statistics

Pingback: Alpha decay in portfolios | Portfolio Probe | Generate random portfolios. Fund management software by Burns Statistics

Pingback: The volatility mystery continues | Portfolio Probe | Generate random portfolios. Fund management software by Burns Statistics

Pingback: The mystery of volatility estimates from daily versus monthly returns | Portfolio Probe | Generate random portfolios. Fund management software by Burns Statistics

Pingback: The distribution of financial returns made simple | Portfolio Probe | Generate random portfolios. Fund management software by Burns Statistics

Pingback: Replacing market indices | Portfolio Probe | Generate random portfolios. Fund management software by Burns Statistics

Pingback: Cross-sectional skewness and kurtosis: stocks and portfolios | Portfolio Probe | Generate random portfolios. Fund management software by Burns Statistics

Pingback: Popular posts 2012 April | Portfolio Probe | Generate random portfolios. Fund management software by Burns Statistics

Pingback: Popular posts 2012 August | Portfolio Probe | Generate random portfolios. Fund management software by Burns Statistics

Pingback: Popular posts 2012 June | Portfolio Probe | Generate random portfolios. Fund management software by Burns Statistics

Pingback: S&P 500 correlations up to date | Portfolio Probe | Generate random portfolios. Fund management software by Burns Statistics

Pingback: Blog year 2012 in review | Portfolio Probe | Generate random portfolios. Fund management software by Burns Statistics

Pingback: A pictorial history of US large cap correlation | Portfolio Probe | Generate random portfolios. Fund management software by Burns Statistics

Pingback: The half variance approximation for mean returns | Portfolio Probe | Generate random portfolios. Fund management software by Burns Statistics

Pingback: Another tale of two returns | Portfolio Probe | Generate random portfolios. Fund management software by Burns Statistics

Pingback: garch models caught in the spotlight | Portfolio Probe | Generate random portfolios. Fund management software by Burns Statistics

Pingback: What is volatility? | Portfolio Probe | Generate random portfolios. Fund management software by Burns Statistics