Stocks rose for the fourth day in a row on Friday, capping their best week so far this year.
It was a relief for investors after the big drops of the previous week.
Stocks fell in morning trading, with the Dow Jones industrial average down almost 63 points. But they turned around after the government said businesses are restocking their shelves faster than analysts had expected.
The Commerce Department said U.S. wholesale stockpiles grew 0.6 percent in April. That's twice as fast as they grew in March and a sign that businesses are ordering enough goods to lead to increased factory production and sales. Investors had been braced for more sluggish growth.
Oil fell 72 cents to $84.10 per barrel. Sure, it was pushed down by long-term economic worries. But lower energy costs help consumers.
"If you had some doubts about an economic recovery, oil in the $80s is a lot better than oil at $110," said Jim Dunigan, managing executive of investments for PNC Wealth Management in Philadelphia. Oil traded just below $110 in late February.
The Dow finished 93.24 points higher, or three-quarters of a percent, at 12,554.20. It ended the week up almost 3.6 percent.
The Standard & Poor's 500 index rose 10.67 points, or 0.81 percent, to close at 1,325.66. The Nasdaq composite rose 27.40 points, or 0.97 percent, to close at 2,858.42.
Nine out of the 10 industry groups in the S&P 500 rose. Only energy stocks declined, following energy prices lower.
Walmart Stores was the biggest gainer in the Dow, up $2.35, or 3.6 percent, at $68.22. Other companies that depend heavily on a strong economy grew too, including Intel, up 47 cents, or 1.8 percent, at $26.41, and General Electric, up 20 cents, or 1 percent, to $19.20. Home Depot rose $1.11, or 2.2 percent, to $52.35.
Facebook rose 79 cents, or 3 percent, to $27.10 after announcing an "app center" that will recommend new add-on software for users. Anything that boosts user interaction is likely to help it sell more ads, which has been a key concern for investors in its new stock.
Chesapeake Energy shareholders punished their directors and were rewarded by the market. The stock rose 51 cents, or 2.9 percent, to $18.36 after shareholder votes prompted the resignations of two directors at the company's annual meeting Friday. Earlier in the day the company said it will sell pipeline assets in three deals for a total of more than $4 billion in cash.
Navistar International rose $4.25, or 17.6 percent, to $28.36 after the activist investor Carl Icahn boosted his stake in the truck maker.