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.
Equities rose last week amid growing optimism that the U.S. and China will be able to reach a permanent trade deal. A U.S. trade delegation led by Treasury Secretary Steven Mnuchin and U.S. Trade Representative Robert Lighthizer was in China last week for talks with Chinese officials. Mnuchin said of the talks: "So far, so good." Talks between the two countries are continuing this week in Washington.
The major indexes fell earlier in the day as investors took a breather following solid gains last week. The major indexes all rose at least 0.6 percent on Friday, while the Dow also gained more than 400 points. Those moves helped the Dow and Nasdaq notch their eighth straight weekly gain, while the S&P 500 rose for the seventh week in eight.
"Major US Equities Indices have started to regain their longer-term price average," JC O'Hara, chief market technician at MKM Partners, wrote in a note, adding the S&P 500 is trading above its 200-day moving average. He also said more than 50 percent of S&P 500 stocks are above their 200-day moving average.
"History shows that when the S&P 500 regained trend (both Bottom Up and Top Down) after exiting deep oversold conditions, equity markets experienced continued upside," O'Hara added.
Walmart shares rose more than 2 percent after the company reported better-than-expected earnings. The retailer also said e-commerce sales grew by 43 percent in the previous quarter.
—CNBC's Ryan Browne contributed to this report.