The SPDR S&P 500 ETF Trust , which is designed to track the S&P 500 index, rose in after-hours trading following Trump's comments. Stock futures rose on Thursday night, pointing to slight gains on Friday.

As Trump spoke at about 4:30 p.m. ET, the day's discussions were concluding as negotiators were set to head to dinner.

"I think it's going really well. I will say, I think it's going really well," the president said before he left Washington for a campaign rally in Minnesota. "So we had a very, very good negotiation with China. They'll be speaking a little bit later, but they're basically wrapping it up and we're going to see them tomorrow right here."

President Donald Trump gave an optimistic read on Thursday's trade talks between the U.S. and China as the world's two largest economies try to end a damaging trade war.

President Donald J. Trump walks from Marine One to the Oval Office as he returns on the South Lawn at the White House in Washington, DC.

The two sides resumed talks in Washington after a week of rising tensions. Washington and Beijing hope to end a conflict marked by tariffs slapped on hundreds of billions of dollars in goods.

The discussions come only days before an Oct. 15 deadline when the U.S. plans to hike duties on at least $250 billion in Chinese goods to 30% from 25%.

Treasury Secretary Steven Mnuchin and U.S. Trade Representative Robert Lighthizer helmed the team of American negotiators during Thursday's discussions. Chinese Vice Premier Liu He led the delegation from Beijing.

As Mnuchin left the talks Thursday shortly before 4 p.m. ET, CNBC asked how the discussions went. He merely smiled. Liu departed the talks about an hour after the U.S. Treasury secretary.

Earlier in the day, Trump said he planned to meet with Liu at the White House on Friday. His tweet boosted optimism about the talks, as some reports had said the Chinese team could leave after Thursday's discussions.

Tensions between the world's two largest economies increased in the days leading up to the discussions. The U.S. first blacklisted 28 Chinese entities allegedly involved with the detention and surveillance of Muslim minorities in the Xinjiang region, where an estimated 1.5 million people are held in camps. The Trump administration then imposed visa restrictions on officials allegedly involved with the practices human rights groups have called abuses.

Even so, Liu struck a positive note heading into the talks Thursday.

"The Chinese side has come with great sincerity and is willing to make serious exchanges with the U.S. on issues of common concern such as trade balance, market access and investor protection, and promote positive progress in the consultations," Liu told Chinese state-run media agency Xinhua.

Trump has pushed for China to end what he calls trade abuses including intellectual property theft and forced technology transfers. He also aims to get China to increase its purchases of U.S. agricultural products, in part to boost American farmers caught in the crossfire of the trade conflict.

The president ran for office in 2016 on cracking down on China in order to help U.S. manufacturing workers hurt by free trade.

— CNBC's Stephanie Dhue contributed to this report.