Wall Street bulls took the upper hand on Tuesday as hopes for a new plan to deal with Greece's debt crisis soothed some investor worry, but more grim economic data suggested there were more hurdles ahead.

Based on the latest available data, the Dow Jones industrial average <.DJI> rose 128.21 points, or 1.03 percent, to end unofficially at 12,569.79. The Standard & Poor's 500 Index <.SPX> was up 14.10 points, or 1.06 percent, to finish unofficially at 1,345.20. The Nasdaq Composite Index <.IXIC> was up 38.44 points, or 1.37 percent, to close unofficially at 2,835.30.

Stocks, however, posted their worst monthly performance since August.

For the month, the Dow is down 1.9 percent, the S&P 500 is down 1.4 percent and the Nasdaq is down 1.3 percent.

(Reporting by Caroline Valetkevitch; Editing by Jan Paschal)