© Reuters. Traders work on the floor of the NYSE in New York

By April Joyner

NEW YORK (Reuters) - Wall Street rose on Wednesday as U.S. President Donald Trump secured concessions from the European Union on trade, while a disappointing quarterly report from Facebook (O: ) after the bell slammed its stock and threatened to put the brakes on a tech rally.

The benchmark S&P 500 jumped more than half a percent in the last half-hour of trading on news of the concessions and closed at its highest level since Jan. 29. Trump said that the United States and the European Union had agreed to work toward eliminating tariffs on industrial goods and increasing U.S. exports of liquefied and soybeans to Europe.

The S&P 500 and the Nasdaq had already been boosted earlier in the trading session by gains in the technology sector, and the Nasdaq closed at a record high.

In after-hours trading, however, Facebook shares sank as much as 23 percent after it warned about slowing growth and climbing expenses. Facebook's massive drop also hurt shares of Amazon (O: ), Alphabet (O: ) and other high-growth companies, and Nasdaq futures fell as much as 0.85 percent, suggesting the market could open lower on Thursday.

The sanguine news regarding trade helped the Dow reverse earlier losses in Wednesday's session. It had been weighed by Boeing's (N: ) report of higher costs for its aerial refueling tanker program. Boeing shares closed down 0.7 percent.

"Once you got a hint of good news about avoiding a trade war, the market was primed to go higher based on the fact that earnings has been quite strong and economic data has been strong," said Michael Antonelli, managing director of institutional sales trading at Robert W. Baird in Milwaukee.

Indeed, investors noted that strong corporate earnings have helped prop up U.S. stocks despite ongoing concerns about tariffs raising companies' costs and cutting into their profits.

Of the 148 S&P 500 companies that have reported earnings so far, 85.8 percent have topped analyst expectations. If the beat rate holds, it will be the highest on record, dating back to the first quarter of 1994, according to Thomson Reuters I/B/E/S.

"We've all been looking for the beginning of the bear market, but so far the commentary from companies has been pretty strong," said Kim Forrest, senior portfolio manager at Fort Pitt Capital Group in Pittsburgh.

The Dow Jones Industrial Average ( ) rose 172.16 points, or 0.68 percent, to 25,414.1, the S&P 500 ( ) gained 25.67 points, or 0.91 percent, to 2,846.07 and the Nasdaq Composite ( ) added 91.47 points, or 1.17 percent, to 7,932.24.

Coca-Cola Co (N: ) shares rose 1.8 percent after the beverage company's quarterly sales and profit beat estimates.

Shares of HCA Healthcare Inc (N: ) jumped 9.2 percent after the hospital operator raised its full-year earnings forecast.

However, General Motors Co (N: ) shares fell 4.6 percent after the automaker cut its 2018 profit forecast, citing rising steel and aluminum costs due to tariffs. After the bell, Ford Motor Co (N: ) also lowered its profit forecast, and its shares dropped more than 4 percent in after-hours trading.

Shares of AT&T Inc (N: ) fell 4.5 percent, weighing the most on the S&P, after the wireless carrier's quarterly revenue missed estimates.

Advancing issues outnumbered declining ones on the NYSE by a 1.84-to-1 ratio; on Nasdaq, a 1.31-to-1 ratio favored advancers.

The S&P 500 posted 43 new 52-week highs and seven new lows; the Nasdaq Composite recorded 73 new highs and 83 new lows.

Volume on U.S. exchanges was 6.61 billion shares, compared to the 6.09 billion average for the full session over the last 20 trading days.