> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fincept.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Discrete allocation

> Whole-share orders from target weights: latest prices from a price history or given, a portfolio value, greedy rounding or integer programming, long/short with a short ratio and optional reinvestment of short proceeds; the leftover cash and the error against the targets.

Toolset `pfopt_allocation`: 1 tool.

| Tool | What it does | Notes |
| - | - | - |
| `pfopt_discrete_allocation` | Whole-share allocation of a portfolio value to target weights at the latest prices: greedy rounding or an integer program that minimises the gap to the targets plus the leftover cash; long/short weights are split into a long and a short book (short\_ratio, reinvest). | |

Inputs, limits and outputs are described in [Fincept Portfolio Optimizer](/guides/fincept-portfolio-optimizer). Full schemas: `fincept_describe_tool`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.