Apple(AAPL) - Get Report  reclaimed its crown as the world's largest company on Monday after a Warren Buffett-inspired rally pulled the iPhone-maker back from last week's multi-year lows.

Buffett's Berkshire Hathaway(BRK.A) - Get Report disclosed a stake in Apple worth nearly $900 million on Monday morning. The Omaha, Neb.-based company owned 9.81 million Apple shares as of March 31, according to a regulatory filing, a holding worth $1.07 billion at the time. The conglomerate 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 .

Apple, which rose 3.7%, had been under pressure following its first quarterly sales decline in more than a decade, and it briefly lost the title of world's largest company to Alphabet(GOOGL) - Get Report last week.

The tech giant's gains bolstered the rest of the markets: The S&P 500 was up 0.98%, the Dow Jones Industrial Average added 1%, and the Nasdaq gained 1.2%.

Apple is a holding in Jim Cramer'sAction Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sellsAAPL?Learn more now.

"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 of Action Alerts Plus, which holds Apple stock.

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.4%.

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 rose 3.3% to $47.72 a barrel on Monday, its highest settlement since Nov. 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."

Homebuilder sentiment held steady in May, unchanged for the fourth month in a row as housing growth continues. The National Association of Home Builders' index remained at 58, with any level above 50 indicating 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 with 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.

In deals news, 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 has 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 57%.

Tribune Publishing (TPUB) surged 23% 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."