---
title: "Correlation Spectrum"
method: POST
path: "/portfolios/analysis/correlation-spectrum"
tags: ["Portfolio Analysis"]
---

# Correlation Spectrum

`POST /portfolios/analysis/correlation-spectrum`

Compute the correlation spectrum of a portfolio.

References
* [Tristan Froidure, Khalid Jalalzai and Yves Choueifaty, Portfolio Rho-Representativity, International Journal of Theoretical and Applied FinanceVol. 22, No. 07, 1950034 (2019)](https://www.worldscientific.com/doi/10.1142/S0219024919500341)

## Request body

- union
  - object
    - `assets` integer, required — The number of assets
    - `assetsCovarianceMatrix` array[], required — assetsCovarianceMatrix[i][j] is the covariance between the asset i and the asset j
      - number[]
    - `portfolios` object[], required
      - `assetsWeights` number[], required — assetsWeights[i] is the weight of the asset i in the portfolio, in percentage
  - object
    - `assets` object[], required
      - `assetPrices` number[], required — assetPrices[t] is the price of the asset at the time t; all the assetPrices arrays must have the same length
    - `portfolios` object[], required
      - `portfolioValues` number[], required — portfolioValues[t] is the value of the portfolio at the time t; all the portfolioValues arrays must have the same length, equal to the common length of the assetPrices arrays

## Response `200`

OK

- object
  - `portfolios` object[], required
    - `portfolioCorrelationSpectrum` number[], required — The correlation spectrum of the portfolio

---

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