In systematic trading, your entry signal tells you where to get in, but your position sizing tells you if you will survive. Trading the same number of units (e.g., "1 contract") on every trade is a common amateur mistake. Professional quants determine their size based on the specific risk parameters of each individual setup and the current state of their account equity.
Risk-Based Sizing (Fixed Fractional)
The most robust method for long-term growth is Fixed Fractional Sizing. In this model, you risk a predetermined percentage of your account (e.g., 1% or 2%) on every trade.
- The Formula:
(Account Equity × Risk %) / (Entry Price - Stop Loss Price) = Position Size - The Benefit: As your account grows, your position size increases (compounding). As your account shrinks during a drawdown, your size automatically decreases, protecting your remaining capital.
- AlgoLift Implementation: Use the Trade nodes to link your "Quantity" input directly to your "Account Balance" and "Stop Distance" nodes.
Volatility-Adjusted Sizing
Not all market environments are equal. 10 points of movement in a "quiet" market represents much more relative risk than 10 points in a "volatile" market.
- Normalization: Use the ATR (Average True Range) node to calculate your size. In high-volatility environments (high ATR), your position size should decrease. In low-volatility environments, your size can increase.
- The Goal: To ensure that every trade has the same "Dollar Risk" regardless of how much the market is swinging.
The Kelly Criterion (Advanced)
For traders with a large sample size of validated backtests, the Kelly Criterion is a mathematical formula used to determine the "Optimal f"—the percentage of capital that maximizes the long-term growth rate.
- Logic: It balances the "Reward-to-Risk Ratio" against the "Win Probability."
- Warning: Full-Kelly sizing is often too aggressive for the emotional reality of trading. Most institutional traders use a "Half-Kelly" or "Fractional-Kelly" approach to provide a buffer against unexpected market shocks.
Maximum Unit Constraints
Regardless of what the math says, professional systems include "Safety Caps."
- Hard Caps: Setting a maximum number of contracts/shares that the strategy is allowed to trade, regardless of account size.
- Liquidity Caps: Ensuring your position size doesn't exceed a specific percentage of the average daily volume (ADV) of the asset, which prevents your own orders from moving the market against you (Self-Inflicted Slippage).