Technology companies, retailers lead U.S. stocks higher