The gain was modest, but broad, with eight of the 10 industry sectors of the Standard and Poor’s 500 index ending higher. Drillers and other energy companies, down sharply in previous days, climbed 0.6 percent, much more than the rest of the market. Among individual stocks, Chevron rose nearly 2 percent.
Some suppliers of raw materials posted gains, too. Aluminum giant Alcoa and miner Freeport-McMoRan each rose 5 percent.
The climb came despite a continuing slump in price of commodities that has been rattling markets all year. Benchmark U.S. crude oil fell to a another seven-year low.
The Dow Jones industrial average climbed 82.45 points, or 0.5 percent, to 17,574.75. The S&P 500 index rose 4.61 points, or 0.2 percent, to 2,052.23. The Nasdaq composite increased 22.31 points, or 0.4 percent, to 5,045.17.
Natural gas and coal producer Consol Energy jumped 10 percent. It’s still the biggest loser in the S&P 500 this year, however, down 78 percent.
In economic news, applications for unemployment benefits in the U.S. rose last week, but the number of Americans seeking aid remains close to historic lows. The report comes a week before the Federal Reserve is expected to raise interest rates for the first time in nine years. That would signal the central bank is confident the economy is strong enough to withstand higher borrowing costs.
The price of crude oil fell 40 cents, or 1 percent, to $36.76 a barrel in New York. Oil is trading at its lowest level since early 2009.
The upside to lower oil is that consumers save money at the gas pump, giving them more money to spend at stores and elsewhere. But that boost helped much yet.
“You just don’t have anything to show in retail sales or consumer spending,” said James Paulsen, chief investment strategist at Wells Capital Management. “Where is the stimulus from lower oil?”
Among other stocks making big moves, Men’s Wearhouse plunged $3.12, or 17 percent, to $15.27 after reporting earnings per share that were half what financial analysts expected, according to FactSet. The struggling clothes chain is down 65 percent since the start of 2015.
First Solar dropped $4.50, or nearly eight percent, to $54.35 after the solar energy company released earnings and a forecast that disappointed investors.
U.S. government bond prices fell slightly. The yield on the 10-year Treasury note rose to 2.23 percent from 2.21 percent late Wednesday. The dollar rose to 121.62 yen from 121.19 yen. The euro fell to $1.0936 from $1.1028.
Precious and industrial metals futures closed mostly lower. Gold edged down $4.50 to $1,072 an ounce, silver lost eight cents to $14.11 an ounce and copper was up less than a penny at $2.07 a pound.
Brent crude, the international benchmark, fell 38 cents, or 0.9 percent, to $39.73 a barrel in London.
In other trading of energy futures in New York, wholesale gasoline fell 4.9 cents to $1.28 a gallon, heating oil lost 1.4 cents to $1.225 a gallon and natural gas fell 4.7 cents to $2.105 per 1,000 cubic feet.