---
title: "Sharpe Ratio Contributions"
method: POST
path: "/portfolios/analysis/contributions/sharpe-ratio"
tags: ["Portfolio Analysis / Contributions"]
---

# Sharpe Ratio Contributions

`POST /portfolios/analysis/contributions/sharpe-ratio`

## Request

- Base URL: `https://api.portfoliooptimizer.io/v1`
- URL: `https://api.portfoliooptimizer.io/v1/portfolios/analysis/contributions/sharpe-ratio`
- Auth: API key in header `X-API-Key`

Perform a Sharpe Ratio contribution analysis of a portfolio.

References
* [Sestovic, Dragan, Marginal Sharpe Ratio](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4916095)

## 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
    - number[]
  - `riskFreeReturn` number: The constant risk-free arithmetic return over the considered time period, in percentage
  - `assetsGroups` array[]
    - integer[]: assetsGroups[k] is the indexes of the assets belonging to the assets group k
  - `portfolios` object[], required
    - `assetsWeights` number[], required: assetsWeights[i] is the weight of the asset i in the portfolio, in percentage

## Response `200`

OK

- object
  - `portfolios` object[], required
    - `assetsMarginalSharpeRatioContributions` number[], required: assetsMarginalSharpeRatioContributions[i] is the marginal contribution of the asset i to the Sharpe Ratio of the portfolio
    - `assetsRelativeSharpeRatioContributions` number[]: assetsRelativeSharpeRatioContributions[i] is the relative contribution of the asset i to the Sharpe Ratio of the portfolio, in percentage; assetsRelativeSharpeRatioContributions is not provided when the Sharpe Ratio of the portfolio is equal to 0
    - `assetsTotalSharpeRatioContributions` number[], required: assetsTotalSharpeRatioContributions[i] is the total contribution of the asset i to the Sharpe Ratio of the portfolio
    - `assetsGroupsRelativeSharpeRatioContributions` number[]: assetsGroupsRelativeSharpeRatioContributions[k] is the relative contribution of the group of assets k to the Sharpe Ratio of the portfolio, in percentage; assetsGroupsRelativeSharpeRatioContributions is not provided when the Sharpe Ratio of the portfolio is equal to 0
    - `assetsGroupsTotalSharpeRatioContributions` number[]: assetsGroupsTotalSharpeRatioContributions[k] is the total contribution of the group of assets k to the Sharpe Ratio of the portfolio

## Changes

- **2026-06-08** `614076795988`: 1 breaking, 1 warning
  - added the new required request property `assetsMeanReturns`
  - removed the request property `assetsReturns`
- **2026-04-03** `24e65d80f8eb`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/portfoliooptimizer/apis/portfolio-optimizer/changes/portfolios/analysis/contributions/sharpe-ratio/post.md)

---

[API](https://skmtc.dev/portfoliooptimizer/apis/portfolio-optimizer.md) - [All operations](https://skmtc.dev/portfoliooptimizer/apis/portfolio-optimizer/llms.txt) - [OpenAPI document](https://skmtc.dev/portfoliooptimizer/apis/portfolio-optimizer/revisions/9d075aa717bf?raw)
