fintech-algorithms
Using a coding agent? Give it the skill: npx skills add IslamBaraka90/Fintech-Algorithms-Library What it does →

Arithmetic versus Geometric Average Return

Install and import#

bash
npm install fintech-algorithms
ts
import { arithmeticVersusGeometricAverageReturn } from "fintech-algorithms/financial-mathematics-statistics-and-data-foundations/financial-arithmetic-time-value-and-returns/arithmetic-geometric-return";

Signature#

arithmeticVersusGeometricAverageReturn(input)

Worked example#

verified This is the worked example published in the article, replayed by the test suite on every run. The output cannot drift.

Input#

input
{
  "principal": 1000,
  "rate": 0.05,
  "periods": 3,
  "compoundsPerPeriod": 12,
  "futureValue": 1200,
  "cashFlows": [-1000, 400, 400, 400],
  "startValue": 100,
  "endValue": 110,
  "returns": [0.1, -0.05, 0.08],
  "frequency": 12,
  "periodicReturn": 0.01
}

Call#

arithmeticVersusGeometricAverageReturn(input)

Returns#

object with 2 fields: arithmeticAverage, geometricAverage

{
  "arithmeticAverage": 0.043333333333333335,
  "geometricAverage": 0.04115010832757027
}

Diagrams#

Arithmetic versus Geometric Average Return — concept anatomy
Arithmetic versus Geometric Average Return — lesson map
Arithmetic versus Geometric Average Return — mistake contrast

Calculation flow#

Arithmetic versus Geometric Average Return — four-part map
flowchart LR
    A["Name the input"] --> B["Apply: arithmetic mean = (r1 + r2 + ... + rn)/n; geometric mean = [(1+r1)...(1+rn)]^(1/n) - 1"]
    B --> C["Check units and boundary"]
    C --> D["Explain the output"]

How it works#

This page states the contract — how to call it correctly. The article explains the concept: why it works, and where it breaks.

Read the article →

References#

  • CFA_QM - CFA Institute Quantitative Methods Study Session — CFA Institute
  • INVESTOR_RETURN - Annual Return — U.S. Securities and Exchange Commission
  • Author-derived and synthetic boundary

The rest of the Financial Arithmetic, Time Value, and Returns family#