Math behind a trade: how to factor in all costs


Trading in the financial markets is not only about profit or loss resulting from the price movement but also additional costs that often get overlooked. In our previous articles covering the expected value, we have discussed how to calculate it.

The expected value in trading

Today, we are going to talk about the aspects that need to be considered when opening a position. When it comes to the forex market, this includes spreads and swaps. In today's article, we are going to review the aspects that must be factored in if you wish to trade profitably and consistently.


1. In Lieu of a Preface: A True Story about Forex Swaps and Spread
2. Trading Costs: Here’s What You Should Know
3. What Is Forex Spread
4. How to Factor in Spread When Trading
5. Swap: Here’s What You Should Know
6. What You Should Keep in Mind to Avoid Trading in the Red
7. Other Things to Remember about Trading Costs

In Lieu of a Preface: A True Story about Forex Swaps and Spread

The phone started ringing for the third time. The analyst trader XYZ glanced at the phone screen; it was his colleague from another department, a client manager.

-Hey! I’ve got a client here who wishes to consult with you. He has already called, like, four times at least and claims it’s an emergency. Could you call him back?

-Okay, give me his number, XYZ agreed.

Judging by his tone, the client was extremely overwhelmed.

-Hello Mr. X! Thanks for calling me back. There’s something I need to ask you about. It’s an extremely urgent matter! I’ve had a locked AUD/USD for a while now, gotta fix it somehow but have no idea how to do that. The client mentioned the opening and closing prices. They were indeed opened a long time ago. Plus, neither price would be relevant for a while.

XYZ sighed heavily. This is a common problem faced by many newbie traders. They impulsively lock in positions which are impossible to exit without suffering losses later.

In this scenario, there are two solution:

1. Close both trades in the red and finally start trading the right way.
2. Sit around and wait indefinitely.

When the XYZ trader mentioned this to the client, this was the response he got:

-You see, here’s a problem… I can’t do that either way. I’ve got no money left in my account. And it’s Wednesday today (a triple swap is charged on Wednesday night) which means that I’ll get the margin call by tomorrow morning!

Trading Costs: Here’s What You Should Know

As you can see, the trading losses can be caused not only by trades where the prices move against you. There are also regular expenses associated with opening of the trading positions and their management. You must keep that in mind in order to avoid trading in the red.

The mentioned costs include spreads and other fees charged when you open a position, as well as swaps which is an interest fee paid when you keep a position open overnight. Typically, they aren’t massive, yet if you ignore them, you can easily miss out on profit even with winning trades.

Imagine the following scenario: the trader opened a trade but the price went against him. Instead of placing the stop loss order and fixing a small loss, he or she decided to overstay the position and wait for the price to move in the desired direction.

This position remained open for two weeks. The price has finally approached the level of opening price or perhaps the said trader even managed to take a small profit. However, a large amount of negative swap got accumulated in the course of this time. After making relevant calculations, the trader realized that this trade turned out to be unprofitable after all. So, it could have been a lot wiser - and cheaper - to exit it instead based on the stop loss.

In order to prevent similar situations from happening, let’s see how to factor in trading costs the right way.

What Is Forex Spread


Spread is a difference between the bid and the ask prices of the financial instrument.

By opening the “Market Watch” window in the MT4 or MT5 trading platform, you will see two price - the bid and the ask - next to each traded asset. Bid is the price at which the trader can sell the asset, and ask is the price at which the asset can be purchased. In a nutshell, the spread is the difference between these prices.

Forex spread: Market review table

The size of the spread depends on the terms of liquidity providers and other market factors such as supply and demand ratio in terms of a particular asset. It also may vary at different brokerage companies. Even if you trade with one broker, the spread may not be the same in terms of different account types.

Are there forex brokers who offer minimum spreads? Yes, there are. For instance, Gerchik & Co offers a floating spread which changes depending on the market environment.

Aside from that, there is even an option for trading forex spread. Thanks to a special trading aggregator, the best prices from liquidity-providing banks are selected. This means that when opening trades, you will see the minuses in your account just like with the fixed spread.

Become a client at Gerchik & Co

How to Factor in Spread When Trading

  • Familiarize yourself with the terms of spreads for assets you are interested in.
  • If you open positions with a big take profit which is up to several dozens of pips, the size of spread may not be an issue for you.
  • If you are using one of the scalping strategies and open many trades with a small profit, keep in mind that you start making money when the price works the spread.
  • When choosing the type of an account, make sure to pay attention to whether you will be able to work the offered swap size with your strategy.

Forex spread and how to factor it in

It stands to mention the brokers without forex spread. Do they exist? Yes, they do but there is more to this than meets the eye. Brokerage companies profit from spreads. And if there are no spreads, how does a broker make money? It’s likely that there will be additional fees charged for position opening and other hidden costs.

Swap: Here’s What You Should Know

If you are a trader who is using scalping strategies, the spread size is important to you since it may result in losses even in case of winning trades. Meanwhile, if you are someone who prefers a long-term trading approach, the crucial aspect here will be the swap.


Swap is a fee which is charged or earned for keeping position open overnight.

When checking out trading terms offered by brokerage companies, you may encounter two types of swap: long and short one. A long swap is charged for keeping a long (buy) position open overnight, and a short swap is charged for keeping short (sell) positions open respectively.

The swap size depends on the traded instrument. When it comes to the currency pairs, it depends on the difference of the interest rates in countries, the currencies of which are included in the pair. Some trading strategies (e.g. carry trade) allow making money with swap in the currency pairs with positive swap.


What You Should Keep in Mind to Avoid Trading in the Red

Since swaps are fees charged for keeping positions open overnight, their size is relevant for traders who hold positions for several days.

Here’s what must be factored in:

1. When opening a position for the duration of several days or even weeks, make sure to calculate what the total amount of swap will be.
2. You must understand how long it will take the price to reach your take profit. It is hard to predict the time in financial markets. This is why try to make at least an approximate forecast.
3. When placing take profit, calculate for how long (days-wise) you’ll be able to hold the position without incurring major losses resulting from swaps. For instance, if the price reaches the target in 10 days, the negative swap will be equal to the profit made and so the overall result per position will basically be zero.
4. Based on obtained data (aside from the price parameters per trade), determine how long you will be able to hold this position open and when it will make sense to close it.
5. Keep in mind that a triple swap is charged on Wednesday night.

To see the actual spread and swap for each trade, simply open the “Terminal” table in MetaTrader platform. The amount of swap and spread will be shown in the table next to each trade (if the position was held open overnight).

Forex spread: Table in the terminal

Other Things to Remember about Trading Costs

In this article, we attempted to cover common trading costs. As you can see, seemingly small expenses associated with swaps and spreads can become a real source of concern unless you factor them in in your trading strategy and stick to the clear game plan.

Aside from the market analysis and strict observation of the trading plan, the traders need to know the ins and outs of money management. When planning out the stop loss and take profit ratio, always take expenses into account. Make sure that it is economically feasible to use your strategy with the given expected value.

If you are still a newbie or your understanding of the topics described above could use some improvement, make sure to fill the gaps by completing special training or exploring educational content on our website.

In our next article, we are going to discuss how to avoid the margin call.

Stay tuned!

Login in Personal Account