size_position
Check a proposed trade against desk risk limits, compute position size and capital at risk, and get an approved, warning, or veto verdict.
Instructions
Size a trade against the desk's risk limits and rule on whether it passes.
Returns the share count, the capital genuinely at risk, current portfolio
heat from open journalled theses, and every limit checked with its observed
value and threshold. The `verdict` is one of `approved`,
`approved_with_warnings` or `vetoed`; a veto is a refusal, not a preference.
Never work a share count out yourself — this is where a correct thesis
loses money. Anything that could not be checked, such as a missing ATR or
target, appears under `limitations` rather than being assumed to pass.
Args:
ticker: Stock symbol, e.g. "NVDA".
direction: "long" or "short".
entry: Intended entry price.
stop: Stop price. Must sit below entry for a long, above for a short.
account_equity: Total account equity the risk budget is drawn from.
target: Intended exit. Omit only if the chartist gave none.
atr: ATR(14) from `get_technicals`, to check the stop against noise.
risk_pct: Requested % of equity at risk. Clamped to the policy maximum.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| atr | No | ||
| stop | Yes | ||
| entry | Yes | ||
| target | No | ||
| ticker | Yes | ||
| risk_pct | No | ||
| direction | Yes | ||
| account_equity | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||