Stocks fluctuated over the course of the trading day on Wednesday but managed to maintain a positive bias throughout the session. With the gains, the major averages all ended the session at their best closing levels in about three months.