How Trading Algorithms Identify Profitable Opportunities