SAN FRANCISCO — U.S. stocks ended lower Feb. 4, with losses in Advanced Micro Devices, Palantir and other technology companies, as investors worried about pricey valuations and whether Wall Street’s artificial-intelligence-fueled rally has reached its peak.



