U.S. stock indexes ticked lower Thursday, but only after a circuitous ride that saw them flip multiple times between small gains and losses. It's the latest meandering course for a market that's been pushed in many directions the last few weeks.
Food companies struggled after the makers of Spam and Folgers coffee reported weaker-than-expected results, and grocers fell after Amazon said it plans to cut prices for avocados, eggs and other products when it takes control of Whole Foods next week. Retailers, meanwhile, were big winners after a wide variety said they earned fatter profits last quarter than Wall Street forecast.
The Standard & Poor's 500 index ended down 5.07 points, or 0.2%, at 2,438.97. Through the day, it flipped between gains of up to 0.3% and losses of up to 0.3%.
The Dow Jones industrial average fell 28.69 points, or 0.1%, to 21,783.40. The Nasdaq composite fell 7.08 points, or 0.1%, to 6,271.33. The Russell 2000 index of small-cap stocks rose 4.14 points, or 0.3%, to 1,373.88.
The market has drifted up and down since the S&P 500 set a record high earlier this month. Strong growth in profits has helped stocks — most S&P 500 companies have reported higher earnings for the spring quarter than analysts forecast, along with healthier revenue.
Worries about politics in Washington and abroad have hurt stocks. Doubts are rising about how much help the Republican-led White House and Congress can provide for businesses. Several crucial deadlines are coming up that could damage the economy, including a vote to avoid a default on the national debt, though most investors expect calamity to be averted.
This week has also featured lighter trading than usual, with few market-moving events on the calendar. That may be exacerbating moves for the market. For all the noise, though, the S&P 500 is still within 1.7% of its record high.
One event that could capture the market's attention is a symposium of central bankers in Jackson Hole, Wyo. Federal Reserve chief Janet L. Yellen and European Central Bank President Mario Draghi are both expected to speak at the meeting Friday. Few analysts expect to hear major surprises.
"I can't imagine anything significant outside of what we already know, which is that over time global rates will move up," said Tom Stringfellow, chief investment officer of Frost Investment Advisors. "Maybe we'll get some commentary on how they'll manage it to keep debt markets calm."
With rates on the way up, Stringfellow said he expects the market to become increasingly split between winners and losers. That would be a change from prior years, when markets often rose and fell in unison.
On Thursday, stocks on the New York Stock Exchange were nearly evenly split between stocks that rose and those that fell.
On the losing side was J.M. Smucker, which sank 9.5% to $107.51 — the biggest loss in the S&P 500 — after reporting weaker profit for the latest quarter than Wall Street expected. It cited weaker-than-expected sales for Folgers coffee, and it also lowered the range for its forecast of full-year profit.
Hormel Foods slid 5.4% to $32.09 after it cut its forecast for full-year earnings because of higher costs for pork bellies and other ingredients.
On the winning side were retailers, led by Signet Jewelers, which surged 16.7% to $60.54. Strong sales of bracelets, rings and necklaces helped it report bigger revenue and profit for the latest quarter than analysts expected. Signet also said it was acquiring R2Net, an online jewelry retailer, for $328 million in cash.
Dollar Tree, whose stores sell $1 towels and $1 Champagne flutes, climbed 5.6% to $78.50 after it reported stronger earnings than Wall Street forecast. Customers bought more at each store visit than they did a year earlier, and the company raised its forecast for profit this year.
Shares of refiners rose along with the price of gasoline as Hurricane Harvey approached the Texas coast of the Gulf of Mexico, which is home to many refineries. Valero Energy rose 2.6% to $67.44. Marathon Petroleum rose 1.9% to $51.13.
Benchmark U.S. crude fell 98 cents, or 2%, to settle at $47.43 a barrel. Brent crude, the international standard, fell 53 cents, or 1%, to settle at $52.04 a barrel.
Natural gas rose 2 cents to settle at $2.95 per 1,000 cubic feet. Heating oil was close to flat at $1.62 a gallon. Wholesale gasoline rose 5 cents to $1.66 a gallon.
The yield on the 10-year Treasury rose to 2.20% from 2.17%. The two-year yield held steady at 1.31%, and the 30-year yield climbed to 2.77% from 2.75%.
The dollar rose to 109.51 Japanese yen from 109.01 yen late Wednesday. The euro fell to $1.1806 from $1.1821, and the British pound slipped to $1.2802 from $1.2804.
Gold fell $2.70 to settle at $1,292 an ounce. Silver fell 8 cents to $16.96 an ounce. Copper rose 5 cents to $3.03 a pound.
In overseas markets, France's CAC 40 was close to flat, the FTSE 100 in London climbed 0.3%, and Germany's DAX index gained 0.1%. Japan's Nikkei 225 index fell 0.4%. The Hang Seng in Hong Kong and South Korea's Kospi index both rose 0.4%.
2:40 p.m.: This article was updated with closing prices, context and analyst comment.