Stocks rose on Thursday as investors weigh strong earnings from Walmart and Cisco Systems against lingering trade-war fears.

The Dow Jones Industrial Average traded 237 points higher as Walmart and Cisco outperformed. The S&P 500 gained 0.9% while the Nasdaq Composite advanced 1%. Both the S&P 500 and Nasdaq also erased their losses for the week.

Walmart shares rose 3.5% after the retailer posted first-quarter earnings that topped analyst expectations. The company also 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 5.4%. The company also issued stronger-than-forecast revenue guidance.

The gains in Cisco and Walmart offset worries over the ongoing trade spat between China and the U.S. 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.”

The major stock indexes are all down more than 3% this month through Wednesday’s close.

Trade worries were eased slightly 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.

The news sent stock higher for the day, with the Dow erasing a 190-point decline on Wednesday.

CNBC