liveBook · Manning

Logarithmic return

A logarithmic return is the natural logarithm of an asset’s ending price divided by its beginning price over a period.

How 2 Manning books explain it

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 →

Related concepts

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.