Data, Tools, and Modeling for Investments
Hands-on analytics in Excel and optional Python for returns, risk, and portfolio computation.
Content
Return and excess return calculations
Versions:
Watch & Learn
AI-discovered learning video
Return and excess return calculations — Make Your P&L Speak Human
If returns were a language, this is the Rosetta Stone. Learn it wrong and your portfolio whispers confusing things. Learn it right and your performance reports sing.
What is return (and why we care)
Return is the basic answer to the question every investor asks at 3AM: did I make money or did I accidentally fund someone else’s yacht? In formula form, the simplest one-period return (also called holding-period return) is:
Return = (Ending Value + Cash Flows Received - Beginning Value) / Beginning Value
Key varieties you'll meet in the wild:
- Total return: includes price changes, dividends, coupons — the whole enchilada.
- Price return: only price appreciation/depreciation.
- Log returns (continuously compounded): convenient for time aggregation and statistical work: r = ln(Pt / Pt-1).
Why this matters beyond petty bragging rights: accurate returns are the building blocks for risk-adjusted metrics, attribution, and compensation. If you screw up returns, everything that follows (including excess return, alpha, and skill claims) is a house of cards.
How do we calculate excess return?
Excess return = portfolio return minus benchmark or risk-free return, depending on context. It’s the part you can brag about, or explain away with fees.
Two common flavors:
- Active excess return = Portfolio Return - Benchmark Return (e.g., S&P 500)
- Risk-adjusted excess return = Portfolio Return - Risk-free Rate (e.g., Treasury), often used in Sharpe-type calculations
Example (simple):
Portfolio total return = 9%
Benchmark total return = 6%
Excess return = 9% - 6% = 3%
If you keep seeing 3% and think it's free money, congratulations: you might not be adjusting for fees, taxes, or survivorship bias yet.
Real-world adjustments — the things that bite you if you're sloppy
Remember how we covered wrappers, fees, and fund structures? Good — this is where that becomes very relevant.
- Gross return vs net return: Gross ignores fees, net subtracts them. Always show both when evaluating a manager; net return is what the investor actually experiences.
- Cash flows and timing: Contributions/withdrawals change the math. Use time-weighted returns to neutralize investor timing, money-weighted returns (IRR) to capture investor experience.
- Corporate actions: Splits, dividends, rights issues — proper cleaning is mandatory (see previous module on data sourcing and cleaning).
Quick checklist before you compute returns:
- Are price series adjusted for dividends and splits? If not, your return is lying.
- Are returns reported gross of management fees? Mark that clearly.
- Are currency translations needed? Convert consistently.
Arithmetic vs Geometric vs Log — pick your poison wisely
- Arithmetic mean: simple average of period returns. Good for expected single-period return estimation, bad for multi-period compounding.
- Geometric mean (CAGR): the proper multi-period compounded return. Use this for statements like 'this strategy returned X% per year over N years.'
- Log returns: approximately equal to arithmetic returns for small returns, additive over time, handy for statistical models.
Table: quick comparison
| Measure | Use case | Aggregation property |
|---|---|---|
| Arithmetic mean | Short-run expected return | Not multiplicative |
| Geometric mean (CAGR) | Multi-period realized return | Multiplicative (compounding) |
| Log return | Modeling, normality approximations | Additive over time |
Code-ish formulas:
Arithmetic = (r1 + r2 + ... + rn) / n
Geometric = ( (1+r1)*(1+r2)*...*(1+rn) )^(1/n) - 1
Log return period = ln(1 + r)
Ask yourself: are you reporting a ‘per-year’ figure or feeding data into a regression? Your choice decides the math.
Examples: a walk-through with numbers
Scenario: You manage a fund that charges a 1% management fee and has the following annual gross returns for three years: 8%, 12%, -4%. The benchmark returned 6%, 10%, 0%.
Step 1: compute net returns (subtract fee annually):
- Year 1 net = 8% - 1% = 7%
- Year 2 net = 12% - 1% = 11%
- Year 3 net = -4% - 1% = -5%
Step 2: compute geometric (annualized) net return:
CAGR = (1.07 * 1.11 * 0.95)^(1/3) - 1 ≈ (1.128...)^(1/3) - 1 ≈ 4.07%
Step 3: compute benchmark CAGR:
Bench CAGR = (1.06 * 1.10 * 1.00)^(1/3) - 1 ≈ 5.31%
Step 4: excess return (annualized) ≈ 4.07% - 5.31% = -1.24% (ouch)
Interpretation: Gross returns might have looked fine, but after fees and compounding, the investor underperformed the benchmark.
Common mistakes (and how to stop crying over Excel)
- Not adjusting prices for dividends and splits. Result: phantom returns.
- Confusing arithmetic average with geometric. Result: you claim nonsense annualized figures.
- Subtracting fees once instead of at the correct frequency. Result: subtle but meaningful bias.
- Comparing returns in different currencies without conversion. Result: misleading excess returns.
- Using time-weighted returns when you need money-weighted (or vice versa). Result: blaming the manager for investor timing.
Pro tip: always annotate whether returns are gross/net, price/total, and the compounding basis.
Quick Python pseudocode for calculating excess returns
# assume prices is a pandas.Series of adjusted close prices
returns = prices.pct_change().dropna()\nlog_returns = np.log(prices / prices.shift(1)).dropna()
# net returns: subtract fee as an approximation
net_returns = returns - fee_rate/periods_per_year
# excess over benchmark
excess = net_returns - benchmark_returns
# annualize geometric
annualized = (np.prod(1 + net_returns))**(1/years) - 1
(Yes, the real world requires more nuance. Use this as a starting ritual, not gospel.)
Closing — how to not embarrass yourself in performance meetings
- Always clean your input data before calculating returns. Garbage in, poetic nonsense out.
- Report both gross and net returns, and label them boldly. Investors care about net.
- Use geometric mean/CAGR for multi-period realized returns; use arithmetic when forecasting a single period.
- Explicitly state the benchmark and whether excess returns are vs benchmark or vs risk-free.
A small truth: good analytics doesn't make a bad strategy good. But sloppy analytics can make a good strategy look criminal. Do the math right, then argue about markets.
Key takeaways:
- Return answers whether you made money; excess return answers whether you outperformed someone or something.
- Fee and wrapper adjustments matter — remember the conversations about wrappers and fees from previous modules.
- Choose the right mean for the right job: arithmetic for expectation, geometric for compounding, log for modeling.
Now go compute, annotate, and never again call an unadjusted price series 'returns' at a risk committee meeting. Your future self, and your investors, will thank you (or at least stop sending angry emails).
Comments (0)
Please sign in to leave a comment.
No comments yet. Be the first to comment!