Large earnings surprises turned investor sentiment positive on Wednesday, propelling U.S. stocks to their best day in a month and lifting the Dow industrials to the highest in almost three years.

The Dow Jones industrial average <.DJI> gained 186.79 points, or 1.52 percent, to end unofficially at 12,453.54. The Standard & Poor's 500 Index <.SPX> rose 17.74 points, or 1.35 percent, to finish unofficially at 1,330.36. The Nasdaq Composite Index <.IXIC> climbed 57.54 points, or 2.10 percent, to close unofficially at 2,802.51.

(Reporting by Ed Krudy; Editing by Jan Paschal)