Stealing pages from the server...

Story of Two Returns


Introduction

In finance, return is a profit on an investment. It can be used to gauge different metrics, all of which help determine how profitable a investment target is. A positive return represents a profit while a negative return marks a loss.

Definition

Traditionally simple returns are denoted with a capital R (or ) and log returns with a lower-case r (or ).

where is the price of the asset at time . We are defining the return from time to time . The log function here is the natural logarithm. It is super easy to derive the relation between and :

The first one is to go from simple to log returns, and the seconed one is to go from log return to simple return. Therefore, it can be shown that log returns are always smaller than simple returns.

It can also be deduced that using an approximation of the logarithm that , if is near to zero. So to speak, if the simples return is near to zero, then it is in addition very comparable to the log return. If we want to illustrate when is near to zero, we only need to prove that .

Cumulative Returns

Let’s take a look at a typical bank deposit to recap the concept of compounding. If you deposit $100 in a bank with a 10% annual interest rate and a yearly compounding period. The following is an example of what you get in a year:

What if we increase to 365 (i.e. daily compounding)?

In a daily compounding scenario, you earn interest on a daily basis, and those interest in turns makes you more interest, that is, interest on interest. How do all these relate to log returns? Let us now use market prices instead of bank deposits to illustrate the concept. The simple cumulative daily return is calculated by taking the cumulative product of the daily percentage change. This calculation is represented by the following equation:

Compounding logarithmic returns over time can be calculated by the following:

Python Computation

In the Python language if you have a series of prices (in the code price_df is a pd.DataFrame object), you can compute the simple returns with:

simple_returns = price_df['close'].pct_change()
simple_cumulative_returns = (1 + simple_returns).cumprod() - 1

As for log returns you can compute it with the following:

log_returns = np.log(price_df['close']/price_df['close'].shift())
log_cumulative_returns = np.exp(log_returns.cumsum()) - 1

Notes

It can be presented in the stock case that the logarithmic return has an advantage against the simple return since multi-period logarithmic return can be calculated as a sum of the one-period logarithmic returns. While the multi-period simple return is the product of the one-period simple returns, which can lead to computational problems for values close to zero. Additionally, we can see that if the simple return values are close to zero, the distribution of simple and logarithmic returns is extremely similar. This raises the question of whether the return type (simple or log) has an impact on the calculations and, as a result, on the outcomes.

Conclusions

Our goal in this article was to explain the concepts of simple and logarithmic return, as well as the differences and connections between them.

References

  1. https://www.portfolioprobe.com/2010/10/04/a-tale-of-two-returns/
  2. https://core.ac.uk/download/pdf/161062652.pdf
  3. https://investmentcache.com/magic-of-log-returns-concept-part-1/
  4. https://ebrary.net/12923/management/logarithmic_returns

Author: Yang Wang
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint polocy. If reproduced, please indicate source Yang Wang !
 Previous
Build a Dockerfile Including TaLib Wrapper Build a Dockerfile Including TaLib Wrapper
Install TA-Lib can be pain in the ass on windows 10 or other operating systems, so this article will show you how to build a Dockerfile image including Python TA-Lib wrapper and dependencies.
2022-04-01
Next 
Install Docker on Windows without Hyper-V Install Docker on Windows without Hyper-V
Docker is an open-source tool that allows you to run numerous software and operating systems in a containerised environment. The background story is that I wish to run an Android app on Mumu, and this app requires the Hyper-V service to be closed. However, I still need to use Docker to deploy my machine learning project, which requires Hyper-V to be enabled. This puts me in a very difficult position. So in this article, I will try to install and run Docker without using Hyper-V service.
2022-03-23
  TOC