U.S. stocks closed more than 1 percent higher on Monday, with the Dow breaking a 7-day losing streak, as a recovery in oil prices and a Warren Buffett acquisition boosted investor sentiment. (Tweet This)
The Dow Jones industrial average and S&P 500 had their best day since May 8, with the latter recovering all its losses from last week's rout.
"I don't think this is anything more than just a little bounce," said Peter Boockvar, chief market analyst at The Lindsey Group. He noted some relief on the rebound in oil prices and gains in European and Chinese markets.
However, he noted that oil remains near lows. "To use commodities rallying as an excuse to buy stocks is very sketchy on a day-to-day basis," he said.
Weakness in the dollar and a refinery outage helped oil trade higher on Monday. Brent climbed above $50 a barrel, after touching a more-than-six-month low of $48.26 earlier in the session. U.S. crude settled up $1.09, or 2.48 percent, at $44.96 a barrel, after earlier falling to $43.35, a near five-month low.
Mostly disappointing data out of China initially weighed on oil prices. Chinese exports fell 8.3 percent in July, their largest decline in 4 months, while the regional producer price index fell more than expected. The Shanghai composite surged nearly 5 percent to a two-week high amid hopes of further stimulus and corporate restructuring in key sectors. The Hang Seng closed mildly lower.
Energy jumped 3.1 percent to top materials and industrials as the best performer in the S&P 500.
The Dow Jones industrial average closed about 240 points higher after rising as much as 256 points as Caterpillar and Apple led all but one blue chip higher. The index closed lower on Friday, posting its first 7-day losing streak since the summer of 2011.
Apple jumped 3.6 percent for its third-best day of the year. Caterpillar surged 3.7 percent for its second-best day of the year. Both stocks had positive coverage in Barron's over the weekend.
Biotech stocks recovered from recent losses, with the iShares Nasdaq Biotech ETF (IBB) up 0.75 percent to boost the Nasdaq.
The Dow transports jumped nearly 1.5 percent as nearly all constituents advanced.
Precision Castparts surged 19 percent on news that Warren Buffett's Berkshire Hathaway will acquire the maker of aircraft equipment for $235 a share, making for an all-cash deal of about $37.2 billion.
IBM gained more than 1 percent after Buffett said on CNBC that "he loves it" when IBM's stock price goes down because the company can repurchase shares at better prices. Buffett's Berkshire Hathaway has an 8.12 percent stake in IBM, according to recent filings. The stock is off 3 percent for the quarter so far.
"Warren Buffet's deal reminds there's value to things in the manufacturing sector," said James Meyer, chief investment officer at Tower Bridge Advisors.
Investors also focused on remarks by Federal Reserve members for further indications on the timing of a rate hike.
Economic conditions in the United States have largely returned to normal and a Federal Reserve decision to raise interest rates should come soon, the Atlanta Fed's Dennis Lockhart said in a Reuters report Monday.
He added in comment to journalists that he was "disposed" to begin raising rates in September but expected a gap of at least one policy meeting before any subsequent increases, Reuters reported.
"I think the point of 'liftoff' is close," Lockhart said in prepared remarks for an address to the Atlanta Press Club. "The economy has made great gains and is approaching an acceptable normal ... conditions are no longer extraordinary."
Last week, Lockhart moved markets when he said in his view he saw no reason to hold off on a September rate hike.
"We think that it's probably not going to have as negative an impact," said Mario Minotti, president of Minotti Group.
Stocks closed lower on Friday amid a decline in oil and July's nonfarm payrolls report that continued to show modest improvement in the labor market.
On the inflation front, Federal Reserve Vice Chairman Stanley Fischer said earlier on Bloomberg TV that U.S. inflation is "very low" but only temporarily so, and the economy has nearly achieved full employment.
"I think we might be in a rebound rally today thanks to Greece nearing a deal, M&A and Fischer," said Peter Cardillo, chief market economist at Rockwell Global Capital.
The U.S. dollar traded about half a percent lower, with the euro climbing above $1.10 for the first time in more than a week.
The 10-year Treasury yield gained to 2.23 percent, with the trading flat near 0.73 percent.
European stocks closed higher amid U.S. gains on oil's recovery. The ATHEX Composite ended up 2 percent.
Earlier, hopes of a Greece deal helped European equities turn higher and U.S. stock index futures extend gains. As soon as a bailout deal is agreed, Greek banks could receive an initial injection of as much as 10 billion euros, a euro zone official familiar with the situation told Reuters. The payout could come even before the European Central Bank completes a stress test, the report said.
Athens faces a repayment deadline to the European Central Bank on Aug. 20. The cash-strapped government and its creditors are in talks—which could conclude on Tuesday—for about 86 billion euros ($94 billion) in fresh loans.
However, the International Monetary Fund said Greece needs a third bailout worth around 90 billion euros ($98.9 billion), Reuters reported, citing Germany's Handelsblatt.
The closed up 26.61 points, or 1.28 percent, at 2,104.18, with energy leading nine sectors higher and utilities the only laggard.
The Nasdaq closed up 58.25 points, or 1.16 percent, at 5,101.80.
The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, traded near 12.
About three stocks advanced for every decliner on the New York Stock Exchange, with an exchange volume of 807 million and a composite volume of nearly 3.4 billion in the close.
Gold futures settled up $10.00 at $1,104.10 an ounce, their highest level since June 21.
—Reuters contributed to this report.
On tap this week:
Earnings: Kraft Heinz, Live Nation Entertainment, Mindray Medical International, Rackspace, Shake Shack, Take Two Interactive, Hertz
Earnings: Cree, Computer Sciences, Symantec, Towers Watson, Red Robin Gourmet Burgers, Cyber Ark Software, JA Solar, Silver Wheaton
7:30 a.m.: NFIB small business survey
8:30 a.m.: Productivity and costs
10 a.m.: Wholesale trade
1 p.m.: $24 billion 3-year auction
Earnings: Cisco, Macy's, News Corp., Alibaba, NetEase, Markit, Wayfair
8:30 a.m.: New York Fed President William Dudley
10 a.m.: JOLTs
1 p.m.: $24 billion 10-year auction
2 p.m.: Federal budget
Earnings: Nestle, Kohl's, Nordstrom, Applied Materials, Flowers Foods, El Pollo Loco, King Digital, Party City
8:30 a.m.: Initial claims, retail sales, import prices
10 a.m.: Business inventories
1 p.m.: $16 billion 30-year auction
8:30 a.m.: PPI
9:15 a.m.: Industrial production
10 a.m.: Consumer sentiment
More From CNBC.com: