Stocks edged higher on Tuesday, marking a tentative recovery from a bout of volatility led by an aggressive sell-off of global technology shares.