Costs, swap and funding
A run applies four costs to a trade. Each fill records them: spread, commission, swap and slippage.
Where the numbers come from
The spread and the swap come from the broker facts that your connected account reports. The facts are saved once per broker server and shared by everyone on it. A run gets a copy of the facts for its symbols and is stamped with the hash of that copy, so a result says exactly which facts it used.
| Cost | Source |
|---|---|
| Spread | The history when it has one, otherwise the broker's spread in points, which is fixed or floating as the broker says |
| Swap | The broker's swap mode, its long and short rates, and the weekday that carries the triple charge |
| Commission | A setting in your Forge execution profile |
| Slippage | A setting in your Forge execution profile |
Commission is yours
A terminal does not report commission reliably for each symbol, so Forge does not guess. The run uses the commission in your execution profile and says so on the result.
Swap
Swap is charged for holding a position over the broker's rollover. The rate differs for long and short, and some brokers charge three nights on one weekday. A strategy that holds for minutes pays none. A strategy that holds for weeks pays it on most days.
A missing fact is not zero
When a broker does not report a fact, the field is empty. It is never read as zero. A run that needs a fact the broker did not give says so, instead of running with a number nobody measured.