The Dow Jones industrial average rose 18.97 points, or 0.17 percent, to end at 11,117.32. The Standard & Poor's 500 Index inched up 1.99 points, or 0.16 percent, to finish at 1,258.57. The Nasdaq Composite Index advanced 10.41 points, or 0.48 percent, to close at 2,169.17.
In the reverse of the market's action late in Tuesday's session when stocks sold off right before the closing bell, stocks turned positive in the last half-hour of trading on Wednesday.
Trading was heavy on the NYSE, with about 2.27 billion shares changing hands, above last year's daily average of 1.61 billion, while on Nasdaq, about 2.70 billion shares traded, above last year's daily average of 1.80 billion.
Declining stocks outnumbered advancing ones by a ratio of 7 to 5 on the NYSE and by 9 to 8 on Nasdaq.