Stocks rose slightly on Tuesday after President Donald Trump hinted once again he may push back a key trade deadline. Equities also got a boost following strong quarterly numbers from Walmart.

The Dow Jones Industrial Average climbed as much as 78.19 points before ending the day up 8.07 points at 25,891.32. The gained 0.15 percent to close at 2,779.76 as the materials sector outperformed. The closed 0.2 percent higher at 7,486.77 as Amazon and Netflix both rose more than 1 percent.

Trump said Tuesday that trade talks with China are going well, adding the current March deadline is not a "magical date." Both countries have until then to come up with a deal. Otherwise, additional U.S. tariffs on Chinese products could take effect. Trump indicated last week, however, he would be willing to push back the deadline.

"While it seems probable that Trump will extend that deadline to avoid derailing the substantive negotiations now in progress, this cannot be taken for granted," said Christopher Granville, managing director of global political research at TS Lombard. "The second round of talks in Beijing at the end of last week produced no breakthrough, but equally — and perhaps more important — no breakdown either."

"On balance, then, trade war risks remain skewed to the upside," Granville added.