{
  "slug": "two-asset-minimum-variance",
  "title": "Two-asset minimum variance",
  "topic": "allocation",
  "summary": "Inspect the analytic long-only variance minimum for exactly two exposures.",
  "version": "1.0.0",
  "published": "2026-10-16",
  "status": "Educational reference",
  "formula": "w1* = (v2 - c12) / (v1 + v2 - 2*c12); w1 = clip(w1*, 0, 1); w2 = 1 - w1",
  "inputs": [
    [
      "covariance",
      "Symmetric PSD 2x2 matrix; entries -100 to 100",
      "Squared decimal-return units; nonnegative diagonal; one frequency"
    ]
  ],
  "method": [
    "For the default matrix the unconstrained first weight is 0.004/0.038, approximately 10.5263%. It is inside the long-only interval, so no clipping changes the result. The second exposure receives the remainder.",
    "With two assets and a valid covariance matrix, portfolio variance is a convex quadratic in the first weight. A boundary solution is therefore represented by clipping the analytic stationary point. If the difference variance is exactly zero, all feasible weights tie and the card explicitly returns equal weights with unique=false."
  ],
  "limits": [
    "This closed-form reference is not a general optimizer. It excludes expected return targets, shorting, taxes, turnover penalties and estimation uncertainty. Near-degenerate matrices can make the unconstrained weight unstable even while the constrained answer is finite."
  ],
  "checks": [
    "Analytic weights checked against independent quadratic calculations and feasible-grid minima.",
    "Boundary clipping and equal-risk tie rule tested; indefinite matrices rejected."
  ],
  "related": [
    "minimum-variance-constraints",
    "covariance-shrinkage-targets"
  ],
  "sources": [
    {
      "title": "MOSEK: portfolio variance and allocation constraints",
      "url": "https://docs.mosek.com/portfolio-cookbook/markowitz.html"
    }
  ],
  "example": {
    "covariance": [
      [
        0.04,
        0.006
      ],
      [
        0.006,
        0.01
      ]
    ]
  },
  "frozen_result": {
    "schema_version": 1,
    "model_id": "two-asset-minimum-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": {
      "covariance": [
        [
          0.04,
          0.006
        ],
        [
          0.006,
          0.01
        ]
      ]
    },
    "outputs": {
      "weights": [
        0.10526315789473684,
        0.8947368421052632
      ],
      "unconstrained_weight_1": 0.10526315789473684,
      "variance": 0.009578947368421053,
      "unique": true
    },
    "notes": [
      "Long-only two-asset variance minimization; expected returns and costs excluded."
    ]
  }
}
