S&P 500 rises for a third day in a row, hits new high for 2019

Stocks rose on Wednesday boosted by tech shares as investors cheered solid economic data. The S&P 500 climbed back to a new high for the year.

The benchmark rose for a third-straight day, gaining 0.7 percent to close back above 2,800, a key level watched by investors. The Dow Jones Industrial Average closed 148.23 points higher at 25,702.89. The Nasdaq Composite advanced 0.7 percent to close at 7,643.41.

The S&P 500 tech sector rose 0.7 percent, led by a 3.8 percent gain in Nvidia. Chipmakers rose broadly, with the VanEck Vectors Semiconductor ETF (SMH) advancing 0.4 percent. Tech shares have been on fire this week, with the sector rising more than 3.5 percent.

Facebook, Amazon, Netflix, Alphabet and Apple all closed higher on Wednesday.

"The move in tech, it almost feels like they're sniffing out something is coming" on the U.S.-China trade front, said Quincy Krosby, chief market strategist at Prudential Financial. "The moves in the semis and Apple are suggesting a deal may be in the coming weeks; perhaps not at the end of March, but sometime in the near future."

Traders work on the floor of the New York Stock Exchange.
Jeenah Moon | Reuters
Traders work on the floor of the New York Stock Exchange.

Equities also got a boost Wednesday after the Commerce Department said nondefense durable goods orders posted their largest increase in six months in January, rising 0.8 percent. Overall durable goods orders also rose 0.4 percent while economists polled by Refinitiv expected a decline of 0.5 percent.

Meanwhile, U.S. construction spending posted its biggest increase in nine months, rising 1.3 percent in January. The leap was driven by a surge in public-project investments.

The data overshadowed a weaker-than-expected print on the producer price index.

J.P. Morgan Chase closed 0.3 percent after CNBC learned the bank was expanding into several new markets, including some that are dominated by Bank of America. Other bank shares also rose, with Citigroup and Bank of America advancing more than 1 percent each.

Boeing shares initially lifted the broader market, rising more than 1 percent, but later gave back most of that gain after the U.S. and Canada announced they would ban flights from the company's beleaguered 737 MAX jets. Canada and the U.S. joined several countries, including China, the European Union and Indonesia, in grounding all flights involving the plane after two deadly crashes in less than six months, including one on Sunday.

"We believe investors were pricing in very limited risk to the 737 ramp-up profile, which now has greater risk within the wide range of possible outcomes following these incidents," Goldman Sachs analyst Noah Poponak said in a note.

Boeing's struggles caused the Dow to lag the other major indexes this week. The Dow is up only 1 percent through Wednesday's close, while the S&P 500 and Nasdaq are both up more than 2 percent.

—CNBC's Spriha Srivastava contributed to this report.