
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Since arbitration is replete with sometimes very negative situations, it is almost always necessary to have an emergency shutdown condition for combat use.
Since arbitration is full of sometimes very negative situations, it is almost always necessary to have an emergency shutdown condition for combat use.
No one argues with this. But this is something that everyone can add on their own.
The mathematical interpretation of currency arbitrage in general terms is quite simple
A search showed that this is exactly what was suggested here on the forum
Forum on trading, automated trading systems and testing trading strategies.
Flat construction, but how to open on it?
anonymous, 2014.09.23 22:30
1) The vertices of the graph are all currencies in use.
2) The weights of the edges of the graph are the logarithms of the corresponding exchange rates (transaction costs can also be factored in).
3) The solution can be obtained using the Bellman-Ford algorithm.
4) If there is no path with negative cost, there is no arbitrage situation.
Fast and without brute force.
A few pictures to get you started
Implementing the search for a negative loop (arbitration) via Bellman-Ford is not difficult. But this rather recent article says that the optimal negative cycle - the shortest (smallest sum of edges) cycle - is not found. Is this true or not?
Is it really necessary to create your own cycle in 2017 to determine the strongest current arbitrage?
Bellman-Ford is good for incrementally obtaining a synthetic vintage
the optimal negative cycle - the shortest (smallest sum of edges) cycle - is not found. Is this true or not?
https://ru.wikipedia.org/wiki/%D0%90%D0%BB%D0%B3%D0%BE%D1%80%D0%B8%D1%82%D0%BC_%D0%91%D0%B5%D0%BB%D0%BB%D0%BC%D0%B0%D0%BD%D0%B0_%E2%80%94_%D0%A4%D0%BE%D1%80%D0%B4%D0%B0: "The Bellman-Ford algorithm is an algorithm for finding the shortest path in a weighted graph".
If the path with this length is not the only one - in idea, there is a chance to choose a path with the same cost, but passing through more vertices. There are two ways to solve the problem (assumption, it's lazy to check):
1) Instead of N iterations by the number of currencies and then checking for negative loop - make N iterations, but check for negative loop starting from the third.
2) In the recovery of the shortest path use the search with return. The worst case is when all paths are negative and have the same cost. Unrealistic for correct data + you can easily protect against this by adding a safety counter.
EURUSD and GBPUSD have a negative spread. But the GBPUSD arbitrage is more favourable. However, the BF can show a negative EUR->USD->EUR cycle, but not GBP->USD->GBP. The cost of the second cycle is less, but the BF is not intended to show the "best" negative cycles.
The mentioned article suggests an inaccurate method to find the best negative cycle. Hasn't a clear cycle been established so far?
ZY Although the example is bad, if BF starts with USD, it should show GBPUSD. But the point is still clear.
Forum on trading, automated trading systems and testing trading strategies
Discussion of the article "Triangular arbitrage"
fxsaber, 2017.10.10 19:43
This picture shows arbitrage from four currency pairs (number of blue arrows). Is optimal arbitrage from more participants possible?
> And their presence is determined by fulfilment of the relaxation condition at the last iteration of the BF.
Still, I suggest to start checking after each iteration :)
> The cost of the second cycle is less, but the BF is not intended to show the "best" negative cycles
It means that your implementation simply takes the first cycle with negative cost. Don't take the first one that comes along...
> And their presence is determined by fulfilment of the relaxation condition at the last iteration of the BF.
Still, I suggest to start checking after each iteration :)
> The cost of the second cycle is less, but the BF is not intended to show the "best" negative cycles
It means that your implementation simply takes the first cycle with negative cost. Don't take the first one...
Yes, the idea of going through all the cycles at once appeared. But it is not at all obvious that the smallest possible cycle will be among them.
Frankly speaking, the proofs of BF correctness (all I have read) are vague. And when it comes to negative cycles, they appear only as a bonus. And nothing concrete, except determining their presence, is guaranteed by the BF.
If there were a simple brute-force solution, the article probably wouldn't come up with an approximate algorithm for finding the optimal cycle. I haven't taken up the cycle myself yet, but so far I can't see what's so insurmountable. Search doesn't yield anything except some primitive HFT reasoning for quantum resources.
Isn't it easier to run a robot and see what it finds and trades?
I respect theorists, you can't go anywhere without them, but I am a practitioner and this idea, at least for trading on the markets, doesn't require such serious mathematical preparation, because
a) all prices offered to us already have their markup
b)counter bids are already collated before they reach us
c)in the received form arbitrage has probabilistic character.
I would be glad to hear your opinion on why such a simple idea needs such a complicated solution.