The S&P 500 moved into positive territory for the month after snapping its longest losing streak since April last week.