{
  "slug": "ewma-variance",
  "title": "Zero-mean EWMA variance",
  "topic": "estimation",
  "summary": "Track an explicit initial variance through a zero-mean exponentially weighted update.",
  "version": "1.0.0",
  "published": "2026-10-16",
  "status": "Educational reference",
  "formula": "v_(t+1) = lambda*v_t + (1 - lambda)*r_t^2",
  "inputs": [
    [
      "returns",
      "2-250 decimals, -1 to 10",
      "Chronological equal-frequency observations"
    ],
    [
      "initial_variance",
      "Squared decimal, 0 to 100",
      "Variance before the first supplied return"
    ],
    [
      "lambda",
      "Decimal, 0 to 1",
      "Decay parameter, not fitted here"
    ]
  ],
  "method": [
    "Each supplied return updates the variance for the next period. The output path therefore begins after the first observation, not at the initial variance. This convention avoids attaching an updated estimate to a decision made before the return was observed.",
    "With initial variance 0.0001 and decay 0.94, the first 1% return leaves variance unchanged. The following -2% return raises it to 0.000118. A 1.5% third return then produces 0.00012442. The path and terminal value are both available for reconciliation."
  ],
  "limits": [
    "A zero conditional mean is assumed. Lambda=1 freezes the initial value; lambda=0 uses only the latest squared return. No parameter fitting, expected return adjustment, missing-period decay or empirical forecast score is provided."
  ],
  "checks": [
    "Recursion independently replayed, including decay endpoints.",
    "Initial condition, ordering and negative variance validation covered."
  ],
  "related": [
    "ewma-initialization",
    "covariance-units"
  ],
  "sources": [
    {
      "title": "RiskMetrics technical document, fourth edition",
      "url": "https://www.msci.com/documents/10199/5915b101-4206-4ba0-aee2-3449d5c7e95a"
    }
  ],
  "example": {
    "returns": [
      0.01,
      -0.02,
      0.015
    ],
    "initial_variance": 0.0001,
    "lambda": 0.94
  },
  "frozen_result": {
    "schema_version": 1,
    "model_id": "ewma-variance",
    "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": {
      "returns": [
        0.01,
        -0.02,
        0.015
      ],
      "initial_variance": 0.0001,
      "lambda": 0.94
    },
    "outputs": {
      "variance_path": [
        0.0001,
        0.00011800000000000002,
        0.00012442000000000003
      ],
      "next_period_variance": 0.00012442000000000003,
      "next_period_volatility": 0.01115437134042076
    },
    "notes": [
      "Zero conditional mean assumption; each observation updates variance for the following period. No fitted decay parameter or forecast validation."
    ]
  }
}
