Dealing with swap charges in your Forex system

It is not a secret that most commercial back-testing platforms for Forex trading fail to properly implement the calculation of credited/debited charges due to swap rates in Forex trading. Platforms like Metatrader 4 use the last value available from the broker in order to calculate swap charges for the entire history – grossly inaccurate as these values change a lot with time – while others completely ignore swap charges within the simulations. However there are somethings you can do to alleviate the influence of swap rates on your strategy so that your strategy’s statistical characteristics will not be affected tremendously from ignoring these charges or taking them into account in only an approximate manner. Today we are going to learn how to design trading strategies that are not influenced so strongly by swaps and we’ll also learn how to potentially avoid overestimating performance by introducing worst case historical swaps, even if this is only an approximate solution.


What are swap charges? These are the interest rates that are credited or debited to your account when the daily rollover for a Forex trading position happens where a currency is being held in exchange for another. The difference in the interest rates for these two currencies define the swap rate which can be either positive or negative depending on what you’re borrowing and lending. For example if you enter an AUD/JPY trade at the moment you can expect an annualized lending rate for JPY of around 0.25% with a borrowing rate for AUD of around 1.64%. This means that you would expect to gain 1.39% a year simply from holding an AUD/JPY long position. However the lending/borrowing rates are not symmetric and if you held a short your lending rate for AUD will now be 2.74% while your borrowing rate for JPY would be -0.15% giving you an effective yearly decrease due to swap charges of 2.89%.

There are also some important peculiarities in swap charging. The interest you gain or have to pay is not charged in the same way across brokers. Most brokers charge interest everyday at a given set time with triple interest on Wednesday (to account for week-ends) while others credit/debit interest to your account by the hour, including week-ends. You can imagine how charging at a given set time each day can lead to important distortions. Pairs like the AUD/JPY and the NZD/JPY regularly see downward movements close to 17 US EST which is when most brokers pay interest rates on these pairs. Since many short term traders attempt to simply get payment for the AUD/JPY and NZD/JPY Wednesday triple interest swap without having to stay-in for long the market reaction cancels the money they make in this manner by decreasing the pair value. This is analogous to the normal downside move you see on stocks on their ex-dividend date, where a payoff causes the market to behave in a way that tends to cancel the benefit, at least in the short term.

Since there is an asymmetry between swap charges – such that the sum of interests accrued for long and short positions is always negative – you can assume that the swap will always be a negative influence for a symmetric strategy (fairly similar number of long and short positions). This means that failing to include swaps in your simulations is similar to not including a spread charge. However the swap is not the same thing because it is charged and credited at specific hours on most brokers, reason why the influence on your strategy can change greatly depending on when you trade. This is why when designing systems without accounting for swaps you should avoid trading at these times, especially if you’re trading a strategy using higher leverage (anything higher than 1:20).


A highly leveraged system that attempts to scalp the AUD/JPY using shorts close to the time when interests are charged will appear to be extremely profitable in back-testing. You would appear to have a “magic formula” that predicts that the AUD/JPY will go down at a very specific time every week, possibly every day. In reality when you trade this strategy live you incur very heavy swap costs due to your AUD/JPY shorts that completely negate the gain and put the strategy into losing territory. If you try to use a broker with a different swap charging structure you will see that your spreads will increase significantly at this time as they do this to account for this arbitrage opportunity. All in all when you are doing things like highly leveraged time sensitive trading you should consider that failing to account for swaps is unacceptable.

Another solution to the swap problem – which is often most acceptable if historical interest rates are not available  and the strategy is symmetric- is to implement swap charging at the worst historically available interest rate scenario seen on that pair up until now.This is not the scenario where a given lending or borrowing rate was highest but the scenario where the actual spread between the swap credit and debit was most negative. This means that if historically holding a long gave 1.5% a year and holding a short -2% and in another case you have that holding a long gave 2% and a short gave -3% you would choose the second scenario because in this case shorts are 1% more negative than what longs would give. The worst scenario is the case where interest paid minus interest received gives the largest value. If you’re using constant spread simulations it is also safest to put charging at the time most brokers do since if you use a charging mechanism that is constant (credited/debited every hour) then spread widening at those times becomes much more critical, as I mentioned before.


As you can see the best thing you could do is to use real historical interest rates to calculate realistic swaps at each point in trading history. If this is not possible then the next best thing is to use a worst case historical swap derived from the worst spread between interest gained and paid and if this is not possible – due to platform limitations perhaps – then it is very important that you simply avoid trading scenarios where the swaps can be important. This means potentially avoiding symbols where swap charges play a key role – which includes AUD/JPY, NZD/JPY and others – and avoiding trading with high leverage around the swap charging times. Obviously another important thing if exact historical swap rates are not available is to completely avoid asymmetric strategies. For the effect of swap to be diminished – in the sense that it won’t lead to huge variations in system characteristics – a strategy must always have a rather similar number of longs and shorts as a function of time, otherwise ignoring swaps or heavily relying on the “paying side” of the worst time historical swap may be playing a key role in establishing the system’s profitability.

If you would like to learn more about swap rate and how you too can back-test using historical swap rates using a testing platform where you can modify the entire source code please consider joining, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general.

Print Friendly, PDF & Email
You can leave a response, or trackback from your own site.

One Response to “Dealing with swap charges in your Forex system”

  1. FXWinner says:

    Thank you Daniel, for this information.
    This is relevant to long term strategies for intra-day trading, when positions are hold on average for 2-8 hours, occasional swap doesn’t affect the end results.
    Also there are Swap-Free accounts available. If 5-10 trades are executed a day, swap will be the least of your worries, commission and spread – there are your main opponents, swap will be very tiny bit of the trading expense.

Leave a Reply

internal_server_error <![CDATA[WordPress &rsaquo; Error]]> 500