Stocks ended higher Tuesday with the Dow gaining more than 100 points to snap a five-day losing streak. The rally followed a series of government data releases and earnings reports that showed hints of strength returning to the economy.
The Dow Jones Industrial Average ended up 103.8 points, or 1 percent, to 10,405.85 amid light volume, and after losing about 40 points in the last half hour of trading.
Most Dow components were in positive territory with Home Depot, Alcoa and DuPont in the lead. Kraft and JP Morgan fell.
The S&P 500 ended up 13.2 points, or 1.22 percent, to 1,092.54 and the Nasdaq ended up 27.6 points, or 1.3 percent, to 2,209.44. The CBOE Volatility Index, widely considered the best gauge of fear in the market, fell more than 7 percent, below 24.
The key S&P sectors were all higher Tuesday, led by materials, industrials and consumerdiscretionary.
The rally may be attributed to a report of stronger-than-expected industrial production, which provided evidence the manufacturing sector is strong, and a better-than-anticipated capacity utilization rate, said Paul Zemsky, head of asset allocation at ING Investment Management.
Capacity utilization rose to 74.8 percent, 5.7 percentage points above a year earlier, indicating that industry is increasing its output. That news helped quell deflation fears, said Zemsky. Housing starts and producer price data released Tuesday was also largely positive, giving investors reason to cheer a bit, he added.
"There's plenty of room for the market to rally on good news," Zemsky said.
Despite the strong showing Tuesday, the market is still trading within a range that Brian Gendreau, market strategist at Financial Network, doesn't expect will be broken until after the mid-term elections and the uncertainty over the direction in Washington is resolved.
Once the mid-terms are over, Gendreau expects stocks to rise and end the year higher. One reason: in the 17 mid-term elections held since 1942, the market has gone up decisively 16 times, Gendreau said.
In earnings news, Home Depot shares jumped more than 3 percent after the home improvement retailer reported a slightly higher-than-forecast profit. However, the retailer's quarterly revenue was lower than expected.
Wal-Mart also rose after the retail giant posted a higher-than-expected quarterly profitand raised its full-year forecast, thanks to cost cuts and international growth. The company, however, said the slow economic recovery will continue to affect consumers.
As a sign of weaker consumer interest, Wal-Mart reported its fifth consecutive drop in same store sales, and the outlook isn't much better, Patrick McKeever, a senior equity analyst at MKM Partners, said on CNBC.
"We could see another negative quarter," McKeever said.
Shares of TJX were higher after the owner of T.J. Maxx, Marshalls and HomeGoods reported a jump in earnings of nearly 17 percent, as sales climbed. The discount retailer also raised its full-year outlook.
Saks , meanwhile, rose more than 2 percent after the department store chain posted better-than-expected quarterly results. The luxury retailer was helped by an uptick in spending for pricier goods and the ability to sell more items at full price.
Meanwhile, Abercrombie & Fitch tumbled more than 6 percent after the teen retailer posted better-than-expected profits on higher sales, but was hit by rising inventories.
Shares of American Apparel , meanwhile, sank on news the retailer raised "substantial" doubt about its ability to continue as a going concern and warned it could breach a loan covenant.
More retailers are scheduled to post earnings Wednesday before the bell, including Target and BJ's . Agricultural equipment maker Deere is also expected to report.
On the M&A front, Potash shares jumped more than 25 percent after the fertilizer producer's board rejected an unsolicited takeover bid from BHP Billiton valued at about $38.49 billion.
Shares of Potash's rivals Mosaic and Agrium were both higher.
Agilent Technologies , an electronic measurement company,led technology stocks higher, surging more than 7 percent on strong fiscal third quarter resultsand a positive outlook. The stock was the best performing in the S&P 500.
Hewlett-Packard shares rose after the IT firm said it would buy Fortify Software, a privately held security software maker, for an undisclosed sum.
Pactiv shares rose following reports that the Hefty bag maker is in talks to be acquiredby New Zealand's Rank Group.
And Spain's Santanderrenewed talks to merge its U.S. operations with those of M&T Bank , the Financial Times reported.
Research In Motion fell after brokerage Wedbush downgraded the BlackBerry maker to "outperform" from "neutral" and cut the stock's price target to $57 from $65. The company's BlackBerry Torch, meanwhile, isn't doing as well as hoped.
RIM also reportedly has assured the Indian government it can have limited access to Blackberry Messenger email and instant messaging services by Sept. 1.
In the day's economic news, a top Federal Reserve official said investors shouldn't view the Fed's decision last week to buy more U.S. government debt as a sign the economic outlook is worse.
"The FOMC's decision has had a larger impact on financial marketsthan I would have anticipated," Minneapolis Fed President Narayana Kocherlakota said in the text of speech to business leaders.
Also, housing starts rose 1.7 percentto a seasonally adjusted annual rate of 546,000 units in July, weaker than expected, according to the Commerce Department. Forecasts called for an annual rate of 550,000 units. June's housing starts were revised to show an 8.7 percent fall, which was previously reported as a 5 percent drop.
The Federal Reserve reported Industrial Production rose 1.0 percent in July on strong factory output from auto manufacturing. The results were better than the 0.7 percent expected. June's results were revised to a loss of 0.1 percent. Factory output grew by 1.1 percent in July.
Also, the Labor Department reportedU.S. producer prices rose by 0.2 percentin July, the first rise in four months, pulled by higher prices for food and consumer goods. The figure was in line with expectations, and follows a dip of 0.5 percent in June.
Meanwhile, the Treasury Department is hosting a forum on what the government should do to reform Fannie Mae and Freddie Mac. Treasury Secretary Timothy Geithner made clear the government-sponsored enterprises won't be able to return to business as usual.
Business executives participating in the session urged the governmentto keep some hand in supporting the mortgage market.
According to quarterly filings with the U.S. Securities and Exchange Commission, George Soros trimmed holdings in Pfizer, JPMorgan Chase, AT&T, and Wal-Mart, while Warren Buffett's Berkshire Hathaway cut stakes in ConocoPhillips, Kraft Foods and Procter & Gamble. Berkshire also boosted its stake in Johnson and Johnson.
Eli Lilly shares fell after the drugmaker stopped developing a potential Alzheimer's disease treatmentin late-stage testing after patients taking the drug fared worse than those on a placebo.
General Motors is expected to file to go public Tuesday. The offering is expected to raise between $15 billion and $20 billion, making it one of the largest IPOs.
GM also announced that it is recalling more than 243,000 model year 2009/2010 crossover sport utility vehicles to inspect safety belts for possible damage.
Elsewhere in the markets, gold hit $1,230 an ounce, its highest level in nearly two months. Oil prices rose above $76 a barrel, snapping five days of declines. The 10-year Treasurydeclined 18/32 to 99 27/32, raising its yield to 2.64 percent.
Volume on the New York Stock Exchange was light, with less than 1 billion shares changing hands. Advancers led decliners about 11 to 3.
Later This Week:
WEDNESDAY: MBA mortgage applications, weekly oil inventories; earnings before the bell from Deere and Target
THURSDAY: Jobless claims, leading indicators, Philadelphia Fed survey; earnings after the bell from HP, Dell, Gap and Intuit
FRIDAY: No major events scheduled
More From CNBC.com: