Calculating Trading Profit, Loss, Spread, Commission, and Swap
Summary
The document develops a mathematical framework for estimating order profit and loss while accounting for bid and ask prices, spread, commission, swap, contract size, and currency conversion. It starts with simplified buy and sell calculations, then adds transaction costs and distinguishes commissions or swaps charged in points from those calculated as a percentage of contract value. It also explains why swap accrual depends on how long a position remains open and why conversion rates may be needed when the profit currency differs from the account currency.
The author compares the proposed calculations with built-in platform results across currency pairs and reports that closing-time calculations are generally more accurate in the examples. The model is checked in a strategy tester and is intended for use in automated trading tools. Its scope is qualified: commission methods are simplified, conversion-rate selection has unresolved subtleties, and the reported comparisons do not establish accuracy across every instrument or broker convention.
Key ideas
- Buy positions open at the ask and close at the bid, while sell positions open at the bid and close at the ask.
- Spread, commission, and swap all affect realized profit or loss and should be included in estimates.
- Commission and swap may be expressed in points or as a percentage of contract size.
- Currency conversion factors are needed when the account deposit currency differs from the relevant trade currency.
- Swap accrual depends on position duration, while a simple elapsed-day estimate may not capture all rollover rules.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.