Stocks began the week with a rally, climbing to session highs by Monday afternoon as Apple (AAPL) - Get Report   jumped and crude oil hit a six-month high.

The S&P 500 was up 1.2%, the Dow Jones Industrial Average added 1.2%, and the Nasdaq gained 1.5%.

Warren Buffett's Berkshire Hathaway (BRK.A) - Get Report disclosed a stake in Apple worth nearly $900 million on Monday morning. Berkshire held 9.81 million Apple shares as of March 31, a holding worth $1.07 billion at the time.

Apple rose 4.1%, on track for the best one-day gain in nearly four months. Shares had been under pressure following Apple's first quarterly sales decline in more than a decade. The company briefly lost the title of world's largest company to Alphabet (GOOGL) - Get Report last week. 

"While one fund's investment -- Berkshire or otherwise -- should never be used as the sole reason to own a particular stock, Berkshire is the consummate value investor, investing in high-quality companies it believes to be trading at a discount to its intrinsic value," said Jim Cramer and Jack Mohr,

co-portfolio managers of Action Alerts Plus, which holds Apple stock

Berkshire also slightly increased its stake in IBM (IBM) - Get Report , reduced its stake in Walmart (WMT) - Get Report and unloaded its stake in AT&T (T) - Get Report .

Tech stocks were among the best performers on Wall Street on Monday. Alibaba (BABA) - Get Report , Texas Instruments (TXN) - Get Report  and Intel (INTC) - Get Report were higher, while the TechnologySelect Sector SPDR ETF (XLK) - Get Report rose 1.6%.

Crude oil jumped above $47 a barrel on Monday, trading at a six-month high, after Goldman Sachs said the oil market had flipped to a deficit "much earlier than we expected." Analysts said the market likely corrected in May as sustained strong demand and sharply declining production fueled the deficit. The firm expects crude to reach $50 a barrel in the second half of the year.

West Texas Intermediate crude oil closed 3.3% higher at $47.72 a barrel on Monday, its highest settlement since November 3.

"Petroleum prices are probing to fresh six-month highs, supported by supply-side worries that have at least temporarily trimmed a global surplus," Tim Evans, energy futures specialist at Citi, wrote in a note. "Sentiment is certainly bullish and there may be some short covering within the recent trade mix, but we continue to view the market as overbought and vulnerable to correction."

Homebuilder sentiment held steady in May, unchanged for the fourth month in a row as housing sector growth continues. The National Association of Home Builders' index remained at 58. A reading above 50 indicates improvement. The steady read was as expected.

Economic conditions in the New York region worsened in May. The Empire State index turned negative with a reading of 9 compared to a positive reading of 9.6 in April. Economists expected a positive reading of 5.8.

Worries over China's economy, the world's second largest, flared over the weekend after industrial output, retail and investment data each missed estimates. Industrial production in China last momth rose just 6%, slowing from 6.8% growth in March. Weaker auto sales dragged on overall retail sales which climbed 5.1% in April, more than half the pace in March. Private investment in fixed assets grew at its slowest pace since 2012.

Pfizer (PFE) - Get Report agreed to acquire Anacor Pharmaceuticals (ANAC) for $99.25 a share, or $5.2 billion in cash. Palo Alto, Calif.-based Anacor currently has its lead product candidate, a topical treatment for eczema named crisaborole, under Food and Drug Administration review. Pfizer expects the deal to close in the third quarter of this year. Anacor shares surged 55%.

Tribune Publishing (TPUB) surged more than 20% after Gannett (GCI) - Get Report increased its acquisition offer to $15 a share from $12.25. Tribune's board had rejected the initial offer. Gannett, owner of USA Today, said the increased offer "reflects additional analysis of certain information revealed in Tribune's financial statements."