---
title: "Subset Resampling-Based Mean-Variance Efficient Portfolio"
method: POST
path: "/portfolios/optimization/mean-variance-efficient/subset-resampling-based"
tags: ["Portfolio Optimization / Mean-Variance"]
---

# Subset Resampling-Based Mean-Variance Efficient Portfolio

`POST /portfolios/optimization/mean-variance-efficient/subset-resampling-based`

Compute the asset weights of a subset resampling-based  mean-variance efficient portfolio, optionally subject to:  
* Minimum and maximum weights constraints
* Minimum and maximum group weights constraints
* Minimum and maximum portfolio exposure constraints

References
 * [CSSA, Random Subspace Optimization (RSO)](https://cssanalytics.wordpress.com/2013/10/06/random-subspace-optimization-rso/)
 * [Subset Optimization for Asset Allocation,Benjamin J. Gillen](https://www.bengillen.com/uploads/1/2/3/8/123891022/subsets.pdf)
 * Harry M. Markowitz, Portfolio Selection, Efficient Diversification of Investments, Second edition, Blackwell Publishers Inc.

## Request body

- object
  - `assets` integer, required — The number of assets
  - `assetsMeanReturns` number[], required — assetsMeanReturns[i] is the arithmetic (expected) return of asset i
  - `assetsCovarianceMatrix` array[], required — assetsCovarianceMatrix[i][j] is the covariance between the asset i and the asset j arithmetic returns
    - number[]
  - `subsetSize` integer — The number of assets to include in each subset portfolio; defaults to a value of order the square root of the total number of assets
  - `simulatedPortfolios` integer — The number of simulated portfolios to compute; only applicable if the generation method for the subset portfolios is random sampling
  - `simulatedPortfoliosGenerationMethod` 'complete' | 'random' — The method to generate the simulated portfolios
  - `simulatedPortfoliosAggregationMethod` 'average' | 'median' — The method to aggregate the simulated portfolios
  - `constraints` object, required
    - `portfolioMeanReturn` number — The portfolio mean return; exclusive with portfolioVolatility and riskTolerance
    - `portfolioVolatility` number — The portfolio volatility; exclusive with portfolioReturn and riskTolerance
    - `riskTolerance` number — The portfolio risk tolerance; exclusive with portfolioReturn and portfolioVolatility
    - `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/versions/479fd4ac44aa/schema)
