U.S markets closed firmer at the end of the trading session, with the S&P 500 closing above 2900 for the first time.