The Dow, S&P 500, and Nasdaq rose Friday as the stock market assessed hopes for a deal between the U.S. and Iran, but oil prices were climbing too.