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

# Size ranges

> The rule that caps or floors how large one holding can be.

A size range (the "position size range" in full) is a rule on individual holdings within an asset class: how large any one holding can be by your own rule, as a percent of your total portfolio.

## Size ranges and allocation bands

A band governs an asset class as a whole, for example "Equities sit between 44% and 67% of the portfolio." It says nothing about how that 44% to 67% is split across individual holdings. A size range does that. The two are separate rules with separate statuses. A class can be compliant as a whole while one of its holdings is oversized, or the other way round.

See [Allocation bands](https://docs.allocait.app/concepts/allocation-bands.md) for the class rule.

## Setting a size range

To set a size range, open **Allocation**, then the **Rules** tab, and add or edit a class's rule. Enter a minimum and a maximum under **Position size**, for example 3% to 9% (a fictional example). The minimum can equal the maximum but not exceed it.

Enter both numbers or neither. The app and `save_class_rule` refuse a maximum without a minimum. Only a [rules text](https://docs.allocait.app/concepts/rules-text-format.md#defaults) fills in a missing minimum, which gives a cap with no floor, for example "no single equity holding over 7% of the portfolio."

A class with a band but no size range shows its holdings as **Not monitored** for sizing, even though the class itself has a compliance status. A class with a size range but no band is the other way round: its holdings are checked and the class total isn't.

A short has its own range. See [Shorts](https://docs.allocait.app/concepts/shorts.md).

## How Allocait checks it

For each holding in a class with a range for the side it is on, Allocait compares that holding's current value, as a percent of your total portfolio, to the range: the size range for a long, the short size range for a short, using the size without the minus sign.

| Status | Meaning |
| - | - |
| In range | The holding's share sits inside the range. |
| Below min | Under the range's minimum. |
| Above max | Over the range's maximum. |
| Not monitored | The class has no range set for the holding's side: no size range for a long, no short size range for a short (a negative share count). |

A share exactly at either edge is in range. Allocait also allows a tolerance of 0.01 of a percentage point: a share within 0.01 of an edge counts as in range. [Status words](https://docs.allocait.app/concepts/status-words.md) maps these statuses to the words each surface uses.

## What agents get

Agents get the same status:

* `POST /compliance/check`, the `compliance` block of the portfolio snapshot and `check_allocations` list each holding outside its size range in `size_violations`.
* `check_trades` judges a proposed change and returns one size row per symbol, on the side the symbol ends on.
* A holding that newly goes outside its range can send a `compliance.violation` webhook to an endpoint you've set up and subscribed to that event, after the daily close. See [Webhooks](https://docs.allocait.app/guides/webhooks.md) for who can set one up and when delivery happens.

`check_allocations` checks a mix given as percentages, not prices. Two cases need care:

* **An exit:** send 0 for the holding. It counts as 0 toward its class, and no size range judges it.
* **A new holding:** name its class in `asset_classes`. Allocait then judges the symbol against that class's band and size range as it would a holding you already own. Without a class, the symbol appears in `unknown_symbols` and no rule judges it.

## Next steps

* [Size a position](https://docs.allocait.app/guides/size-a-position.md) turns a size range into a share count.
* [Shorts](https://docs.allocait.app/concepts/shorts.md) covers the short size range.
* [Allocation bands](https://docs.allocait.app/concepts/allocation-bands.md) covers the rule for a whole class.
* [Webhooks](https://docs.allocait.app/guides/webhooks.md) covers the `compliance.violation` delivery.


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