The S&P 500 and ‌the Nasdaq have finished lower amid a tech selloff, but finished well off the day's lows as bargain hunters stepped in ‌ahead of the US Thanksgiving holiday.