---
title: "Mean-Variance Efficient Portfolio"
method: POST
path: "/portfolios/optimization/mean-variance-efficient"
tags: ["Portfolio Optimization / Mean-Variance"]
---

# Mean-Variance Efficient Portfolio

`POST /portfolios/optimization/mean-variance-efficient`

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

> A mean-variance efficient portfolio is a portfolio belonging to [the mean-variance efficient frontier](#post-/portfolio/analysis/mean-variance/efficient-frontier).

References
 * 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[]
  - `constraints` object, required
    - `portfolioMeanReturn` number — The portfolio mean return; exclusive with portfolioVolatility, riskTolerance and maximumPortfolioVolatility
    - `portfolioVolatility` number — The portfolio volatility; exclusive with portfolioReturn, riskTolerance and maximumPortfolioVolatility
    - `maximumPortfolioVolatility` number — The maximum portfolio volatility; exclusive with portfolioReturn, portfolioVolatility and riskTolerance
    - `riskTolerance` number — The portfolio risk tolerance; exclusive with portfolioReturn, portfolioVolatility and maximumPortfolioVolatility
    - `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)
