Investors cheered the announcement of a two-week ceasefire, which President Trump said is contingent on the reopening of the Strait of Hormuz.