Stocks extended gains on Thursday, with the Nasdaq up 1 percent as technology-sector earnings continued to do well despite weak economic data.