Last active
June 22, 2021 15:03
-
-
Save lequant40/d0f645a1d41eecfb59a0eea5260ca9cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetch('https://api.portfoliooptimizer.io/v1/portfolio/optimization/mean-variance-efficient', | |
{ | |
method: 'POST', | |
headers: { 'Content-Type': 'application/json' }, | |
body: JSON.stringify({ assets: 13, | |
assetsReturns: [...], | |
assetsCovarianceMatrix: [[...], ...], | |
constraints: { | |
portfolioVolatility: 0.05/Math.sqrt(260), | |
maximumAssetsWeights: [0.20,0.10,0.20,0.20,0.20,0.20,0.20,0.20,0.10,0.10,0.20,0.50,0.50], | |
assetsGroups: [[1,2,3],[4,5,6],[7,8],[9,10,11],[12,13]], | |
maximumAssetsGroupsWeights: [0.50,0.50,0.25,0.25,0.50] | |
} | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment