---
title: "Sparse Index Tracking Portfolio"
method: POST
path: "/portfolios/replication/index-tracking/sparse"
tags: ["Portfolio Replication"]
---

# Sparse Index Tracking Portfolio

`POST /portfolios/replication/index-tracking/sparse`

Construct a portfolio as close as possible, in terms of returns, to a benchmark, optionally subject to:
* A maximum number of assets constraint
* Minimum and maximum weights constraints
* Minimum and maximum group weights constraints
* Minimum and maximum portfolio exposure constraints

References 
* Konstantinos Benidis, Yiyong Feng, Daniel P. Palomar, Optimization Methods for Financial Index Tracking: From Theory to Practice, now publishers Inc (7 juin 2018)
* [Purity Mutunge and Dag Haugland. Minimizing the tracking error of cardinality constrained portfolios. Computers & Operations Research Volume 90, February 2018, Pages 33-41](https://doi.org/10.1016/j.cor.2017.09.002)

## Request body

- object
  - `assets` object[], required
    - `assetReturns` number[], required — assetReturns[t] is the return of the asset at the time t; all assetReturns arrays must have the same length
  - `benchmarkReturns` number[], required — benchmarkReturns[t] is the return of the benchmark at the time t; the benchmarkReturns array must have the same length as all the assetReturns arrays
  - `constraints` object
    - `maximumAssets` integer — The maximum number of assets present in the portfolio
    - `minimumAssetsWeights` number[] — minimumAssetsWeights[i] is the minimum weight of the asset i in the portfolio, in percentage
    - `maximumAssetsWeights` number[] — maximumAssetsWeights[i] is the maximum weight of the asset i in the portfolio, in percentage
    - `assetsGroups` array[]
      - integer[] — assetsGroups[k] is the indexes of the assets belonging to the assets group k in the portfolio; exclusive with assetsGroupsMatrix
    - `assetsGroupsMatrix` array[] — assetsGroupsMatrix[k][i] is the weight of the asset i in the group of assets k; exclusive with assetsGroups
      - number[]
    - `maximumAssetsGroupsWeights` number[] — maximumAssetsGroupsWeights[k] is the maximum weight of the assets group k in the portfolio, in percentage between 0 and 1 if assetsGroups is provided
    - `minimumPortfolioExposure` number — The minimum portfolio exposure; must be lower than or equal to maximumPortfolioExposure
    - `maximumPortfolioExposure` number — The maximum portfolio exposure; must be higher than or equal to minimumPortfolioExposure

## Response `200`

OK

- object
  - `assetsWeights` number[], required — assetsWeights[i] is the weight of the asset i in the portfolio, in percentage

---

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