S&P/TSX composite index closes up on oil prices, U.S. markets also rise