Traders kept volume light on Wednesday, but hopes that the euro zone will figure out a solution to its ongoing debt crisis inspired enough buying to push U.S. stocks to a third day of gains.

The Dow Jones industrial average <.DJI> gained 46.31 points, or 0.38 percent, to 12,196.44. The S&P 500 <.SPX> rose 2.55 points, or 0.20 percent, to 1,261.02. The Nasdaq Composite <.IXIC> dipped 0.35 point, or 0.01 percent, to 2,649.21.