Deep dive into forex

Deep dive into forex

Yury Sokolov avatar

Yury Sokolov

17 May 2024

This article aims to provide an advanced introduction to forex markets, their hidden nuances, and flaws, and to show how we approach them in Finazon.

Forex stands for foreign exchange market and canonically refers to exchanging one currency for another. Forex is the oldest financial market in the world, and it kicked off once people started to exchange different forms of money – approximately 200 CE at the Holy Land [1]. Unsurprisingly, with the development of humanity, the forex market became the largest one, averaging an astonishing $7.5 trillion in transactions a day while being the most liquid [2]. As a matter of fact, it also became highly complex, featuring various market types, levels of access, and trading gradations. We will begin with the fundamental concept of OTC trading.

Over-the-counter trading

The first fundamental concept to understand is the way currencies are traded. Unlike stock markets, which are typically sold on centralized exchanges such as New York or Nasdaq, all currencies are traded non-centralized—that’s why it’s called over-the-counter, or OTC, in short. OTC trading is composed of many independent players who deal directly with each other.

On top of OTC, a dealer network interconnects these players. Networks can be local or international and consist of banks, brokers, and corporations. For example, in the US, the OTC Bulletin Board (OTCBB) is one such network. Unlike many others, it is regulated by the Financial Industry Regulatory Authority (FINRA).

deep-dive-into-forex-otc

Market hierarchy and the role of market makers

The hierarchy of institutions and their respective trading volumes defines influence in the forex market. These include from the top down: interbank market, commercial banks, hedge funds and investment firms, corporations, retail brokers, and retail traders.

institutions-hierarchy

Market makers, aka liquidity providers, are among the primary players in the forex markets. Their purpose is to allow everyone else to purchase a specific currency. Depending on your requirements and volumes, a market maker could be a bank or a standalone liquidity provider.

In exchange for the risk that market makers carry, they have to make profits. The standard way to do it is by gaining a bid/ask spread. The more liquid the currency is, e.g., EUR/USD, the less the spread is, hence smaller gains per transaction; this happens when many liquidity providers offer the same currencies and set their exchange rate competitively. On the other hand, currencies with less liquidity and less competition have wider spreads, e.g., EUR/RSD.

Transactions typically are handled within banks’ trading floors or offices of independent market makers, where dozens of traders set their rates and perform trades with other banks and on behalf of their customers.

bid-ask-spread

How are exchange rates established?

The foundation of modern economics, developed by John Maynard Keynes in the past century, states that foreign exchange rates are set with the help of an invisible hand of the market demand and supply [3]. However, some currencies might have fixed exchange rates, such as UAE’s Dirham, which has had a rate of $3.6725 since 1997 [4].

Pegged currencies are the third and last option. These are between floating and fixed rates and are attached to a reference currency but with a predefined room for fluctuations. For example, the Chinese yen can have a 2% change from the daily exchange rate versus the US dollar between 1994 and 2005 [5].

Both fixed and pegged rates are directly established by the central banks of the denominating currency. Central banks do not directly intervene in an exchange rate; however, they can do so indirectly using monetary and fiscal policies, with tools such as interest rates, reserve requirements, discount rates, etc. Other factors that affect long-term interest rates are geopolitical conditions, expectations, and economic performance.

The market sets fluctuating rates that dictate which currency is more valuable. Suppose banks, businesses, and people believe Canada is doing great in the USD/CAD case and deserves more economic investments. In that case, the exchange rate will increase for Canadian dollars in exchange for US dollars. The exchange rate rises because the supply of each currency is finite, and the more people buy, the less circulation there will be, and the higher the currency value will be.

forex-supply-demand

Types of forex markets

Everything above was related to the most common forex market type—spot. Every other forex market is a derivative, divided into five categories: forward, non-deliverable forward (NDF), swap, future, and option markets. All derivative markets mainly aim to hedge the risks in the spot market or mitigate the outcomes of speculation.

Spot

In the spot market, transactions happen at the current exchange rate and are settled within two days (T+2). SPOT is the most common type; transactions are handled by directly exchanging one currency balance for another.

Forward

The forward market is the same as the spot but with a future settlement day. That means that transactions will happen on a specific day and time, at a particular rate, and a specific quantity, regardless of market conditions. The conditions of the trade can be custom and are up to both parties to agree upon.

Non-deliverable forward (NDF)

NDFs have the same features as forward contracts, with the only difference being that there are no cash payments for the total amount of the contract. Instead, only the profit or loss is paid out.

ndf-formula

Swap

Swaps are temporary contracts in which parties agree to exchange currencies and return the same amount to each other at an agreed-upon future date.

Future

