action portfoliooptimizer_post_portfolio_optimization_maximum_sharpe_ratio_diversified { label: "Diversified Maximum Sharpe Ratio Portfolio" description: "Compute the asset weights of the diversified maximum Sharpe ratio portfolio, as defined in the first reference, optionally subject to: \n* Minimum and maximum weights constraints\n* Maximum group weights constraints\n* Minimum and maximum portfolio exposure constraints\n\nThe diversification measure used in the optimization procedure is the [Herfindahl-Hirschman Index](https://en.wikipedia.org/wiki/Herfindahl%E2%80%93Hirschman_index) of the assets weights.\n\nReferences\n * [Alejandro Corvalan, 2005. Well Diversified Efficient Portfolios, Working Papers Central Bank of Chile 336, Central Bank of Chile](https://ideas.repec.org/p/chb/bcchwp/336.html)\n * [Bouchaud, Jean-Philippe and Potters, Marc and Aguilar, Jean-Pierre, Missing Information and Asset Allocation, arXiv, 1997](https://arxiv.org/abs/cond-mat/9707042)\n * Harry M. Markowitz, Portfolio Selection, Efficient Diversification of Investments, Second edition, Blackwell Publishers Inc.\n" provider: portfoliooptimizer method: POST path: "/portfolio/optimization/maximum-sharpe-ratio/diversified" encoding: json input: { type: "object" required: ["assets", "assetsCovarianceMatrix", "assetsReturns", "riskFreeRate"] 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" } } } deltaReturn: { type: "number" description: "The relative tolerance over the maximum Sharpe ratio portfolio return" } deltaVolatility: { type: "number" description: "The relative tolerance over the maximum Sharpe ratio portfolio volatility" } 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" } } } riskFreeRate: { type: "number" description: "The risk free rate" } } } 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" } } } } }