Trading Dev AcademyFree quant education

Free lesson · Markets & returns

Measure the return before modelling it

Open interactive lessonPractice calculationsExplore labs

Start with the idea

Think of a return as a change in ownership wealth per initial dollar. Cash received is part of that wealth even when it leaves the quoted price lower. Compounding then asks what happens when the next return is earned on the changed capital rather than the original deposit.

Symbols, units & horizon
  • Pₜ, Pₜ₋₁: ending and starting price per share
  • Dₜ: cash distribution per share in the period
  • Rₜ: simple decimal total return
  • rₜ: log return
  • V₀, V_T: initial and final wealth without external flows
  • T: final period index
  • Y: elapsed years
  • g, CAGR: annual compound growth rate
  • ∏: multiply wealth factors over periods
  • ln, exp: natural logarithm and its inverse

When and why to use this

Use total returns for backtests and allocation; use compound growth for multi-period reporting. Log returns are convenient for time-series models because multiplication of wealth factors becomes addition.

A price series is not a return series. Cash dividends, splits, financing, and the timing of external capital all change the economic result. State the currency, horizon, and whether returns include distributions before comparing two strategies.

Rt=Pt−Pt−1+DtPt−1,rt=ln⁡(1+Rt)
Algebra and arithmetic

From wealth change to simple and log return

  1. One share costs Pt−1. End wealth is Pt+Dt, so profit is Pt+Dt−Pt−1. Divide by initial cost to obtain Rt.
  2. Rearrange to Pt+Dt=Pt−1(1+Rt). Taking logs of the wealth factor defines rt=ln⁡(1+Rt); invert with Rt=ert−1.
Work it by hand

Price 100 → 103 and dividend 2 gives R=5100=0.05, r=ln⁡1.05=0.04879. The inverse gives 5%, not 4.879%.

Here Pt is the end price and Dt is the cash distribution during the period, with prices consistently adjusted for splits. Simple returns aggregate across assets using beginning-of-period weights. Log returns add through time for a consistently constructed total-return series; they do not add across assets in the same way.

R1:T=∏t=1T(1+Rt)−1,CAGR=(VTV0)1Y−1
Algebra and arithmetic

Derive compounding and solve for CAGR

  1. Write V1=V0(1+R1), then V2=V1(1+R2). Substitute repeatedly: VTV0=∏t(1+Rt). Subtract 1 for cumulative return.
  2. A constant annual growth rate g satisfies VT=V0(1+g)Y. Divide by V0, take the Y-th root and subtract 1. Equivalently g=exp⁡[ln⁡(VTV0)Y]−1.
Work it by hand

For +20%, then −20%: 1.2(0.8)=0.96. Two-year CAGR is 0.96−1=−2.0204%.

CAGR uses Y years and assumes no intervening external cash flows. A +20% year followed by −20% leaves 0.96 of the initial capital: a 4% cumulative loss and about −2.02% per year. An arithmetic mean of zero conceals the loss.

An asset moves from $100 to $103 and pays a $2 dividend. Total return, in percent?

(103 − 100 + 2) / 100 = 5%. Price return alone is only 3%.

Research sources, review dates and limitations

Capstone checkpoint 1 / State the decision

Synthetic exercise · self-assessed. Use the capstone’s hypothetical $10,000 account and one-session ETF-like trade. Write the decision time, instrument, holding period and a reason to reject the hypothesis.

Save in your practice notes: A four-sentence research contract. Open practice studio →

Check your reasoning

Separate the assumed favorable-outcome probability from a measured estimate. Identify cash as a baseline.

Full hand-working, definitions and runnable Python →

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 log1p, expm1, prod

def total_return(start_price, end_price, dividend=0):
    r = (end_price + dividend - start_price) / start_price
    return {"simple": r, "log": log1p(r)}

def compound_return(returns):
    return prod(1+r for r in returns) - 1

def cagr(start_wealth, end_wealth, years):
    return (end_wealth/start_wealth)**(1/years) - 1

print(total_return(100, 103, 2))
print(compound_return([.2, -.2]), cagr(100, 96, 2))

Continue learning

Markets, Returns & Capital — all lessons
  1. Measure the return before modelling it
  2. Cash securities, derivatives, and financing
  3. Discounted cash flow and the price of capital
  4. Translate an investment idea into a mandate

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