Stocks recovered from their worst day of 2017, as investors assessed Trump’s chances of moving forward with his agenda.