Quant Memo
Foundational

Logarithms and Exponentials

Why compounding is multiplication in disguise, and why the tool that turns multiplication into addition — the logarithm — shows up in every return calculation, every likelihood function, and every Kelly bet.

A stock that goes up 50% and then down 50% does not end back where it started — it ends down 25%, because the second move applies to a bigger number than the first. Percentage changes do not add; they multiply. That single fact makes ordinary arithmetic clumsy for anything involving growth, and it is the reason quants work with logarithms almost everywhere returns, growth rates, or likelihoods appear.

The analogy: a machine that turns multiplying into adding

Imagine a machine with two settings. In "multiply mode," combining two numbers means multiplying them — which is hard to do by eye for messy numbers and impossible to average sensibly. Flip the machine to "add mode" and the same combination becomes ordinary addition, which is easy and behaves nicely under averaging. The logarithm is exactly that switch: it converts a world of multiplication into a world of addition, does the easy addition there, and the exponential switches back. Compounding, which is inherently multiplicative — grow, then grow again, then grow again — becomes additive once you take logs, which is why "log returns" are the natural currency of return calculations.

Writing it down

The exponential function bxb^x (b>0b > 0 is the base) asks: "multiply bb by itself, xx times." The logarithm undoes it — it asks the reverse question. logb(y)=x\log_b(y) = x means "bb raised to what power gives yy?" so that by definition

blogb(y)=y,logb(bx)=x.b^{\log_b(y)} = y, \qquad \log_b(b^x) = x .

Read the first as "exponentiating a log gets you back where you started," and the second as "logging an exponent gets you back where you started" — they are inverse operations, like squaring and square-rooting.

The property that does all the work in finance is

log(a×b)=log(a)+log(b).\log(a \times b) = \log(a) + \log(b) .

In words: the log of a product is the sum of the logs. This is exactly why compounding two growth factors — multiply them — becomes adding two log-returns. The base e2.71828e \approx 2.71828 gives the natural logarithm, written ln\ln, and it is the default in continuous compounding because erte^{rt} is the unique growth function whose instantaneous growth rate is exactly rr.

ln(x) mirror images across y = x
The exponential and the natural log are mirror images of each other across the diagonal — because each one exactly undoes the other.

Worked example 1: two 50% moves, computed the "hard" way and the log way

A $100 stock goes up 50%, then down 50%. Direct arithmetic: 100×1.50=150100 \times 1.50 = 150, then 150×0.50=75150 \times 0.50 = 75. Final value $75 — a 25% loss, not back to zero net change, because the down-move applied to $150, not $100.

Now with logs. The first move's log factor is ln(1.50)=0.4055\ln(1.50) = 0.4055. The second move's log factor is ln(0.50)=0.6931\ln(0.50) = -0.6931. Add them: 0.4055+(0.6931)=0.28770.4055 + (-0.6931) = -0.2877. Exponentiate to get back the overall multiplier: e0.2877=0.750e^{-0.2877} = 0.750. That confirms the same $75 ending value, but notice what addition bought you: to combine ten moves you'd just add ten numbers instead of multiplying ten factors together — far less error-prone, and it makes average growth rates well-defined by simple averaging of the log terms.

Worked example 2: solving for years to double your money

At 7% annual compounding, how many years to double $1? You need (1.07)n=2(1.07)^n = 2. Take the natural log of both sides: ln((1.07)n)=ln(2)\ln\big((1.07)^n\big) = \ln(2). Using log(bx)=xlog(b)\log(b^x) = x\log(b) — a direct consequence of log(a×a×)=loga+loga+\log(a\times a \times \cdots) = \log a + \log a + \cdots — the left side becomes n×ln(1.07)n \times \ln(1.07). So n×0.0677=0.6931n \times 0.0677 = 0.6931, giving n=0.6931/0.067710.24n = 0.6931 / 0.0677 \approx 10.24 years. Sanity-check the mental-math shortcut traders use, the "Rule of 72": 72/710.372 / 7 \approx 10.3 years — matches, because 7272 is close to 100×ln(2)=69.3100 \times \ln(2) = 69.3, rounded for divisibility.

What this means in practice

Log returns are additive across time and across independent bets, which is why cumulative performance is tracked as a sum of log returns rather than a product of gross returns. Log-likelihoods turn products of probabilities (which underflow to zero in floating point for large samples) into sums that are numerically stable — every maximum-likelihood fit in quant finance works in log space for exactly this reason. The Kelly criterion maximises expected log wealth, not expected wealth, because log is the transform under which repeated multiplicative bets add up correctly.

The logarithm converts multiplication into addition: log(ab)=log(a)+log(b)\log(ab) = \log(a) + \log(b). That single property is why compounding, likelihoods, and repeated bets are analysed in log space — sequences of multiplicative moves become sums, which are easy to average and numerically stable.

The classic confusion is treating a simple percentage return and a log return as interchangeable, especially over multi-period horizons. They agree only approximately for small moves — a 5% simple return has a log return of ln(1.05)=4.88%\ln(1.05) = 4.88\%, close enough — but diverge badly for large moves: a 50% simple gain is only a 40.5% log gain, and a 50%-50\% simple loss is a 69.3%-69.3\% log loss. Averaging simple returns across periods overstates growth (it ignores compounding), while log returns average correctly but must be exponentiated back before being read as a percentage.

Related concepts

Practice in interviews

Further reading

  • Strang, Calculus (ch. 6)
  • Hull, Options, Futures and Other Derivatives (ch. 15, on log returns)
ShareTwitterLinkedIn