The S&P 500 wrapped up its third straight month of gains on a flat note as weaker energy shares countered a rise in safe-haven utilities.

The S&P 500 wrapped up its third straight month of gains on a flat note as weaker energy shares countered a rise in safe-haven utilities.