Dow rallies but stays below 14,000

Dow 4:19pm
Click chart for more market data.

It's hard to keep this market down.

Stocks closed higher Tuesday, as investors turned their attention to corporate news.

The Dow Jones Industrial Average, the S&P 500 and the Nasdaq gained between 0.7% and 1.2%.

"The market is trying to give people comfort that we're starting to build a base to go up from," said Frank Davis, director of trading at LEK Securities.

The Dow flirted with 14,000 for most of the day but wasn't able to close above that threshold. Bank of America (BAC) was the biggest gainer on the blue-chip index.

But it was tech stocks that drove Tuesday's rally, helped by the highly anticipated announcement of a $24.4 billion leveraged buyout of computer maker Dell (DELL). The deal, if completed, would be one of the largest LBOs ever.

Shares of Dell rival Hewlett-Packard (HPQ) jumped more than 2% after HP said it plans to target Dell's customers during the transition.

Related: Fear & Greed easing but still in extreme greed

Shares of UK cable operator Virgin Media (VMED) rallied more than 17%, making it the biggest gainer on the Nasdaq. The company confirmed it has been approached by media billionaire John Malone's Liberty Global (LBTYA) about a possible deal.

Shares of McGraw Hill (MHP) dropped more than 10%, after the U.S. Justice Department sued S&P, one of its divisions, over its ratings of subprime securities before the financial crisis.

Ratings agency stocks are junk
Ratings agency stocks are junk

Investors also had a slew of earnings to pore through.

BP (BP) kicked off the day with results noting the company paid out billions in fines to the U.S. government, yet shares rose more than 1%,

UBS (UBS), meanwhile, posted a $2 billion loss driven by Libor fines. The Swiss banking giant also reported it is capping its largest bonuses at $1.1 million, half the previous cap.

Related: Individual investors still nervous

Shares of Yum! Brands (YUM) sank 3%, a day after the restaurant operator said it expected earnings to fall in 2013 based on its recent struggles in China.

Mastercard (MA) shares rose nearly 1% after the company announced it will start a new stock repurchase program and double its quarterly cash dividends to 60 cents per share.

Shares of J.C. Penney (JCP) were up more than 3%, after the retailer filed a lawsuit to protect itself from having nearly $3 billion in debt come due in the next few months.

Baidu (BIDU) shares tumbled 10% on analysts' worries about the company's rising costs.

After the bell, Disney (DIS) reported earnings and revenues that beat forecasts. Shares of the media and entertainment company ticked up slightly after hours.

Zynga (ZNGA) shares spiked in after-hours trading after the company beat analyst's forecasts.

European markets ended the day up between 0.3% and 1.2%.

Asian markets closed mixed. The Shanghai Composite added 0.2%, while the Nikkei dropped 1.9% and the Hang Seng declined 2.3%.

Oil and gold prices dipped slightly. Meanwhile, the yield on the 10-year U.S. Treasury note rose to 2.02% from 2% Monday.

The U.S. dollar gained versus the British pound and the Japanese yen, but lost ground against the euro.

Are you invested in the U.S. stock market right now? Are you one of the investors coming in from the sidelines? We want to hear from you. E-mail for the chance to be included in an upcoming story.

CNNMoney Sponsors