US stocks end higher on economic data, tech stock gains