Risk
How to calculate position size in a simulation
Convert a risk budget into a number of units and check how costs and available capital affect the result.
Start with a loss budget
For a simulated long spot position, convert a percentage of capital into the amount the scenario can lose. In a model without leverage, subtract the assumed exit price from the entry price to obtain the difference per unit. A zero difference or an exit above the entry falls outside this loss formula.
Add the estimated fees on both sides and any slippage not already included in the prices. Divide the loss budget by the estimated loss per unit. Round down to the market's quantity increment.
Check whether you can fund the purchase
Limit the quantity to what the available balance can cover, including the entry fee. The distance to the exit describes the loss scenario, while the balance limits the amount available for the simulated purchase. A narrow distance increases the calculated quantity and can exceed the balance limit.
Record the target price and the costs in the profitable scenario separately. A net reward-to-risk ratio compares two scenarios. To estimate expected value, you also need a credible estimate of how often each outcome occurs.
Recalculate with a worse exit
A price gap or thin order book can yield a worse exit than assumed. Run another calculation with a wider price difference. Comparing the two results shows how much depends on the execution assumption.
A loss budget of 20 currency units
Capital is 4,000, the example loss budget is 0.5%, entry is 100 and exit is assumed at 96. Add 0.50 per unit for fees and slippage. The modeled loss is 4.50 per unit, and 20 ÷ 4.50 gives about 4.44 units, or 4 with an increment of one.
Try it yourself
Use the calculator to compare two slippage assumptions with the same budget. Record the currency, quantity increment and any costs already included in the prices.
Sources and documentation
Examples are for educational purposes. Trading crypto-assets involves the risk of losing funds.