After languishing Monday, the Dow Jones industrial average is at its highest level in nearly a month. But it is unclear whether this rally is sustainable or will be quickly unwound by poor economic data, analysts said. Stocks have been up five of the past six trading days.

The tech-heavy Nasdaq composite index had the biggest increase, gaining 4.1 percent, or 58.09, to 1462.11. Google and Yahoo were up 5 percent and 6 percent respectively. Apple's stock was up 4 percent, to $99.66 a share, after the tech firm announced a software upgrade for the iPhone.

Home builders' shares were also up significantly after a government report of an unexpected 22 percent uptick in new-home construction in February. But most of the rebound came from the multifamily market, typically condos and apartments. The overall housing market remains weak, analysts said. Toll Brothers and NVR climbed yesterday but are down 20 percent and 14 percent, respectively, this year. Home Depot was up 7 percent yesterday, to $21.48.

"The market now is probably ready to respond to any piece of good news," said Peter Cardillo, chief market economist with Avalon Partners.

Energy stocks received a lift after crude oil prices climbed 3 percent, to $49 a barrel, on the New York Mercantile Exchange. ConocoPhillips and Chevron were up 4 percent, and ExxonMobil climbed 3 percent.

But not all of the news yesterday was positive. Alcoa, an aluminum maker, tumbled 9 percent, to $5.59 a share, after announcing late Monday that it would cut its dividend in a cost-cutting move. It had the steepest loss on the Dow.

In other economic news, the producer price index, which measures wholesale prices for various goods, rose 0.1 percent in February, according to the Labor Department, a smaller increase than expected. A decline in food prices offset an increase in energy costs. Excluding food and energy, producer prices rose 0.2 percent. The figures mean that the threat of inflation appears smaller, analysts said.