A small recovery in commodities and a rally in companies that make consumer staples like toilet paper and pasta helped the financial markets reverse a decline Thursday to end the day with modest gains.
Consumer staples and health care led the market due in part to concerns that high gas prices will erode consumer spending and cut into corporate earnings. Companies that sell everyday items or provide health-related products and services are less dependent on economic growth for their profits since people typically spend money on such items even if they cut back elsewhere. Coca-Cola, McDonald's and Kraft Foods were among the day's biggest gainers.
Retail sales rose 0.5 percent, but that number dropped to 0.2 percent after excluding gas prices. Higher energy costs also pushed wholesale prices — the amount companies pay for goods — up 0.8 percent in April, the government said.
"(The market) is watching to see the extent to which higher energy prices crowd out consumption more broadly," said Andrew Goldberg, a strategist at JP Morgan Funds. If that happens, consumer staples — along with utilities — are typically better investments because their products serve needs, not wants and because they pay higher dividends.
The Dow Jones industrial average gained 65.89 points, or 0.5 percent, to 12,695.92. The S&P 500 added 6.57, or 0.5 percent, to 1,348.65. The Nasdaq composite rose 17.98, or 0.6 percent, to 2,863.04.The Dow Jones industrial average came back from a 93-point deficit earlier in the day.
The Labor Department said applications for unemployment benefits fell last week to 434,000, slightly less than what economists expected. That report also contributed to the early morning market losses.
Crude oil recovered from steep losses earlier in the day and finished nearly 1 percent higher, but remained below $100 a barrel. Other commodities also recovered. As copper and gold prices went up, materials companies moved higher. Freeport McMoRan Copper & Gold Inc. reversed its losses from the morning and finished nearly 1 higher.
Stock trading has been affected by huge moves in commodities markets over the past two weeks, including a 9 percent drop in the price of oil a week ago and a 27 percent plunge in the price of silver last week. The volatility in commodities and stocks led investors to park money in less risky and more stable assets like government bonds.
Energy companies dropped slightly. ConocoPhillips fell 1.3 percent. A drop in oil prices translates into declining revenues for energy companies.
U.S. government bonds and the dollar both fell as investors became more comfortable holding stocks, commodities and other riskier assets. The dollar fell 0.2 percent against a group of six other currencies, and the yield on the 10-year note rose to 3.23 percent from 3.16 percent late Wednesday. Bond yields rise when their prices fall.
Commodities and stocks have both benefited from the Federal Reserve's program to boost the economy by buying $600 billion in Treasury bonds. The Fed's program had the effect of pushing yields on government bonds lower, encouraging investors to move money into stocks and commodities.
With the Fed's effort coming to an end in June, the same investments are likely to fall, said Doug Roberts, the chief investment strategist for Channel Capital Research.
"When the Fed pulls back, investors cut back," Roberts said.
Some well-known companies fell more than the broad markets. Cisco Systems Inc. fell 4.8 percent after the maker of computer networking equipment reported an 18 percent slide in earnings and lowered its profit forecast. It also plans to cut jobs.
Goldman Sachs Group Inc. fell 3.5 percent after it was downgraded by analysts due to a Senate investigation and a Rolling Stone article that argued that the Justice Department should bring charges against the investment bank for defrauding investors.
Two stocks rose for every one that fell on the New York Stock Exchange. Consolidated volume came to 3.7 billion shares.