(Reuters) - Worries about the U.S.-China trade war are running high during the current U.S. quarterly reporting season, with companies as diverse as Juniper Networks and O’Reilly Automotive bemoaning the consequences but saying they are finding ways to weather the storm.

FILE PHOTO: Flags of U.S. and China are displayed at American International Chamber of Commerce (AICC)'s booth during China International Fair for Trade in Services in Beijing, China, May 28, 2019. REUTERS/Jason Lee

Trade negotiations shift to Shanghai on Tuesday, with stock market investors sensitive to fallout from the year-long conflict and any signs that it could escalate.

Tariffs were mentioned in about a third of conference calls held by S&P 500 companies reporting their quarterly results through July 26, according to FactSet. The 71 firms flagging tariffs were up from the 50 companies discussing tariffs in the same time frame in the first-quarter season, but less than the 99 a year ago when tariffs were an emerging issue for U.S. corporations.

Many of those corporations outlined to investors their plans to minimize the impact of the trade war, which has added to uncertainty as they struggle with a sluggish global economy, including lackluster economies in Europe and Japan.

Parts supplier O’Reilly Automotive said in its conference call last week that it raised the prices of its products to make up for higher costs related to the tariffs.

Network gear maker Juniper Networks Inc on Thursday missed the mid-point of its margin guidance due to the tariffs, saying it expected pressure to continue, even as it manages its operating expenses to mitigate the damage.

Of S&P 500 components that have reported their second-quarter earnings, export-focused companies have beaten analysts’ expectations 77% of the time, while companies focused on the domestic economy have exceeded expectations just 66% of the time, according to an analysis by Credit Suisse.

That suggests that export-oriented companies are feeling the trade war less than investors expected, said Patrick Palfrey, an earnings analyst at Credit Suisse.

“Trade is an exacerbating factor, as opposed to the primary driver of the slowdown,” Palfrey said.

S&P 500 earnings are expected to have risen just 0.6% in the second quarter from a year ago, according to IBES data from Refinitiv. A big part of the slowdown reflects tough comparisons with a year ago, when the U.S. tax cut package led to a 24.9% jump in second-quarter earnings.

Roughly 76% of the 222 companies that have reported as of Monday morning have beaten analysts’ earnings expectations, in line with the recent trend.

Third-quarter earnings expectations have now turned negative, however, with earnings expected to decline 0.6% from a year ago, based on Refinitiv’s data.

Wall Street has reacted sharply over the past year to tweets from U.S. President Donald Trump, variously suggesting progress and setbacks in settling the trade dispute. Buoyed by expectations the Federal Reserve will cut interest rates, but also suggesting investors are becoming less sensitive to uncertainty around the trade war, the S&P 500 has surged 20% year to date and hit record highs last week.

Mattel’s stock has surged 16% since Thursday, when the toymaker’s quarterly results beat expectations, while it warned about the impact of an escalation of the trade war.

“We are being watchful of the potential tariff that may be implemented, and if implemented, would impact the entire toy industry. We have contingency plans in place and we’re working closely with the retailers to ensure that we are aligned on our approach to mitigate the tariffs,” Mattel CEO Ynon Kreiz said on a conference call last week.

The Philadelphia Semiconductor index has surged 38% in 2019, even as trade tensions and U.S. restrictions on sales to Chinese telecom Huawei make it harder to predict when U.S. chipmakers will recover from a global, cyclical downturn.

Investors were surprised last week after Texas Instruments said that U.S.-China trade tensions were not hampering its ability to conduct business in China, while Intel said on Thursday that customers worried about potential tariffs on chips were preemptively buying processors.

“We really think the Q2 action was pulling from the second half into the first half,” Intel CFO George Davis told Reuters following the earnings report. “Depending on how the trade discussions go, there could be some additional activity there, but we’re not expecting at the same level, if at all, during the third quarter. We’re forecasting demand based on the signals we’re getting from our customers.”

China recently signaled it would allow Chinese firms to make some tariff-free purchases of U.S. farm goods, while Washington has encouraged companies to apply for waivers to a national security ban on sales to Huawei. But going into the talks, neither side has implemented the measures that were intended to show their goodwill.