Global stocks rose and oil prices fell after US President Donald Trump said the Middle East war could end soon.