A swap is essentially a fee debited or payment credited to your trading account for holding a forex trade overnight. Generally, it is calculated by comparing the interest rates of the central banks’ associated with the underlying currencies quoted in the currency pair.
For example, lets suppose you have taken a trade on the GBP/USD.
If you are long this currency pair (buy position) and the Bank of England’s (BoE) interest rate is higher than the US Federal Reserves, you should experience something called a positive carry – where the interest rate received from holding the GBP position long is higher than the interest rate paid for holding the USD short.
In contrast, if we were short (sell position) this same currency pair, we would experience a negative carry – where the interest rate received from holding the USD position long is lower than the interest rate paid holding the GBP short.