Companies doing business in foreign countries are at risk due to fluctuations in currency values when they buy or sell goods and services outside of their domestic market. Foreign exchange markets provide a way to hedge currency risk by fixing a rate at which the transaction will be completed. A trader can buy or sell currencies in the forward or swap markets in advance, which locks in an exchange rate.
Locking in the exchange rate helps them reduce losses or increase gains, depending on which currency in a pair is strengthened or weakened.