Stocks rose on Wednesday after President Donald Trump said a U.S.-China trade deal could arrive sooner than expected. Investors also pored through a rough transcript of Trump's call with the Ukrainian president from earlier this year.

The Dow Jones Industrial Average closed 162.94 points higher, or 0.6% to 26,970.71. The S&P 500 gained 0.6% to end at 2,984.87 while the Nasdaq Composite climbed 1.1% to 8,077.38.

Tech was the best-performing sector in the S&P 500, rallying more than 1% along with consumer services. Facebook, Amazon, Netflix and Google-parent Alphabet all closed higher.

Trump told reporters at the United Nations in New York that a U.S.-China deal could come sooner "than you think." Both countries have been engaged in trade negotiations since last year. The back and forth between China and the U.S. has sent ripples through global financial markets as investors assess the trade war's impact on the global economy.

He later said Japan and the U.S. had reached an initial trade agreement.

"The trade stuff is just more tangible and has a more direct impact on actual earnings" than what's going on in Washington, said Craig Birk, chief investment officer at Personal Capital. He noted, however, there is still uncertainty on the trade front. "I think investors have learned they can't predict where the trade war goes.It's driven by two unpredictable leaders. As the conflict goes longer, the market has grown comfortable with the status quo, but there is potential for either positive or negative developments."

The market also rebounded after a rough transcript of Trump's call with Ukrainian President Volodymyr Zelensky was released by the White House. It showed Trump asked Zelensky if he could "look into" former Vice President Joe Biden and his son, Hunter.

"There's a lot of talk about Biden's son, what Biden stopped the prosecution and a lot of people want to find out about that, so whatever you can do with the attorney general would be great," Trump said on the call. The call is believed to be part of an intelligence community whistleblower complaint Democrats have asked the administration to release. They say the complaint would hold details not available in the call's transcript.

The market may have taken some comfort in the fact that the memo does not appear to show an explicit quid pro quo by the president, but more details have yet to come out. Director of National Intelligence Joseph Maguire is set to testify in front of Congress Thursday at 9 a.m. ET.

"We've got a lot more to learn," said Art Hogan, chief market strategist at National Securities. "This is going to be news that spills out over time but I can't imaging the start of this process improves the tone of the U.S.-China trade talks."

"If I'm China, I feel empowered," Hogan said.

The so-called transcript was released after House Speaker Nancy Pelosi said Tuesday she will launch a formal impeachment inquiry on Trump.