The cavity method for minority games between arbitrageurs on financial markets