Stocks slipped Thursday as a three-day rally ran out of steam. A surge in oil prices also slowed, and consumer stocks fell after Walmart reported disappointing sales and cut its projections for the year.
The losses were small but spread across many industries. Energy stocks fell the most, followed by banks. Those stocks had made big gains over the last three days as the market rallied. Walmart’s weak results put pressure on other retailers as well as supermarket chains.
The Dow Jones industrial average gave up 40.40 points, or 0.25 percent, to 16,413.43. The Standard & Poor’s 500 index lost 8.99 points, or 0.5 percent, to 1,917.83. The Nasdaq composite index slid 46.53 points, or 1 percent, to 4,487.54.
Walmart’s profit fell compared with last year, and its sales were weaker than analysts expected. The retailer now says its net sales this year will be about the same as in 2015. It’s struggling with competition from online giant Amazon and other retailers and is also paying its employees more, which has reduced its profits. In January the company said it would close 269 stores.
Thursday the stock lost $1.99, or 3 percent, to $64.12. It’s down 26 percent over the last year.
Walmart is the first major retailer to report its quarterly results. Competitors including Target, JC Penney and Macy’s will follow next week. Retail consultant Walter Loeb said he thinks most of those competitors will also report disappointing results.
Oil prices fluctuated after a big rally over the past few days. Investors are hoping that a round of international talks will lead to a deal that addresses a glut in oil production, but the U.S. government reported that energy stockpiles are still growing.
U.S. crude added 11 cents to close at $30.77 a barrel in New York. The price of U.S. oil has climbed 17 percent over the last week. Brent crude, a benchmark for international oils, lost 22 cents to close at $34.28 a barrel in London.
While oil companies have shut down hundreds of oil drilling rigs, it will be months before oil production really slows because drilling operations have become much more efficient, said independent analyst Jim Ritterbusch.



