Trading Dev AcademyFree quant education

Free lesson · Math & notation

Powers, square roots, exponentials and logarithms

Open interactive lessonPractice calculationsExplore labs

Start with the idea

Compounding repeats a growth factor. Roots and logarithms let you solve backwards from ending wealth to the growth rate or elapsed time.

Symbols, units & horizon
  • V₀, V_T: initial and final positive wealth
  • T: positive number of years in this example
  • g: annual decimal compound growth
  • a, b: positive numbers
  • ln: natural logarithm, inverse of exp
  • e: exponential base ≈2.71828
  • Superscript: power, with 1/T meaning the T-th root

When and why to use this

Use roots for CAGR and logarithms for time-series returns, reversion half-life and implied carry rates.

A power repeats multiplication: 1.05² means 1.05×1.05. A square root reverses squaring for a nonnegative result. An exponential eˣ uses the constant e≈2.71828; the natural logarithm ln reverses that exponential.

VT=V0(1+g)T,g=(VTV0)1T−1,ln⁡(ab)=ln⁡a+ln⁡b
Algebra and arithmetic

Reverse a repeated growth factor

  1. Divide VT=V0(1+g)T by V₀. Raise both sides to 1/T and subtract 1.
  2. Taking logs instead gives ln⁡(VTV0)=Tln⁡(1+g). The identity ln(ab)=ln a+ln b follows because exey=ex+y.
Work it by hand

100 growing to 121 over two years has g=√1.21−1=.1. Its log growth per year is ln1.1≈.09531.

The logarithm identity requires positive a and b. It explains why log returns add across time while wealth factors multiply. A calculator supplies logarithms, exponentials and roots; doing a derivation by hand means understanding the sequence of operations rather than memorising a decimal constant.

Python implementation

Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.

from math import exp, log

def compound(start, growth, years):
    return start * (1 + growth)**years

def cagr(start, end, years):
    if min(start, end, years) <= 0:
        raise ValueError("Positive wealth and years required")
    return exp(log(end / start) / years) - 1

print(compound(100, .1, 2), cagr(100, 121, 2))

Continue learning

Math & Notation Essentials — all lessons
  1. Start with numbers, variables and an equals sign
  2. Percentages, basis points and units
  3. Rearrange an equation without changing its meaning
  4. Powers, square roots, exponentials and logarithms
  5. Read sums, indices, averages and squared deviations
  6. Probability, expectation and conditioning
  7. Vectors, matrices and transpose notation
  8. Derivatives, integrals and approximations

Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations