---
title: "Investable Portfolio"
method: POST
path: "/portfolio/construction/investable"
tags: ["Portfolio Construction"]
---

# Investable Portfolio

`POST /portfolio/construction/investable`

Compute an investable portfolio as close as possible, in terms of assets weights, to a desired portfolio, taking into account:
* The desired assets weights
* The desired assets groups weights
* The desired maximum assets groups weights
* The prices of the assets
* The portfolio value
* The requirement to purchase some assets by round lots or by odd lots
* The possibility to purchase some assets by a fractional quantity of shares
* The requirement to purchase a minimum number of shares, or a minimum monetary value, for some assets

References
* [Steiner, Andreas, Accuracy and Rounding in Portfolio Construction](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2261131)

## Request body

- object
  - `assets` integer, required — The number of assets
  - `assetsWeights` number[] — assetsWeights[i] is the desired weight of the asset i in the portfolio, in percentage (can be null to indicate no specific desire)
  - `assetsGroups` array[]
    - integer[] — assetsGroups[k] is the indexes of the assets belonging to the assets group k in the portfolio; requires either assetsGroupsWeights or maximumAssetsGroupsWeights to be present
  - `assetsGroupsWeights` number[] — assetsGroupsWeights[i] is the desired weight of the assets group k in the portfolio, in percentage (can be null to indicate no specific desire); requires assetsGroups to be present
  - `maximumAssetsGroupsWeights` number[] — maximumAssetsGroupsWeights[k] is the maximum desired weight of the assets group k in the portfolio, in percentage (can be null to indicate no specific desire); requires assetsGroups to be present
  - `portfolioValue` number, required — The monetary value of the portfolio
  - `assetsPrices` number[], required — assetsPrices[i] is the price of the asset i
  - `assetsSizeLots` number[] — assetsSizeLots[i] is the number of shares by which it is required to purchase the asset i (usual values are 1 if the asset needs to be purchased share by share, 100 if the asset needs to be purchased by an integer multiple of 100 shares, and 1/1000000 - e.g. for Robinhood broker - if the asset can be purchased by fractional shares)
  - `assetsMinimumPositions` number[] — assetsMinimumPositions[i] is the minimum number of shares of the asset i that is required to purchase when the asset i is included in the portfolio (usual values are the same as for assetsSizeLots)
  - `assetsMinimumNotionalValues` number[] — assetsMinimumNotionalValues[i] is the minimum monetary value that the position in the asset i is required to represent when the asset i is included in the portfolio

## Response `200`

OK

- object
  - `assetsPositions` number[], required — assetsPositions[i] is the number of shares of the asset i in the portfolio
  - `assetsWeights` number[], required — assetsWeights[i] is the weight of the asset i in the portfolio, in percentage

---

[API](https://skmtc.net/portfoliooptimizer/apis/portfolio-optimizer.md) · [All operations](https://skmtc.net/portfoliooptimizer/apis/portfolio-optimizer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/portfoliooptimizer/portfolio-optimizer/revisions/d016f340e91c/schema)
