{
  "slug": "component-risk",
  "title": "Euler volatility contributions",
  "topic": "risk",
  "summary": "Attribute two-asset portfolio volatility to signed Euler contributions without equating risk share and capital share.",
  "version": "1.0.0",
  "published": "2026-10-16",
  "status": "Educational reference",
  "formula": "RC_i = w_i*(S*w)_i / sigma_p; risk_share_i = RC_i / sigma_p",
  "inputs": [
    [
      "weights",
      "Two nonnegative decimals summing to one",
      "Capital fractions"
    ],
    [
      "covariance",
      "Symmetric PSD 2x2 matrix; entries -100 to 100",
      "Ordered, same-frequency covariance; nonnegative diagonal"
    ]
  ],
  "method": [
    "The marginal derivative of volatility is scaled by each capital weight to obtain its Euler contribution. In the default example, the contribution numerators are 0.01584 and 0.00304. Dividing each by total variance gives risk shares of approximately 83.8983% and 16.1017%, despite capital weights of 60% and 40%.",
    "A negative contribution is possible when an exposure offsets the rest of the portfolio strongly enough. The signed contributions still add to total volatility; forcing every value to be nonnegative would destroy that reconciliation."
  ],
  "limits": [
    "At zero total volatility the division is undefined, so contribution arrays are null rather than invented zeros. These are local variance-based allocations, not loss attribution in a stress event or a recommendation to remove a hedging exposure."
  ],
  "checks": [
    "Euler sum and risk-share sum reconciled; negative contribution fixture tested.",
    "Zero-volatility outputs explicitly withheld."
  ],
  "related": [
    "component-risk-and-capital",
    "inverse-volatility-not-risk-parity"
  ],
  "sources": [
    {
      "title": "MOSEK: risk budgeting and contributions",
      "url": "https://docs.mosek.com/portfolio-cookbook/risk_parity.html"
    }
  ],
  "example": {
    "weights": [
      0.6,
      0.4
    ],
    "covariance": [
      [
        0.04,
        0.006
      ],
      [
        0.006,
        0.01
      ]
    ]
  },
  "frozen_result": {
    "schema_version": 1,
    "model_id": "component-risk",
    "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": {
      "weights": [
        0.6,
        0.4
      ],
      "covariance": [
        [
          0.04,
          0.006
        ],
        [
          0.006,
          0.01
        ]
      ]
    },
    "outputs": {
      "variance": 0.01888,
      "volatility": 0.13740451229854134,
      "component_volatility": [
        0.11528005692843722,
        0.02212445537010412
      ],
      "risk_shares": [
        0.8389830508474576,
        0.1610169491525424
      ]
    },
    "notes": [
      "Signed Euler contributions sum to portfolio volatility; individual contributions can be negative.",
      "Two aligned long-only weights and a same-frequency covariance matrix. No additional annualization is applied."
    ]
  }
}