Futures are similar to forwards but are fixed contracts with preset characteristics, such as volume, maturity, and price. They are typically traded with a 3-month maturity.

Options

Unlike forwards and futures, options give you the right to conduct transactions but not an obligation. Options can be of two types: call and put, depending on which direction you anticipate the market to go. If you don’t exercise your right, you pay a fee. All other characteristics are the same and agreed upon: volume, settlement date, and exercise price.

Problems with forex

Now that we have an overview of Forex’s operation, we can discuss its flaws. Let’s begin with the primary purpose of forex markets. In the utopian world, it would facilitate international trade and other minor uses, such as currency conversion.

Modern money is no longer what it used to be, even 100 years ago. It is no longer cash or anything physically stored in the vaults, as that is why forex markets were established. Nowadays, money is merely an entry in a database–similar to how every Uber ride or dentist visit is registered.

Due to the gap between technology and the approach used, banks, liquidity providers, hedge funds, and other companies monopolized and took control of the world’s finances. It lets those players earn extra profits of billions of dollars daily for simple database actions while restricting new players from entering the market. That leads to almost no direct trading between people and entities, as there is always some redundant intermediary; however, that would be highly beneficial for transparency and lowering the fees.

Another aspect comes from the brokers selling order books of their customers to liquidity providers. Market makers sitting on billions of dollars now can observe the entire market's current state. It sees where traders expect to stop losses and take profits, their volumes and sentiments, etc. With perfect market information, purchasing power, and algorithms, it is relatively simple to manipulate a specific market for liquidity providers and earn super profit from traders’ losses. That is why forex markets have one of the largest leverages – 1:100, in contrast to 1:5 in stock markets. It turns out to be similar to a casino.

According to the famous economist Milton Friedman, speculation is reasonable because, in the long run, the inefficient speculators will go out of the market due to money losses, and the ones that trade according to the market conditions are in profit, hence to survive they need to provide extra liquidity when needed [6].

That may have been true 70 years ago when we economists were basing theories on the present technological advancements; however, now, in the modern era of computers, with most transactions made by hedge funds and speculators, things should operate entirely differently.

Our secret future solution

The modern version of forex should have an open-source protocol for connecting every market participant directly with each other. Also, we should preserve the primary purpose of the foreign currency exchange and let in only users with that purpose. That can be achieved by introducing verification of individuals and businesses. That would ensure the floating exchange rate permanently reaches market equilibrium without price distractions.

No extra profits will be made, no transaction fees will be charged, and there will be close to zero bid/ask spread. The solution is similar to the electronic communication networks (ECNs) that some brokers have; however, these tend to have high upfront and operational costs, be user-unfriendly, and be a golden mine for speculative algorithmic trading.

Forex in Finazon

Finazon provides level 1 forex data aggregated from multiple sources. Since Finazon, is not only a data marketplace, but a data provider too, we came up with a strong solution to deliver one of the most precise forex market data feeds.

Given the many nuances in forex markets, it is beneficial to have a composite feed that does its best to reflect close to “real” market situations without redundant feed enrichments. We have three main criteria for the model: frequency, spread, and closeness to the reference feed.

Frequency is important because one of the main factors in markets’ volatility is that the higher the volume of trades, the higher the weight such venues should have in the model. Alpha is the maximum allowed time between trades.

formula-forex-freq

Venues with a tighter spread are preferred, showing higher liquidity and credibility.

spread

The last factor is the distance to the reference price. This is a custom feed that we assemble only from large enough quotes and trades, thus trying to minimize the noise from speculators and keep only the real trading data. Then, all the currency pairs in each venue are compared with that reference feed, and the closer they are – the more weight the venue is given. This also helps to smooth the data, removing spikes and other errors.

rmse

Beta is each venue, and beta* is the reference feed composed of mid-price points. Then, we find the closest point for each reference feed point using the last observation carried forward approach (LOCF).

3-equations-sum

Now, as we define three metrics for optimization, we can solve the equation with standard methods: the root sum squared (RSS) and quadratic optimization technique. The reference feed is recalculated every 150 milliseconds.

Forex API is available for personal and commercial use. Starting at $19 monthly.

Summary

Forex is far the largest and most volatile market on the planet. With it comes the complexities, opportunities, and challenges of the modern days. Foreign exchange has stepped away from its purpose and will inevitably advance after a few centuries of stagnation. The only question is when.

17 May 2024

Share to

bullion coin etherium bitcoin

Start your journey with Finazon

Gain immediate access to the financial data

Finazon • Marketplace for the Global Financial Data APIs
Finazon is a financial data marketplace covering stocks, forex, cryptocurrencies and beyond. Access real-time, historical and alternative data via API & WebSocket.
Url:
credit card
Finazon LLC