---
title: "Tracking Error Variance"
method: POST
path: "/portfolios/analysis/tracking-error-variance"
tags: ["Portfolio Analysis / Risk Measures"]
---

# Tracking Error Variance

`POST /portfolios/analysis/tracking-error-variance`

Compute the tracking error variance between a portfolio and a benchmark.

References
* Carl R. Bacon, Practical Portfolio Performance Measurement and Attribution

## Request body

- union
  - object
    - `benchmarkReturns` number[], required — benchmarkReturns[t] is the arithmetic return of the benchmark at the time t; the benchmarkReturns array must have the same length as all the portfolioReturns arrays and all the assetReturns arrays
    - `assets` object[], required
      - `assetReturns` number[], required — assetReturns[t] is the arithmetic return of the asset at the time t; all assetReturns arrays must have the same length; all assetReturns arrays must have the same length as the benchmarkReturns array
    - `portfolios` object[], required
      - `assetsWeights` number[], required — assetsWeights[i] is the weight of the asset i in the portfolio, in percentage; all the assetsWeights arrays must have the same length as the assets array
  - object
    - `benchmarkReturns` number[], required — benchmarkReturns[t] is the arithmetic return of the benchmark at the time t; the benchmarkReturns array must have the same length as all the portfolioReturns arrays
    - `portfolios` object[], required
      - `portfolioReturns` number[], required — portfolioReturns[t] is the arithmetic return of the portfolio at the time t; all the portfolioReturns arrays must have the same length as the benchmarkReturns array

## Response `200`

OK

- object
  - `portfolios` object[], required
    - `portfolioTrackingErrorVariance` number, required — The tracking error variance of the portfolio

---

[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/dee9caba1913/schema)
