The S&P 500 rose on Monday following a winning week as oil prices seesawed, with traders hoping that the U.S.-Iran war could end soon.