Stocks rose on Thursday as sentiment was boosted by strong earnings from Walmart and Cisco Systems while banks climbed on higher rates.
The Dow Jones Industrial Average closed 214.66 points higher at 25,862.68, led by Walmart and Cisco. The gained 0.9% to close at 2,876.32 while the Nasdaq Composite advanced 1% to 7,898.05. The major indexes also closed higher for the third straight day.
Walmart shares rose 1.4% after the retailer posted first-quarter earnings for fiscal 2020 that topped analyst expectations. The company said it is in a "good position" to meet its goals for 2019 despite tough comparisons for the second quarter.
Cisco Systems also reported better-than-expected quarterly earnings, sending its stock up 6.7%. The company issued stronger-than-forecast revenue guidance as well.
Shares of Citigroup, J.P. Morgan Chase, Bank of America and Goldman Sachs all gained more than 1%. Banks rose as the benchmark 10-year Treasury yield climbed back above 2.4% on stronger-than-forecast data. Housing starts for April topped expectations while weekly jobless claims dropped more than expected.
The gains in Cisco, Walmart and the banks offset worries over the ongoing trade spat between China and the U.S.
"You take the bad news and nobody cares anymore," said Mike Mangieri, managing partner at Seven Points Capital. "It's just discounted to such a degree where it's not even bad news anymore. Then you take the good news, and the market just runs higher."
Investors had largely priced in the two countries striking a deal this month. Instead, the U.S. hiked tariffs on $200 billion worth of Chinese imports. China retaliated with higher tariffs on $60 billion worth of goods.
On top of that, President Donald Trump declared on Wednesday a national emergency over threats against American technology. This move is expected to be followed by a ban on U.S. firms doing business with Huawei, a Chinese telecommunications company.
The U.S. Department of Commerce announced the addition of Huawei Technologies and its affiliates to the Bureau of Industry and Security (BIS) Entity List, making it more difficult for the Chinese telecom giant to conduct business with U.S. companies.
"The recent flare-up in U.S./China trade tensions is a near-term negative for equities," said Salvatore Ruscitti, equity strategist at MRB Partners, in a note. But "assuming the U.S. and China eventually reach a trade deal within the next few months, the weakness in equities should be temporary, and stock prices should move higher on a 6-12 month horizon."
Trade worries led to a massive sell-off in equities to start off the week. The Dow fell more than 600 points on Monday, while the S&P 500 and Nasdaq dropped 2.4% and 3.4%, respectively.
However, stocks started recovering the lost ground on Tuesday with a broad rally. Stocks continued their rebound on Wednesday after CNBC reported Trump plans to postpone auto tariffs by up to six months. The White House faces a Saturday deadline to decide whether to slap duties on car and auto part imports over national security concerns. Through Thursday's close, the indexes were all down less than half a percent for the week.
"People got too bearish too quickly," said Quint Tatro, managing director at Joule Financial. "As long as the fundamentals are strong, and you get shakes like this in the market, then it's a buying opportunity."
But "if the fundamentals change, it's a completely different ballgame," Tatro said.
—CNBC's Spriha Srivastava contributed to this report.