Skip to content
All library documents

Optimal F Position Sizing from Historical Trade Outcomes

Article Strategy library · Author: Smollet

Summary

This script illustrates Optimal F position sizing using a strategy’s closed-trade results. It records profit per contract for each closed trade, identifies the worst losing trade, and scales all outcomes relative to that loss. It then evaluates a sequence of candidate risk fractions from zero to one by multiplying the growth factors implied by each historical trade. The fraction producing the largest computed terminal growth is shown as the best F estimate.

For live strategy entries, the optional sizing formula allocates a selected fraction of account equity divided by a user-supplied maximum loss per contract. Contract quantities can be rounded, though the rounding option enforces at least one contract. The method is highly dependent on the historical trade sample and the chosen loss estimate; the script does not establish that the maximizing fraction will remain suitable out of sample. The excerpt supplies example settings but no strategy-specific results or validation evidence.

Key ideas

  • The calculation converts each closed trade’s profit to a per-contract outcome.
  • Trade outcomes are normalized by the largest historical loss to evaluate candidate fractions.
  • The fraction with the highest compounded growth across the sample is selected as the estimate.
  • Optional sizing uses equity, the chosen fraction, and maximum loss per contract.
  • The result depends on past trades and does not demonstrate out-of-sample reliability.

Tags

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