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:

r=P1P0P0r = \frac{P_1 - P_0}{P_0}

Log Return (continuously compounded) uses the natural logarithm:

rlog=ln(P1P0)r_{log} = \ln\left(\frac{P_1}{P_0}\right)

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) / p0
  • log_return(p0, p1) — returns math.log(p1 / p0)
Python runtime loading...
Loading...
Click "Run" to execute your code.