Traders work on the floor of the New York Stock Exchange. Lucas Jackson/Reuters

This story was updated at 4:10 p.m. EDT.

Wall Street rallied Wednesday, boosted by JPMorgan Chase’s first-quarter results, and unexpectedly strong Chinese trade data raised hopes that the world’s second-largest economy was recovering.

JPMorgan Chase, the first of the big banks to report earnings, posted higher-than-expected revenue and profit, sending its shares up 4.2 percent to $61.79.

The shares gave the biggest boost to the broad-based Standard & Poor's 500 stock index, bolstering other financial shares. Bank of America rose 3.9 percent, and Citigroup climbed 5.6 percent.

Goldman Sachs’ 3.6 percent rise propped up the blue chip Dow Jones Industrial Average.

Adding to the positive sentiment: A report from the Federal Reserve that showed the U.S. economy continued to expand from late February to early April as low unemployment appears to be spurring an uptick in wage growth.

J.P. Morgan Chase & Co. (JPM) Stock Price | FindTheCompany

Pay increased in all but one of the Fed’s 12 regional bank districts, and several reported signs of a pickup in wage growth, the U.S. central bank said in its Beige Book report of anecdotal information collected from business contacts nationwide.

And data showed China’s March exports handily beat expectations, rising for the first time in nine months. Global markets rallied following the data.

However, U.S. retail sales and producer prices unexpectedly fell in March, indicating that economic growth stumbled in the first quarter.

Crude oil, which has influenced stocks for most of the year, was hovering near 2016 highs as data showed a larger-than-expected draw in U.S. gasoline inventories. Oil has gained more than 6 percent in the last two days.

“The recovery in oil has given the market a little bit of a positive tone this week, and today, we have both JPMorgan and China's trade data beating down expectations,” John Brady, managing director at R.J. O’Brien & Associates in Chicago, said.

The Dow Jones industrial average finished the day up 187 points, or 1 percent, at 17,908, building on strong gains in the prior session. The S&P 500 was up 21 points, or 1 percent, at 2,082, and the tech-heavy Nasdaq composite index was up 75 points, or 1.6 percent, at 4,947.

The S&P financial sector rose sharply and led seven of the 10 major S&P sectors higher.

Harley-Davidson rose 4.3 percent to $46.83 after UBS said it expected the motorcycle company's March retail sales to beat analysts’ estimates.

Tenet Healthcare jumped 9.3 percent to $31.73 after Susqehanna upgraded the hospital operator's shares to “positive.”

Data from Reuters were used to report this story.