Skip to content
All library documents

Capping Per-Stock Purchases by Remaining Allocation Capacity

Article BigQuant

Summary

This forum question concerns two lines in a portfolio trading template that limit how much cash may be allocated to an instrument. The poster asks whether the instrument is a stock selected by a prediction step, whether the maximum cash parameter is the per-stock allocation ceiling, and whether the position lookup returns the amount already held. Under that interpretation, subtracting the current position value from the cap gives the remaining allocation capacity; the code then reduces the intended cash order if it would exceed that capacity.

The example illustrates a basic position-sizing safeguard: account for existing exposure before adding to a position. The discussion does not include the surrounding template or a reply confirming the variable definitions, so exact semantics depend on how the platform represents positions and cash. In particular, the position value must be expressed in the same units as the allocation cap for the subtraction to be meaningful. The document provides no strategy results, asset selection method, or treatment of sells, fees, or changes in market value.

Key ideas

  • A per-instrument allocation cap can limit the maximum cash committed to one holding.
  • Subtracting the current position value from that cap estimates remaining allocation capacity.
  • A new order can be reduced when its cash amount exceeds the remaining capacity.
  • The interpretation depends on the platform’s units and definitions for positions and cash.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.