Stocks were lower, led by declines in materials and energy companies. Traders were also discouraged by weak trade figures from China.