---
title: "Linearly Shrunk Empirical Covariance Matrix"
method: POST
path: "/assets/covariance/matrix/estimation/empirical/shrunk"
tags: ["Assets / Covariance Matrix Estimation"]
---

# Linearly Shrunk Empirical Covariance Matrix

`POST /assets/covariance/matrix/estimation/empirical/shrunk`

## Request

- Base URL: `https://api.portfoliooptimizer.io/v1`
- URL: `https://api.portfoliooptimizer.io/v1/assets/covariance/matrix/estimation/empirical/shrunk`
- Auth: API key in header `X-API-Key`

Compute a linearly shrunk empirical asset covariance matrix, which is a convex combination of the empirical covariance matrix of these assets and a target covariance matrix, the target covariance matrix being either: 
* A constant variance covariance matrix (i.e., a multiple of the identity matrix)
* An unequal variance covariance matrix (i.e., a diagonal matrix)
* A constant variance-covariance covariance matrix (i.e., the sum of a multiple of the identity matrix and of a matrix with 0s on its diagonal and 1s elsewhere)
* A constant correlation covariance matrix (i.e., the sum of a diagonal matrix and of a multiple of a particular matrix with 0s on its diagonal)

References
* [Olivier Ledoit, Michael Wolf, The Power of (Non-)Linear Shrinking: A Review and Guide to Covariance Matrix Estimation, Journal of Financial Econometrics, Volume 20, Issue 1, Winter 2022, Pages 187–218](https://academic.oup.com/jfec/article-abstract/20/1/187/5861007?redirectedFrom=fulltext)
* [Gianluca De Nard, Oops! I Shrunk the Sample Covariance Matrix Again: Blockbuster Meets Shrinkage, Journal of Financial Econometrics, Volume 20, Issue 4, Fall 2022, Pages 569–611](https://academic.oup.com/jfec/article-abstract/20/4/569/5960228)
* [O. Ledoit, M. Wolf, Honey, I Shrunk the Sample Covariance Matrix, The Journal of Portfolio Management Summer 2004, 30 (4) 110-119](https://jpm.pm-research.com/content/30/4/110)
* [Schafer J, Strimmer K. A shrinkage approach to large-scale covariance matrix estimation and implications for functional genomics. Stat Appl Genet Mol Biol. 2005;4:Article32](https://pubmed.ncbi.nlm.nih.gov/16646851/)
* [Guillaume Becquin and Saher Esmeir. 2023. Semantic Similarity Covariance Matrix Shrinkage. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 9977–9992, Singapore. Association for Computational Linguistics](https://aclanthology.org/2023.findings-emnlp.668/)

## Request body

- union
  - object
    - `assets` object[], required
      - `assetPrices` object[], required: assetPrices[t] contains price information for the asset at the date t
        - `date` string, required: The date corresponding to the date t in format YYYY-MM-DD; all dates must be distinct
        - `close` number, required: The close price of the asset at the date t
    - `shrinkageTargetCovarianceMatrix` 'constantVarianceCovarianceMatrix' | 'diagonalCovarianceMatrix' | 'constantVarianceCovarianceCovarianceMatrix' | 'constantCorrelationCovarianceMatrix': The target covariance matrix towards which to shrink the empirical covariance matrix of the assets returns
    - `shrinkageIntensityComputationMethod` 'manual' | 'quadraticMeanLossMinimization' | 'quadraticLossMinimization': The method to compute the shrinkage intensity; if not provided, defaults to the quadratic mean loss minimization procedure described in the references
    - `shrinkageIntensity` number: The shrinkage intensity to apply to the empirical covariance matrix of the assets returns when shrinkageIntensityComputationMethod is equal to 'manual'
  - object
    - `assets` object[], required
      - `assetPrices` object[], required: assetPrices[t] contains price information for the asset at the date t
        - `date` string, required: The date corresponding to the date t in format YYYY-MM-DD; all dates must be distinct
        - `close` number, required: The close price of the asset at the date t
    - `shrinkageTargetCovarianceMatrix` array[], required: shrinkageTargetCovarianceMatrix[i][j] is the target covariance between the asset i and the asset j
      - number[]
    - `shrinkageIntensityComputationMethod` 'manual' | 'quadraticLossMinimization': The method to compute the shrinkage intensity; if not provided, defaults to the quadratic loss minimization procedure described in the references
    - `shrinkageIntensity` number: The shrinkage intensity to apply to the empirical covariance matrix of the assets returns when shrinkageIntensityComputationMethod is equal to 'manual'

## Response `200`

OK

- object
  - `assetsCovarianceMatrix` array[], required: assetsCovarianceMatrix[i][j] is the covariance between the asset i and the asset j
    - number[]

## Changes

- **2026-07-13** `906989d3f7f7`: 1 breaking, 1 info
  - removed `subschema #1, subschema #2` from the request body `oneOf` list
  - added `subschema #1, subschema #2` to the request body `oneOf` list
- **2026-06-08** `614076795988`: 1 breaking, 1 info
  - removed `subschema #1, subschema #2` from the request body `oneOf` list
  - added `subschema #1, subschema #2` to the request body `oneOf` list
- **2026-04-03** `24e65d80f8eb`: 3 warning
  - removed the request property `oneOf[subschema #2]/assets/items/assetPrices/items/high`
  - removed the request property `oneOf[subschema #2]/assets/items/assetPrices/items/low`
  - removed the request property `oneOf[subschema #2]/assets/items/assetPrices/items/open`
- **2026-02-08** `ac51d393c9a9`: 1 breaking, 1 info
  - removed `subschema #1, subschema #2` from the request body `oneOf` list
  - added `subschema #1, subschema #2` to the request body `oneOf` list
- **2025-05-16** `148ff00a3baf`: 1 breaking, 1 info
  - removed `subschema #1, subschema #2` from the request body `oneOf` list
  - added `subschema #1, subschema #2` to the request body `oneOf` list

[Operation history](https://skmtc.dev/portfoliooptimizer/apis/portfolio-optimizer/changes/assets/covariance/matrix/estimation/empirical/shrunk/post.md)

---

[API](https://skmtc.dev/portfoliooptimizer/apis/portfolio-optimizer.md) - [All operations](https://skmtc.dev/portfoliooptimizer/apis/portfolio-optimizer/llms.txt) - [OpenAPI document](https://skmtc.dev/portfoliooptimizer/apis/portfolio-optimizer/revisions/9d075aa717bf?raw)
