Simple Returns vs. Log Returns

Alexander Hagmann
A free video tutorial from Alexander Hagmann
Data Scientist | Finance Professional | Entrepreneur
4.6 instructor rating • 6 courses • 27,835 students

Learn more from the full course

Manage Finance Data with Python & Pandas: Unique Masterclass

Analyze Stocks with Pandas, Numpy, Seaborn & Plotly. Create, analyze & optimize Index & Portfolios (CAPM, Alpha, Beta)

26:46:46 of on-demand video • Updated October 2020

  • Step into the Financial Analyst role and give advice on a client´s financial Portfolio (Final Project)
  • Import large Financial Datasets / historical Prices from Web Sources and analyze, aggregate and visualize them
  • Calculate Return, Risk, Correlation and Rolling Statistics for Stocks, Indexes and Portfolios
  • Create, analyze and optimize financial Portfolios and understand the use of the Sharpe Ratio
  • Intuitively understand Modern Portfolio Theory (CAPM, Beta, Alpha, CML, SML, Risk Diversification) with Real Data examples
  • Create Interactive Price Charts with Technical Indicators (Volume, OHLC, Candlestick, SMA etc.)
  • Create Financial Indexes (price-, equal- and value- weighted) and understand the difference between Price Return and Total Return
  • Easily switch between daily, weekly, monthly and annual returns and understand the benefits of log returns
  • Start from Zero and learn all the Basics of the powerful Pandas Library
English [Auto] This video is a short excursions to a more theoretical topic but it's a pretty important topic and I will try to make this as intuitive as possible with a very simple example and without complicated mathematical background or formulas so when calculating financial returns and mean returns we can either calculate simple returns and the arithmetic average of simple returns or we can calculate logarithmic returns or lucky returns and the arithmetic average of luck returns. That's another option. Calculating the geometric average of simple returns but I will not cover this here. So let's go to an easy example and let's have a look at the difference between those two concepts and uh. We import pandas and umpire and then we create a data frame with. And your stock prices the far end of the year 2016 to 17 and to 18. And uh the prices are 100 at the end of the sixteen fifty at the end of two seventeen and ninety five at the end of the year to 18. So let's do this here and we call the data frame D F so that's the variable here. So let's have a look. And now let's assume that we want to calculate returns and the first option would be to calculate a simple returns and we have already done this. And the last videos so we can calculate simple returns with the percentage change method. So we you see the percentage change method and then finally we also drop a rose with an A values. So that might be the very first row here into 16 and actually recreate here a return data frame simple returns. So let's do this. So here we have uh the negative return of minus 50 percent in 217. And the positive return of plus 90 percent in the year 2000 and 18. So minus 50 percent is actually the decrease from 100 to 50 and plus 90 percent is actually the increase of the stock price from 50 to 95. And next we can also calculate the mean or the average of simple returns. So this is actually nothing new. So we use uh the mean method and actually the mean returns. So that is the arithmetic average of four minus point five and plus 0 point 9 is 0 point 2. So we could say that the average or the mean annual your return for our stock is the 0 point to our 20 percent and that's assume that uh we only know the stock price at the end of the year to 16. And the if you want to calculate today's stock price then that might be pretty intuitive to say okay the price and to 16 was one hundred and we had a mean return over two years of 20 percent. So today's stock price should be one hundred times the one point two times one point two. So we would actually expect to have at the end of the year 2000 and 18 a stock price of one hundred forty four. But this is actually pretty far away from our actual stock price 95. So actually something went wrong here. And uh what we can see here is actually a pitfall of simple returns and uh the mean are the ever of simple returns so having the average of simple returns of for example here. Oh point two percent. We cannot be 100 percent sure that. We um definitely realized a positive return over the last two years so that we increased our investment. In fact our investment dropped from one hundred to ninety five and having here only the average of simple returns does not give us the information that uh we really increased our investment. And with the mean or the average of simple returns we are not able to calculate starting from for example we added to a 16 price to calculate the ending price into 18 so there's no chance to do so and consequently the mean of simple returns can be pretty misleading. So here we have a positive mean return but actually we uh lost money here and we can actually overcome this problem by using logarithmic returns. So let's again have a look at our data frame and we can actually calculate logarithmic returns by dividing each price uh by the previous price and then we take the logarithm. So for example the a logarithmic return for the year 2017 is fifty divided by one hundred and then the logarithm and the logarithmic return for the year 2018 so ninety five divided by fifty and then taking the logarithm and coding wise we can actually do this by having our data frame divided by a shift of one of our data frame and then taking the logarithm with the NUM pi function and put out lock. So let's do this here. So here we have the logarithmic returns and no surprise into 16. We have a missing value and then four to 17. We have a negative return and into 18 a positive return. So now let's create a data frame with logarithmic returns and we also drop here. The first row with the drop and a method and we save the data frame and the variable lock returns and let's have a look here. So these are the two lock returns and then we can also calculate the mean logarithmic return so the mean logarithmic return. Minus 2.5 percent and if we can already see that we might lose some money over the two years period. So from one hundred to ninety five. So here we have a negative mean return. And in contrast to the mean are the average simple return here the mean or average logarithmic return gifts us. Actually the right to information or the impression that we have lost some money over the last two years. So this is one advantage of logarithmic returns so that the mean are the average logarithmic return gives us the correct information whether our investment increased or decreased during the whole period. And that's actually a second advantage of lock returns. So starting with the price and to 16 100 and having the mean or the average lock return over the last two years we can actually calculate today's stock price into 18 and this is actually impossible with simple returns. So with the logarithmic returns we take here. The stock price into 16 100 times e to the power off and then he apparently is this we have our mean lock returns times. Um the number of time periods. So our lock return is based on two time periods or on two years. So we have yet e to the power of uh two times minus 2.5 percent. And by multiplying this uh with 100 we get today's price. So into 18 and we end up here with 95 so that are the two advantages of lock returns. And that's actually not completely wrong to work with simple returns. So there's actually nothing wrong in saying that the mean return was 0 point 2 percent over the last two years. The problem is that the interpretation of mean or the average simply returns can lead to wrong conclusions. So for example in our case that we increased our investment and also demeanor the average of simple returns can hardly be used to make a follow on calculations. So from a mathematical point of view we're lucky returns are the better and the more comfortable alternative. And also I must admit here that this was an extreme example with only two periods with quite different returns. So one highly positive return and one highly negative return. So in reality when we have dozens of monthly returns the difference between Lock returns and simple returns is actually fairly low. And again there's nothing wrong about using simple returns a lot of people in the finance and investment industry only work with simpler returns and in most cases that's a good approximation but with luck returns you are actually on the safe side. So in the next video we will see an example where it's definitely better to work with lock returns. So hope to see you there by.