The Dow Jones Industrial Average, S&P 500 and Nasdaq composite closed near session highs to cap a volatile session Friday.