How the paper-trading prototype approaches risk management and why these concepts matter.
A common misconception is that position size is risk. In this prototype, they are treated separately:
Two trades with the same dollar allocation can have vastly different risk if their stop distances differ. The dashboard's sizing logic accounts for both the allocation cap and the stop distance to ensure the dollar risk stays within configured bounds.
The simplest risk control: a hard cap on the maximum dollar amount allocated to any single paper trade. For example, with a $1,000 max, the position size is calculated as:
qty = min(max_dollars / entry_price, account_buying_power / entry_price)
This does not limit the dollar loss — a $1,000 position with a wide stop could lose more than one with a tight stop. The stop distance is a separate variable.
Instead of a fixed dollar amount, position size is calculated as a percentage of the current paper account equity. For instance, a 1% equity allocation on a $50,000 account would allocate $500 to the trade. This lets paper trade size scale with account growth (or shrink with drawdowns).
The percentage is applied per trade, so multiple simultaneous positions each draw from their own allocation slice.
Every confirmed signal includes a stop-loss level and a target level. The stop distance is configurable (default ~$0.30) and can be adjusted based on typical ATR or volatility. The risk-reward ratio (R:R) determines how far the target is relative to the stop:
target_offset = stop_distance × R:R
A 1.5 R:R means the target is 1.5× the stop distance away. Bracket orders are submitted with both stop-loss and take-profit levels pre-attached.
The prototype enforces a one-trade-per-symbol rule and a one-trade-per-symbol-per-day rule. This prevents:
Multi-symbol positions are allowed up to a configurable max open positions limit, spreading risk across instruments.
Paper trading allows the researcher to:
The prototype is designed paper-first. Live-mode exists only as a guarded flag and is intentionally unsupported in the current scaffold.
| Control | Description |
|---|---|
| Paper-only default | Alpaca paper environment required; live trading explicitly unsupported. |
| Enable flag | Order submission blocked unless ENABLE_ORDER_PLACEMENT=true. |
| One per symbol | Cannot hold two paper positions in the same symbol. |
| One per day | Cannot re-enter a symbol after a fill in the same session. |
| Max positions | Configurable cap on simultaneous open positions. |
| Bracket orders | Stop-loss and take-profit attached at submission. |
| No-trade window | Configurable time range to avoid low-contr periods. |
| Size limits | Fixed $ max or % equity, both configurable. |
| Session exit | Forces unresolved trades out at configurable session end time. |