Position Sizing from Account Risk and Stop Distance
Summary
This educational example calculates order quantity from a chosen risk budget and a stop-loss distance expressed as a percentage of entry price. The risk budget can be set either as a percentage of account equity or as an absolute money amount. The code divides that budget by the estimated monetary loss per unit at the stop distance, then uses the resulting quantity for sample long and short entries. It also converts the percentage stop distance into a price-point exit distance.
The example explicitly assumes the account currency matches the traded symbol's currency and uses a stated leverage setting that can be changed. Its sample entries are generated periodically and are not evidence of a trading strategy or profitability. The calculation depends on instrument point value and price conventions, and the displayed assumptions may not transfer to other markets or account currencies. It does not discuss fees, slippage, gaps, or whether the stop can execute at its assumed price, all of which can make realized risk differ from the estimate.
Key ideas
- The position quantity is derived by dividing a risk budget by the estimated loss per unit at the stop.
- The risk budget can be expressed as a share of equity or as an absolute money amount.
- The stop distance is specified as a percentage of entry price and converted to price points for an exit.
- The example assumes matching account and symbol currencies and specifies a leverage setting.
- Fees, slippage, gaps, and execution uncertainty can cause actual losses to exceed the calculated risk.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.