return-calculations

Installation
SKILL.md

Return Calculations

Core Concepts

Simple (Holding Period) Return

$$R = \frac{V_{end} - V_{begin} + D}{V_{begin}}$$

where D = distributions (dividends, interest) received during the period. If V_end already reflects reinvested distributions, do not add D again.

Mean and Log Return Conventions

  • Arithmetic mean R_a = (1/n) * sum(R_i) — unbiased estimate of the expected single-period return (use for forward-looking inputs, e.g., mean-variance optimization). Always >= geometric mean; overstates realized compound growth.
  • Geometric mean R_g = [prod(1 + R_i)]^(1/n) - 1 — the correct measure of realized multi-period compound growth. The gap below the arithmetic mean approximates sigma^2 / 2 (volatility drag).
  • Log return r = ln(V_end / V_begin) — time-additive (r_total = r_1 + ... + r_n), so preferred for statistical modeling and multi-period aggregation. Convert with R_simple = e^r - 1 and r = ln(1 + R_simple). Log returns are additive across time but NOT across assets.

CAGR (Compound Annual Growth Rate)

$$CAGR = \left(\frac{V_{end}}{V_{begin}}\right)^{1/n} - 1$$

Installs
302
GitHub Stars
141
First Seen
Feb 19, 2026
return-calculations — joellewis/finance_skills