Finding Optimal Arbitrage Opportunities with QPath

Quantum optimisation

Finding Optimal Arbitrage Opportunities with QPath

Have you ever wondered if it is possible to make money by exchanging currencies? Believe it or not, the answer is yes! This is possible because exchange rates are fixed by currency pairs and sometimes when considering more than two currencies, we can find a sequence of exchanges that allows us to make money by returning to the initial currency. This is what is known as currency arbitrage. To illustrate these ideas, let us consider the example in Fig. 1.


Figure 1. Example of arbitrage with 3 currencies (gold, silver and bronze) known as triangular arbitrage. The direction of the arrow indicates the direction of the exchange, and the numerical value indicates the exchange rate.

So, for example, if our starting point is 1 gold coin, we can exchange it for 138.23611 copper coins, which we can in turn exchange for 54.66685 silver coins, and when we return to gold coins, we will have... 1.035390! In other words, we will have earned money solely by exchanging currencies.

Although from a theoretical point of view it is a very simple way to make money, in practice, currency arbitrage poses some difficulties: you must be able to identify such a situation and also consider the commission of the exchange house, in addition, the arbitrage must last long enough to be able to complete the cycle and a large enough amount of money must be invested to obtain significant returns from, usually, very small profit percentages.

Regarding the question of finding an arbitrage situation, famous traditional algorithms, such as the Bellmann-Ford or the Floyd-Warshall algorithm, are there to help. However, both of them conclude when they find an arbitrage situation, even if it is not the best possible one. Finding the best arbitrage, if any, among all possible currency exchanges is the task of combinatorial optimisation. And this is computationally very expensive for traditional computers; however, quantum computing and, in particular, quantum annealing, offer new and potentially more efficient tools to accomplish this task.

To exemplify this, let’s have a look at the results of the optimisation of arbitrage, in a situation with 5 currencies[1], using quantum annealing simulated through the tool offered by the Spanish initiative QuantumPath. The great contribution of this tool is that it allows us to implement the optimisation problem in a computer or quantum simulator solely on the basis of the mathematical expression to be optimised (see Fig. 2). Of course, this mathematical expression will have to take into account, among other things, the rate of change.


Figure 2. Example of a mathematical expression entered in the QuantumPath tool to be optimised in a real or simulated quantum annealer. In this case, the term of the optimisation expression is entered to ensure flow conservation, i.e. that the number of incoming and outgoing lines in a currency are equal.

In this case, we used the "DWave Ocean Local Simulator" and after 1,438 minutes of compilation we obtained the results shown in Fig. 3.


Figure 3. On the X-axis, there are several two-element vectors; the first element refers to the outgoing currency and the second element to the incoming currency, where each of the 5 currencies is assigned a number from 1 to 5. The Y-axis shows the probability of measuring that outcome after the computation process.

We can see in this image that the change path that corresponds to the best existing arbitration is 1-5-3-4-1. Below is an image of the resolution of the problem in Fig. 4.


Figure 4. Optimal arbitrage path and rate of change associated with each change. The notation is used as in Fig. 1.

In this case, it turns out that if we start with the currency above, after completing the arbitrage we will have 1.00074, which is a profit of 0.074%.

Quantum annealing offers novel answers to problems of great relevance in economics. And this is a concrete example in the world of finance. The possibility of finding the optimal arbitrage or, alternatively, one that is very close, even considering a large number of currencies, is a very interesting potential application of this quantum computing scheme. Will quantum annealing make us rich? We are yet to see that.


[1] Rosenberg, G. (2016). Finding optimal arbitrage opportunities using a quantum annealer. 1QB Information Technologies Write Paper, 1-7.

Orden: 
2

Do you have any questions?

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
If you continue browsing this website, you agree to our policies. I agree to the site policies and terms of use