U.S. stocks lost much of their gains on Friday, with the S&P 500 still managing a record close and equities posting a monthly gain.

Rumors about possible Russian action in the Ukraine were cited as a potential factor in stocks pulling back late in the session.