In David Kostin's latest note to clients, the Goldman strategist warned that market complacency over escalating US trade war with China may have gone too far, and warned that rising tariffs represent a growing threat to corporate earnings through higher costs and lower margins.

Coming on the same day that JPMorgan revised its "new baseline", turning increasingly bearish and now predicting that the US will impose 25% tariffs on all Chinese imports in the near future, Kostin similarly warned that a 25% tariff on imports from China could erase earnings growth for S&P 500 companies in 2019.

Goldman also explained that the way higher tariffs would be transmitted to corporations was by a reduction in corporate earnings through higher costs and lower margins. He calculated that roughly 15% of cost of goods sold (COGS) is imported. And given S&P 500 constituent firms are more global in nature and have more complex supply chains than overall industry, Goldman estimated that imports account for roughly 30% of S&P 500 COGS. This estimate is consistent with the 30% share of S&P 500 sales generated outside the US (imports from China account for 18% of total US imports).

What this means according to Goldman is that as the boost from tax reform fades some time over the next 2 quarters, pressure on corporate margins is about to ratchet up and most companies will suffer margin erosion as trade war ramps up. Meanwhile, firms with the ability to maintain or expand profit margins will become increasingly scarce and will likely be rewarded by investors. In other words, companies with a high pricing power are well-positioned to pass through input cost pressure to consumers, preserving high margins. Kostin explains:

The market typically rewards companies with high margins when the outlook for corporate profitability worsens. This pattern occurred in 2017, when high-margin stocks outperformed throughout most of the year as the labor market tightened and commodity costs rose. However, as investors embraced the likelihood of tax reform in late 2017, that scarcity premium evaporated and low-margin stocks rebounded, but that recent outperformance seems unlikely to last.

This relative outperformance of high margin companies is shown in the chart below.

How to uncover these "trade war" diamonds in the rough? According to Goldman, one way to identify firms with a high likelihood of maintaining margins going forward is to look for demonstrated records of margin strength. High and stable gross margins are typically an indicator of high pricing power.

Kostin analyzed companies based on the average level and standard deviation of gross margins during the past five years. By these measures, firms in industries at the bottom right of the chart below would be best-positioned to withstand rising input costs and other margin pressures, such as companies in Software & Services.

At the same time, some industries with histories of strong gross margins have seen their competitive positioning weaken in recent years. The Household and Personal Products industry group, for example, has historically enjoyed among the highest and most stable gross margins across the Russell 1000. But during the last two years, the median stock in the industry group has experienced a gross margin decline of 75 bp. In contrast, Software & Services has high and stable gross margins and has seen margins expand by 56 bp during the past two years

To make life easier for investors who are worried about the market impact from the next trade war, Goldman has compiled a list of 33 companies with gross margins that are high and stable, and which have outperformed a group of firms with weak and variable gross margins by more than 18 pp YTD (+12% vs. -6%).

Firms on the list comprise Russell 1000 stocks ranking in top quintile of their sector based on the level and stability of gross margins during the past five years. According to Goldman, the stocks have all also experienced steady or expanding gross margins during the past one and two years. Firms in six different sectors are represented in the list. The 10 stocks meeting the screening criteria with the lowest coefficient of variation in gross margins: NATI, WAT, VMW, IDXX, XYL, AZO, FLO, SIRI, EXPE, and ADBE.

So for those who are convinced it is only a matter of time before the market turns, one pair trade idea would be to go long a basket, or all, of the names below, while shorting the broader market (although maybe excluding the FANGs which have been the backbone of the S&P's ascent so far in 2018).