---
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`

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[]

---

[API](https://skmtc.net/portfoliooptimizer/apis/portfolio-optimizer.md) · [All operations](https://skmtc.net/portfoliooptimizer/apis/portfolio-optimizer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/portfoliooptimizer/portfolio-optimizer/versions/d016f340e91c/schema)
