Topic: Swaps Do Change

Hello Traders,

I was curious whether swaps change frequently and whether I need to use "real swaps" in my newest and greatest backtester.

I made a simple script to collect swaps from MetaTrader 5 for each day. It stores the swaps in a local database for later use.

I checked it today and noticed the swaps had already changed twice over the last two weeks.

https://image-holder.forexsb.com/store/mt-editor-db-swaps-2026-02-21-thumb.png

I'll try to find historical information for the swaps and will use it in my next program.

Trade Safe!

Re: Swaps Do Change

Hi Popov,

The swap should be linked to a kind of “interest rate” which is applied on the value $ of the size.

In other words, the Swap represents the interest you pay or receive for holding a position overnight, since in FX you are effectively borrowing one currency to buy another.

In simplified terms:

Swap ≈ (Interest rate of the bought currency − Interest rate of the sold currency) × position size

Because the interest rate differential changes over time, swap can shift from negative to positive or vice versa.
If brokers were fully transparent and consistent in their swap calculation, it would be possible to estimate it quite accurately.

Instead of relying purely on historical swap observations, it could be interesting to model the swap component and integrate it directly into the strategy code. The underlying reference rates are public and transparent, so the main inputs are already available.

This could allow strategies to anticipate the swap impact instead of discovering it only ex-post in the results.

BR
Vincenzo

Re: Swaps Do Change

My purpose is to get the same results in backtesting in EA Studio and MetaTrader.
Now EA Studio is using fixed swaps and exchange rates.

I'll try to implement real swaps and real exchange rates to improve the backtest precision.

The exchange rate converts the trade's profit into the account currency when necessary. If the backtest is over a long period, exchange rates and swaps can change significantly, which may affect the results.

> In other words, the Swap represents the interest you pay or receive for holding a position overnight
In most cases, the brokers apply a spread in points. The actual swap type is provided with the data feed.

Re: Swaps Do Change

okay, got it.