Testing the efficient market hypothesis by searching foreign-exchange tick data for arbitrage. Currencies become a gain graph, arbitrage becomes a negative cycle, the search is NP-hard, and four methods (exhaustive enumeration, ant colony optimization, Bellman-Ford, and Karp’s minimum mean weight cycle) are benchmarked on 2008 and 2012 tick data.