Stocks surged Wednesday, led by a rally in shares of major technology companies that boosted the Nasdaq Composite to a record high above 20,000 points.