---
title: "Aggregated Covariance Matrix"
method: POST
path: "/assets/covariance/matrix/aggregated"
tags: ["Assets / Covariance Matrix"]
---

# Aggregated Covariance Matrix

`POST /assets/covariance/matrix/aggregated`

Compute an aggregated asset covariance matrix, obtained by replacing the diagonal blocks of a global asset covariance matrix by local asset covariance matrices and minimally altering the off-diagonal blocks so that the resulting asset covariance matrix is a valid covariance matrix.

 References
 * [Goldberg, Lisa R. and Kercheval, Alec N. and Anderson, C. Greg and Miller, Guy and Sorge, Kathy, On the Aggregation of Local Risk Models for Global Risk Management. Journal of Risk, Vol. 8, No. 1, 2005](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=402960)
 * [Ndiaye, P., Oustry, F. & Piolle, V. Semidefinite optimisation for global risk modelling. J Asset Manag 7, 142–153 (2006)](https://link.springer.com/article/10.1057/palgrave.jam.2240209)>

## Request body

- object
  - `assets` integer, required
  - `assetsGlobalCovarianceMatrix` array[], required — assetsGlobalCovarianceMatrix[i][j] is the (global) covariance between the asset i and the asset j
    - number[]
  - `assetsLocalCovarianceMatrices` object[], required — assetsLocalCovarianceMatrices[k] contains the (local) correlations between the assets of the k-th diagonal block of the asset covariance matrix assetsGlobalCovarianceMatrix
    - `assetsLocalCovarianceMatrix` array[], required — assetsLocalCovarianceMatrices[k].assetsLocalCovarianceMatrix[l][m] is the (local) covariance between the asset l and the asset m of the k-th diagonal block of the asset covariance matrix assetsGlobalCovarianceMatrix
      - number[]

## 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/revisions/d016f340e91c/schema)
