Lesson 1 of 15
Log vs Arithmetic Returns
Log vs Arithmetic Returns
In finance, there are two common ways to compute returns between two prices.
Arithmetic Return (simple return) measures the percentage change:
Log Return (continuously compounded) uses the natural logarithm:
Log returns are preferred in statistical analysis because they are additive over time: the log return over multiple periods equals the sum of individual log returns. Arithmetic returns are more intuitive for single-period reporting.
For small returns, the two are approximately equal. For larger moves, they diverge — log returns are always slightly smaller in magnitude.
Your Task
Implement both return functions:
arithmetic_return(p0, p1)— returns(p1 - p0) / p0log_return(p0, p1)— returnsmath.log(p1 / p0)
Python runtime loading...
Loading...
Click "Run" to execute your code.