action portfoliooptimizer_post_portfolio_optimization_mean_variance_efficient { label: "Mean-Variance Efficient Portfolio" description: "Compute the asset weights of a mean-variance efficient portfolio, optionally subject to: \n* Minimum and maximum weights constraints\n* Maximum group weights constraints\n* Minimum and maximum portfolio exposure constraints\n\n> A mean-variance efficient portfolio is a portfolio belonging to [the mean-variance efficient frontier](#post-/portfolio/analysis/mean-variance/efficient-frontier).\n\nReferences\n * Harry M. Markowitz, Portfolio Selection, Efficient Diversification of Investments, Second edition, Blackwell Publishers Inc.\n" provider: portfoliooptimizer method: POST path: "/portfolio/optimization/mean-variance-efficient" encoding: json input: { type: "object" required: ["assets", "assetsCovarianceMatrix", "assetsReturns", "constraints"] properties: { assets: { type: "integer" description: "The number of assets" } assetsCovarianceMatrix: { type: "array" description: "assetsCovarianceMatrix[i][j] is the covariance between the asset i and the asset j" items: { type: "array" items: { type: "number" } } } assetsReturns: { type: "array" description: "assetsReturns[i] is the arithmetic return of asset i" items: { type: "number" } } constraints: { type: "object" properties: { assetsGroups: { type: "array" items: { type: "array" description: "assetsGroups[k] is the indexes of the assets belonging to the assets group k in the portfolio; exclusive with assetsGroupsMatrix" items: { type: "integer" } } } assetsGroupsMatrix: { type: "array" description: "assetsGroupsMatrix[k][i] is the weight of the asset i in the group of assets k; exclusive with assetsGroups" items: { type: "array" items: { type: "number" } } } maximumAssetsGroupsWeights: { type: "array" description: "maximumAssetsGroupsWeights[k] is the maximum weight of the assets group k in the portfolio, in percentage between 0 and 1 if assetsGroups is provided" items: { type: "number" } } maximumAssetsWeights: { type: "array" description: "maximumAssetsWeights[i] is the maximum weight of the asset i in the portfolio, in percentage" items: { type: "number" } } maximumPortfolioExposure: { type: "number" description: "The maximum portfolio exposure; must be higher than or equal to minimumPortfolioExposure" } minimumAssetsWeights: { type: "array" description: "minimumAssetsWeights[i] is the minimum weight of the asset i in the portfolio, in percentage" items: { type: "number" } } minimumPortfolioExposure: { type: "number" description: "The minimum portfolio exposure; must be lower than or equal to maximumPortfolioExposure" } portfolioReturn: { type: "number" description: "The portfolio return; exclusive with portfolioVolatility and riskTolerance" } portfolioVolatility: { type: "number" description: "The portfolio volatility; exclusive with portfolioReturn and riskTolerance" } riskTolerance: { type: "number" description: "The portfolio risk tolerance; exclusive with portfolioReturn and portfolioVolatility" } } } } } output: { type: "object" required: ["assetsWeights"] properties: { assetsWeights: { type: "array" description: "assetsWeights[i] is the weight of the asset i in the portfolio, in percentage" items: { type: "number" } } } } }