Logarithmic return
A logarithmic return is the natural logarithm of an asset’s ending price divided by its beginning price over a period.
Statistics Every Programmer Needs
A log return is the natural logarithm of the ratio of an asset's current price to its previous price, representing a compounded proportional price change.
- How it is used
- Supports Monte Carlo simulation of future stock prices by summarizing historical daily movements.
- How deep it goes
- Defines the formula, implements it in Python, examines its distribution, and estimates mean and volatility for simulation.
- Examples
- Uses GM closing prices, a pandas log-return column, a density plot, and estimated mean and standard deviation.
- What you can do after
- Apply it via NumPy and pandas, then use estimated returns and volatility in a Monte Carlo forecast.
Read how Statistics Every Programmer Needs explains logarithmic return →
Investing for Programmers
A log return is the natural logarithm of the ratio between an asset's ending price and its starting price over a period.
- How it is used
- Uses logarithmic returns to compare daily market performance and support statistical analysis.
- How deep it goes
- Defines the metric, contrasts it with simple returns, demonstrates code, and stops short of deeper return theory.
- Examples
- Calculates returns for Apple, Coca-Cola, and NuScale closing-price data, then visualizes their distributions.
- What you can do after
- Apply logarithmic returns with pandas and NumPy, plot their distribution, and inspect potential outliers.
Read how Investing for Programmers explains logarithmic return →
What to know first
- logarithmA logarithm is the exponent to which a specified positive base other than one must be raised to produce a given positive number.
- stock priceA stock price is the market value of one share of a publicly traded company or security at a particular time.
Related concepts
- simple returnalternative to · Simple return is the proportional change in an asset’s value over a period, calculated as ending value divided by beginning value minus one.
- stock priceuses · A stock price is the market value of one share of a publicly traded company or security at a particular time.
- returnkind of · Investment return is the gain or loss produced by an investment or portfolio over a specified period, expressed as an amount or relative rate.
- correlationused by · Correlation is a statistical association describing how variables vary together in direction or degree, without by itself establishing causation.
- dropnaused by · dropna is a pandas method that removes missing values or rows and columns containing them according to specified criteria.
- normal distributionused by · A normal distribution is a continuous probability distribution with a symmetric, bell-shaped density determined by its mean and variance.
Questions about logarithmic return
What is logarithmic return?
A logarithmic return is the natural logarithm of an asset’s ending price divided by its beginning price over a period.
Which Manning books explain logarithmic return?
Statistics Every Programmer Needs and Investing for Programmers.
What should I know before learning logarithmic return?
Manning books that teach logarithmic return usually introduce logarithm and stock price first.
What is the difference between logarithmic return and simple return?
A logarithmic return is the natural logarithm of an asset’s ending price divided by its beginning price over a period. Simple return is the proportional change in an asset’s value over a period, calculated as ending value divided by beginning value minus one.
What is logarithmic return a kind of?
Logarithmic return is a kind of return. Investment return is the gain or loss produced by an investment or portfolio over a specified period, expressed as an amount or relative rate.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

