TORONTO — Canadian and U.S. stock markets rose on Monday despite gains in oil prices and the war in Iran threatening to drag on.