Stocks rose on Wednesday as investors grew hopeful that Chinese and U.S. trade authorities would reach an agreement before a deadline in early March.
The Dow Jones Industrial Average climbed 117.51 points to 25,543.27 as Walgreens Boots Alliance and 3M outperformed. Wednesday also marked the Dow's second straight day of gains. The gained 0.3 percent to 2,753.03, led by gains in the industrials and energy sectors. The Nasdaq Composite advanced 0.08 percent to 7,420.38.
Energy stocks got a boost from higher oil prices. The S&P 500 energy sector gained more than 1 percent, led by Newfield Exploration, Apache and Devon Energy, as West Texas Intermediate futures climbed 1.5 percent to $53.90.
President Donald Trump suggested Tuesday that he might be open to postponing the current deadline of early March so that both sides can reach a deal.
"Markets always assumed the March 1 trade deadline was flexible, but this just confirmed it," Tom Essaye, founder of The Sevens Report, wrote in a note. "Bottom line, the fundamentals are roughly balanced right now as there is optimism that a trade deal will get done."
"Looking ahead, a trade deal could reduce concerns about growth and allow the 2019 rally to continue," Essaye added.
On Wednesday, The South China Morning Post reported that Chinese President Xi Jinping will meet with U.S. delegates on Friday as both sides try to strike a deal, including Treasury Secretary Steven Mnuchin and U.S. Trade Representative Robert Lighthizer. Failure to achieve an agreement would spark higher U.S. tariffs on Chinese goods.
The positive sentiment in equity markets is also linked to tentative deal on border security funding, which could prevent another government shutdown. President Trump said Tuesday he is not happy with this proposal but added he will be studying its details.
Wednesday's gains add to a sharp rally seen in the previous session. The Dow surged more than 350 points while the S&P 500 and Nasdaq Composite both climbed more than 1 percent. The S&P 500 also closed above its 200-day moving average — a key technical level watched by traders — for the first time since Dec. 3.
Petra Bakosova, chief operating officer at Hull Tactical, says the market may be getting ahead of itself, however.
"We have become very defensive over the course of last couple of weeks or so," Bakosova said. "We're getting back to the point where we're seeing the market becoming overvalued." She added the December sell-off was an "opportunity" for investors if brought valuations to more "reasonable" levels.
Shares of Hilton Worldwide jumped more than 6 percent after the company reported better-than-expected earnings. The hotel operator said higher hotel-room rates boosted its bottom line.
Freeport-McMoRan surged nearly 7 percent following an upgrade by an analyst at Morgan Stanley. The analyst said the stock could get a bounce from higher copper prices.
—CNBC's Silvia Amaro contributed to this report.