Stocks closed higher on Friday as investors tried to shake off jitters concerning trade tensions between the U.S. and China, with energy shares rising.
The Dow Jones Industrial Average rose 119.19 points to 24,580.89, with Chevron and Exxon Mobil among the best-performing stocks in the index. Friday's close marked the first gain for the 30-stock index in nine sessions, snapping its longest losing streak since March 2017.
The gained 0.2 percent to close at 2,754.88, with energy, materials and telecommunications outperforming. The Nasdaq composite, meanwhile, closed 0.3 percent lower at 7,692.82 as tech shares fell.
Markets around the globe had been on a roller-coaster ride this week as tensions surrounding a tit-for-tat trade dispute between the U.S. and China continued to escalate. The major indexes closed lower for the week, along with European stocks and Asian equity markets.
"As bad as it may seem to some people, this is more of a re-allocation of resources," said JJ Kinahan, chief market strategist at TD Ameritrade. "The Russell 2000 and Nasdaq both hit all-time highs this week."
"I think investors are wise to be cautious and re-evaluate these stocks and how they would be affected if these tariffs go through. ... That being said, market conditions are still pretty good," said Kinahan.
On Monday, President Donald Trump requested the United States Trade Representative identify $200 billion worth of Chinese goods for additional tariffs at a rate of 10 percent. Those tariffs followed levies announced by both nations last week. Consequently, Beijing stated that it would deliver its own set of counter measures, if required.
But Bloomberg News reported, citing people familiar with the matter, that some White House officials are trying to restart talks with China in order to avoid a full-blown trade war.
Tom Essaye, founder of The Sevens Report, said in a note the report is bullish, but was "light on specifics." Essaye added: "This pullback/consolidation probably isn't over yet—although medium term, fundamentals for the markets remain supportive."
Trump later threatened on Friday to slap a 20 percent tariff on European cars, saying in a tweet: "Based on the Tariffs and Trade Barriers long placed on the U.S. and it great companies and workers by the European Union, if these Tariffs and Barriers are not soon broken down and removed, we will be placing a 20% Tariff on all of their cars coming into the U.S. Build them here!"
Shares of General Motors, Caterpillar and Boeing — all companies that do a lot of business outside of the U.S. — rose by at least 0.3 percent.
"A lot of the stuff that's being talked about on tariffs and trade has already been priced in," said Alex Chalekian, CEO of Lake Avenue Financial. But "depending on what the outcome of that is, it may not be good for the economy as a whole."
U.S. crude posted its best daily gain since November 2016 after OPEC members agreed to only a moderate supply increase. The cartel also declined to say exactly how much more its members would pump. Analysts said the deal will likely add between 600,000 and 800,000 barrels per day, which the market can easily absorb.
Energy stocks Chevron and Exxon Mobil both rose more than 2 percent, while the Energy Select Sector SPDR Fund (XLE) gained 2 percent.
—CNBC's Tom DiChristopher contributed to this report.