The S&P 500, the Nasdaq and the Dow all declined for the week with technology stocks on a roller-coaster ride due to uncertainty about the extent to which profits could be disrupted due to AI competition and the hefty spending needed to support the technology.