Stocks near highs ahead of close, lifted by defensive sectors