The Dow Jones industrials added around 85 points after climbing nearly 200 points through the afternoon.
Analysts attributed much of the market's gain to large investors loading up on rising stocks in order to report strong holdings at the end of the first three-month reporting period of 2009, which ends on Tuesday.
Investors shrugged off lackluster economic data and snatched up some of the biggest names in technology and banking including Google Inc., International Business Machines Corp., Bank of America Corp. and Citigroup Inc.
The market is coming off a two-day pullback as stocks took a breather following a three-week rally that brought the Dow Jones industrial average up 21 percent since early March. That forward drive was pushed along by optimism that U.S. banks may be emerging from the worst of a lending crisis.
The government finally delivered details of its plans to take failed loans off the books of struggling banks and leaders of several large banks said they did well in January and February.
The financial sector is likely to get another dose of good news later this week. The Financial Accounting Standards Board is widely expected to ease accounting rules that require companies to list their assets at current market values.
Banks have had to take massive writedowns over the past two years as the value of mortgage-backed securities and other investments has withered. Banks say a softening of the "mark-to-market" rules would help their bottom lines.
Keith Wirtz, president and chief investment officer at Fifth Third Asset Management in Cincinnati, said the gain in bank stocks on Tuesday was likely boosted by some short-covering in anticipation of a resolution on the rules, as traders don't want to miss out on a possible rally in financials later this week. Short covering, or the buying of stocks to cover bets that stocks would fall, has played a large role in the surge in bank stocks over the past few weeks.
According to preliminary calculations, the Dow Jones industrial average rose 86.90, or 1.16 percent, to 7,608.92. The Standard & Poor's 500 index gained 10.34, or 1.31 percent, to 797.87, while the technology-heavy Nasdaq composite index rose 26.79, or 1.78 percent, to 1,528.59.
The Russell 2000 index of smaller companies rose 12.69, or 3.1 percent, to 428.66.
Advancing issues outnumbered decliners by about 5 to 1 on the New York Stock Exchange, where volume came to 880.7 million shares.
The advance on Tuesday seems to be supported by "window dressing" buying as large investors not wanting to end the quarter with large amounts of cash loaded up on stocks they think have good prospects.
"Technology, of all the S&P sectors, is the only one that is up on the year," said Craig Peckham, an analyst at Jefferies & Co. "If you're going to try to window dress anywhere on the last day of the quarter, technology is a good place to start."
In light of the market's more upbeat sentiment in recent weeks, investors also are making bets on sectors that are poised to turn around first when the economy improves, including financial service providers, materials and consumer discretionary companies, Peckham said, like Capital One Financial Corp., Alcoa Inc. and Best Buy Co.
Technology shares also got a lift Tuesday after The Walt Disney Co. and Google announced an agreement late Monday that will allow Google's video site YouTube to show short-form videos from Disney's ABC and ESPN networks. Disney shares rose 31 cents to $18.16, while Google gained $5.37 to $348.06.
Lincoln National Corp. gained about 10 percent, pulling other life insurance stocks up as well, after saying it would pay off a debt coming due soon, assuaging concerns about the company's financial position.
Investors have been worried about insurance stocks since their investment portfolios have suffered so much with the market downturn, which has brought stocks down by about half from their peak in October 2007.
Lincoln rose 28 cents to $6.69, after tumbling 38 percent on Monday. Other insurers that rose included MetLife Inc., which added $1.27 to $22.77, and Prudential Financial Inc., which rose $1.02 to $19.02.
Alcoa shares, meanwhile, soared after Deutsche Bank analysts upgraded the aluminum producer's stock to "Hold" from "Sell." The company has struggled amid the deteriorating economy, but the analysts have been encouraged by its recent efforts to raise cash. Shares jumped 65 cents to $7.34.
Investors looked past a number of economic reports, including the S&P Case-Shiller index of 20 cities, which showed that U.S. home pricesin January from a year ago. Meanwhile, the Chicago purchasing manager's index of business conditions dropped to a reading of 31.4 in March from 34.2 in February.
A measure ofin March after plummeting to historic lows in February, a private research group reported Tuesday. The Conference Board said its Consumer Confidence Index rose to 26.0, from a revised 25.3 reading in February - below expectations, but a small uptick nonetheless.
"The consumers remain extremely apprehensive about, not only the outlook for the economy, but the job market and their earnings as well," Lynn Franco, Director of the Conference Board's Consumer Research Center, told CBS News.
For the time being, analysts expect an ongoing battle between bears and bulls, as investors try to determine if the recent rally was just a short-lived upswing within a bear market, or if the market has indeed turned a corner.
The market has been in bear territory, which is defined as a 20 percent drop from a high, since the fall of 2007. There has been heated debate about whether the market has finally reached a bottom after stocks hit new 12-year lows on March 9 and rallied sharply since.
"We had a pretty sizable selloff yesterday and what today's move might tell us is whether or not that was a profit-taking activity or whether we have truly ended this bear market rally," said Schwab's Frederick.
The major indexes had dropped about 3 percent Monday as the White House rejected General Motors Corp.'s and Chrysler's turnaround plans, raising the possibility of an automaker bankruptcy. The administration also replaced GM's CEO Rick Wagoner with the company's chief financial officer, Fritz Henderson. In his first press conference as CEO on Tuesday, Henderson said as the company works to avoid bankruptcy.
GM shares dropped 76 cents to $1.94, after plunging 25 percent on Monday.
Bond prices were mixed Tuesday. The yield on the benchmark 10-year Treasury note, which moves opposite its price, fell to 2.68 percent from 2.72 percent late Monday. The yield on the three-month T-bill, considered one of the safest investments, rose to 0.20 percent from 0.18 percent Monday.
Crude oil reversed an early slide, gaining 98 cents to $49.39 a barrel on the New York Mercantile Exchange.
The dollar was lower against other major currencies. Gold prices rose.
Overseas, Japan's Nikkei stock average fell 1.5 percent. Britain's FTSE 100 rose 4.3 percent, Germany's DAX index rose 2.4 percent, and France's CAC-40 rose 3.2 percent.