NEW YORK — Gains in energy and chemical companies helped nudge the stock market higher Thursday.
The modest move extends a pattern seen this week: Even with plenty of earnings news from big companies, the broader market has shuffled between minor gains and minor losses.
Cabot Oil & Gas and Range Resources reported revenue and earnings that trumped estimates, sending their stocks up 7 percent. Cabot climbed $4.85 to $76.56. Range Resources rose $5.34 to $81.39.
Facebook soared 30 percent after reporting earnings late Wednesday that easily beat analysts' forecasts thanks to higher revenue from ads on mobile devices. Facebook's stock gained $7.85 to $34.36.
Nearly halfway through the second-quarter earnings season, the overall trend looks good, but not great, said Tyler Vernon, chief investment officer of Biltmore Capital in Princeton, N.J. "There have been some big disappointments, like Caterpillar yesterday, but we're seeing better and better numbers coming out."
The Standard & Poor's 500 index gained 4.31 points, or 0.3 percent, to close at 1,690.25.
The Dow Jones industrial average rose 13.37 points, or 0.1 percent, to 15,555.61. The Dow was held back by Home Depot and Caterpillar, which warned Wednesday that its sales could sag.
The Nasdaq composite index gained 25.59 points, or 0.7 percent, to 3,605.19.