I am trying to finish a model of arbitrage calculation for a project. I have written the mathematical modelling and trying to make it work through CPLEX ILOG. You can find both Mathematical Model and inital code I wrote in the attachments.

Basically I have to make a working model that start with any currency and leaves the system returning to the same currency and creating an arbitrage value if there is any.

At first I though I can solve it as many times as there is currency and take the maximum arbitrage value but that is not efficient at all. To solve this issue I have introduced a dummy currency in the beginning. This dummy currency has 1-1 exchange rate with all the other currencies. It starts via going to any currency and returns to the dummy currency only by the currency it has entered. (To prevent issues such as from dummy currency to GBP, then GBP to JPY and JPY to Dummy creating a non-existen arbitrage value I introduced a boolean that states y[0][i] == y[i][0] for all i ensuring that dummy can enter and leave through a single currency).

You can find simple arbitrage calculations starting from a predetermined currecny but I couldn't find too much information about modelling for all possible currencies. (The single model just maximizes inflow-outflow to initial node for any of those who are interested)

Whenever I run the code cplex returns me a trivial solutions. Is the problem at my code or at my mathematical model?

Thank you for all your help!


This question is marked "community wiki".

asked 17 Dec '16, 19:02

OR-Enthusiast's gravatar image

accept rate: 0%


your link is broken. But you could have a look at a similar example at




answered 18 Jul '17, 02:05

AlexFleischer's gravatar image

accept rate: 10%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 17 Dec '16, 19:02

Seen: 1,855 times

Last updated: 18 Jul '17, 02:05

OR-Exchange! Your site for questions, answers, and announcements about operations research.