NEW YORK (Reuters) - U.S. companies are preparing to report third-quarter results following a rocky few months in which they grappled with a U.S.-China trade conflict undermining the business environment and an overall economy that has been showing signs of struggling.

Earnings among S&P 500 earnings for the July-September period look set to mark the weakest performance in about three years, with respect to year-over-year quarterly changes.

Analysts are forecasting a 3.2% decline in earnings for the quarter from a year ago, based on IBES data from Refinitiv, although given the historic trend that many companies’ earnings will surpass analyst estimates, the quarter could end in positive territory.

“Investors may start to think that the worst of the earnings comparisons are behind us, and if the consensus emerges that we’ve passed the earnings trough in terms of year-over-year growth, that would be a positive for the market,” said Bucky Hellwig, senior vice president at BB&T Wealth Management in Birmingham, Alabama.

(GRAPHIC: US S&P 500 profit performance since 2015 - )

Sector-wise, a rough quarter is expected for technology companies, whose shares have led the market’s ascent this year but overall are seen posting a 7.6% drop in third-quarter earnings, with Micron Technology’s results expected to be a particularly big drag on the group, according to Refinitiv.

Materials and energy, two cyclical sectors that are particularly sensitive to the overall economy as well as the trade dispute, also are forecasted to post big year-over-year declines in earnings. The biggest U.S. banks are also expected to report a slight earnings dip.

(GRAPHIC: Expected third-quarter results by sector - )

“Negative S&P 500 EPS growth in 3Q will be driven by sectors with the highest international revenue exposure,” David Kostin, chief U.S. equity strategist at Goldman Sachs, said in a report.

FILE PHOTO: Traders work on the floor at the New York Stock Exchange (NYSE) in New York, U.S., October 2, 2019. REUTERS/Brendan McDermid

Trade tensions took center stage last week with a delegation from China in Washington for talks to find a resolution to their 15-month trade dispute.

During the second quarter, 17% of S&P 500 companies mentioned negative impacts from the tariffs, according to Bank of America Merrill Lynch strategists.

An equal-weighted basket of companies impacted by the trade war, created by Barclays, has underperformed the S&P 500 since the end of the second quarter through Thursday.

(GRAPHIC: Trade-exposed stocks lag - )

Uncertainty about the economy and trade situation means that analysts are expecting companies will be cautious with their big investments in buildings and equipment. Capital expenditures are expected to have increased just 2.8% in the third quarter from a year ago, which would be the lowest since the second quarter of 2017, when capex declined slightly, according to data compiled by Refinitiv.

“Capex has been and is likely to remain anemic,” BofA strategists wrote in their note.

(GRAPHIC: U.S. capital spending growth wanes - )

One issue that could confront large U.S. companies that derive much of their revenue from abroad is the stronger U.S. dollar. Since the end of the third quarter of 2018, the dollar strengthened more than 6% against the euro through the end of the third quarter this year, a potential pressure point as U.S. companies translate foreign earnings into the U.S. currency.

Data from cloud treasury and finance firm Kyriba found that North American companies reported a $23.39 billion collective negative impact in the first quarter related to currency, the highest level since the fourth quarter of 2015.

(GRAPHIC: Currency and earnings - )

Companies new to public scrutiny are also in sharper relief this reporting season after the parent of office-sharing startup WeWork pulled its initial public offering. The company ousted its chief executive and failed to excite investors who raised concerns about its burgeoning losses.

Among other high-profile companies that recently held IPOs, ride-hailing company Lyft Inc is expected to report quarterly results on Oct. 30, followed by rival Uber Technologies Inc, and later by workplace messaging firm Slack Technologies Inc and online pet products retailer Chewy Inc.

(GRAPHIC: Unicorn stampede on Wall Street - )