Position Sizing

The math of capital allocation. Learn how to calculate unit size based on risk tolerance, volatility, and account equity.

Updated 2024-03-23
intermediate

Position Sizing

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.

The Lever of Success

Position sizing is the most powerful lever in your strategy. It is the bridge between a strategy that "makes money" and a strategy that "builds wealth." However, used incorrectly, it is also the fastest way to trigger a catastrophic margin call.

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 Management 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.
Under the Hood: Dynamic Quantity Nodes

AlgoLift's execution nodes are "Account-Aware." You can program a node to fetch your Current Net Liquidity in real-time. This allows your strategy to calculate its own size the microsecond a signal fires, ensuring that even if you have multiple strategies running, your risk is always calculated against your actual available margin.

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).
Pro Tip: Equity Curves as Filters

Consider adding a "Drawdown Filter." If your current strategy is in a drawdown of more than 10%, you can use Logic Nodes to automatically reduce your position size by 50%. This "Defensive Mode" slows down the bleeding while you wait for your edge to return to favor.