{
  "slug": "tracking-error",
  "title": "Sample tracking error",
  "topic": "validation",
  "summary": "Measure dispersion of aligned arithmetic portfolio-minus-benchmark returns with explicit annualization.",
  "version": "1.0.0",
  "published": "2026-10-16",
  "status": "Educational reference",
  "formula": "a_t = portfolio_t - benchmark_t; TE = sample_sd(a); TE_ann = TE*sqrt(K)",
  "inputs": [
    [
      "portfolio",
      "2-250 decimal period returns",
      "Equal-length portfolio observations"
    ],
    [
      "benchmark",
      "Aligned decimals, same length",
      "Matching reference observations"
    ],
    [
      "periods_per_year",
      "Number, 1 to 366",
      "Declared annualization factor"
    ]
  ],
  "method": [
    "The default active returns are 0.01, 0.01, 0.01 and -0.005. Their sample standard deviation is 0.0075. At twelve periods per year the scaled number is approximately 0.0259808.",
    "The sample convention divides the centered squared deviations by n-1. The card reports both the original-period and annualized quantities so that a user can see whether a comparison differs because of sampling frequency or the underlying dispersion."
  ],
  "limits": [
    "Square-root time scaling is an assumption, not a calendar lookup. Autocorrelated or changing active returns can invalidate its interpretation. Tracking error says nothing by itself about whether average active performance is positive, and it is not the standard deviation of compounded relative wealth."
  ],
  "checks": [
    "Sample denominator, annualization and identical-series zero tested.",
    "Mismatched observations and unbounded scaling factors rejected."
  ],
  "related": [
    "tracking-error-conventions",
    "information-ratio-denominator"
  ],
  "sources": [
    {
      "title": "William F. Sharpe: differential-return ratios and time aggregation",
      "url": "https://web.stanford.edu/~wfsharpe/art/sr/sr.htm"
    },
    {
      "title": "Simple Statistics: reference implementation and API",
      "url": "https://simple-statistics.github.io/"
    }
  ],
  "example": {
    "portfolio": [
      0.02,
      -0.01,
      0.03,
      0.01
    ],
    "benchmark": [
      0.01,
      -0.02,
      0.02,
      0.015
    ],
    "periods_per_year": 12
  },
  "frozen_result": {
    "schema_version": 1,
    "model_id": "tracking-error",
    "model_version": "1.0.0",
    "engine_version": "1.0.0",
    "published_at": "2026-10-16",
    "scope": "Synthetic educational reference calculation. Not a fitted investment strategy, forecast, provider model or client return.",
    "inputs": {
      "portfolio": [
        0.02,
        -0.01,
        0.03,
        0.01
      ],
      "benchmark": [
        0.01,
        -0.02,
        0.02,
        0.015
      ],
      "periods_per_year": 12
    },
    "outputs": {
      "active_returns": [
        0.01,
        0.01,
        0.009999999999999998,
        -0.004999999999999999
      ],
      "mean_active_return": 0.00625,
      "sample_tracking_error": 0.0075,
      "annualized_tracking_error": 0.025980762113533156
    },
    "notes": [
      "Arithmetic period differences with sample n-1 dispersion. Square-root annualization assumes stationary, uncorrelated active returns; it is not a compounded wealth difference."
    ]
  }
}
