The S&P 500 ended slightly higher on Monday as investors interpreted President Trump’s comments as a signal that the conflict could end soon.