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

Global Minimum Variance

Install and import#

bash
npm install fintech-algorithms
ts
import { globalMinimumVariance } from "fintech-algorithms/portfolio-construction/mean-risk-optimization/global-minimum-variance";

Signature#

globalMinimumVariance(assetIdsInput, covarianceInput, options)

Computes the lowest-variance weights obtainable from a covariance matrix alone, with no expected-return input, and shows why clipping a short weight is not optimization.

Parameters#

NameTypeNotes
assetIdsInputunknown
covarianceInputunknown
optionsGMVOptionsoptional

Worked example#

executed Captured by running this function on the input its own test provides. Real output of real code — but not asserted against a published figure.

Input#

assetIdsInput
["A", "B"]
covarianceInput
[
  [0.04, 0.01],
  [0.01, 0.09]
]
options
{
  "maxIterations": 10000
}

Call#

globalMinimumVariance(assetIdsInput, covarianceInput, options)

Returns#

object with 19 fields: assetIds, mu, matrixScale, variant, method, maxIterations, weights, variance, …

{
  "assetIds": ["A", "B"],
  "mu": null,
  "matrixScale": 0.09,
  "variant": "gmv-long-only-fully-invested",
  "method": "projected-gradient-simplex-line-search",
  "maxIterations": 10000,
  "weights": [0.7272727272727273, 0.27272727272727276],
  "variance": 0.03181818181818182,
  "volatility": 0.17837651700316895,
  "expectedReturn": null,
  "budgetResidual": 0,
  "lowerBoundResidual": 0,
  "fwGapS": 0,
  "fwGap": 0
}

Showing 14 of 19 fields.

Diagrams#

Global Minimum Variance — article hero
Global Minimum Variance — gmv simplex clipping

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#

  • MOSEK Portfolio Optimization Cookbook — Markowitz portfolio
  • On the Estimation of the Global Minimum Variance Portfolio
  • Portfolio Optimization / Markowitz model
  • SEC: Stock Splits
  • Investor.gov: Ex-Dividend Dates
  • UW Markowitz project notes
  • Historical/case boundary
  • 2026-09-16

The rest of the Mean-Risk Optimization family#