action portfoliooptimizer_post_portfolio_analysis_contributions_return { label: "Return Contributions" description: "Perform a return contribution analysis of one or several portfolio(s), optionally using groups of assets.\n\nReferences\n* Carl R. Bacon, Practical Portfolio Performance Measurement and Attribution\n" provider: portfoliooptimizer method: POST path: "/portfolio/analysis/contributions/return" encoding: json input: { type: "object" required: ["assets", "assetsReturns", "portfolios"] properties: { assets: { type: "integer" description: "The number of assets" } assetsGroups: { type: "array" items: { type: "array" description: "assetsGroups[k] is the indexes of the assets belonging to the assets group k" items: { type: "integer" } } } assetsReturns: { type: "array" description: "assetsReturns[i] is the arithmetic return of asset i" items: { type: "number" } } portfolios: { type: "array" items: { 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" } } } } } } } output: { type: "object" required: ["portfolios"] properties: { portfolios: { type: "array" items: { type: "object" required: ["assetsReturnContributions"] properties: { assetsGroupsReturnContributions: { type: "array" description: "assetsGroupsReturnContributions[k] is the return contribution of the group of assets k to the return of the portfolio" items: { type: "number" } } assetsReturnContributions: { type: "array" description: "assetsReturnContributions[i] is the return contribution of the asset i to the return of the portfolio" items: { type: "number" } } } } } } } }