Morgan Stanley believes U.S companies are facing an inventory problem — and it's a key risk to earnings. "The problem with inventory is two-fold: supply chain bottlenecks are clearing while demand, especially demand for goods, is slowing," Morgan Stanley strategists led by Michelle Weaver and Mike Wilson wrote in an Oct. 10 note. The strategists said that supply chains in the U.S. had stabilized across most industries, while demand for goods has been declining since the second quarter of 2021. As such, on average, U.S companies are now holding the highest level of inventory relative to sales since 1990 — with inventory levels of companies in consumer staples, industrials and tech deemed to be sitting at "elevated levels," Weaver and Wilson said. "We believe many will turn to aggressive discounting to solve their inventory problem which is likely to spark a 'race to the bottom' as companies attempt to cut prices faster than peers and move out as much inventory as possible," they added. Morgan Stanley believes the inventory problem has now become a risk to earnings, with oversupply and lagging demand likely to weigh on companies' margins. Who's at risk? However, although a broad problem for the market and for goods producing industries in particular, not all industries are impacted to the same degree, according to Morgan Stanley. The bank found that tech hardware and consumer retail companies are among the most at risk from excess inventory. The tech hardware segment includes the likes of Apple , HP , Hewlett Packard Enterprise and Western Digital on the S & P 500 , according to FactSet's classification. Stocks to avoid Morgan Stanley's analysts identified companies facing inventory problems which they said have downside over the next three to six months — and are rated either equal weight or underweight by the bank. Within the tech hardware space, the screen turned up HP , Logitech , and Seagate . One-third of the names on the list are from the automotive sector. They include Ford and General Motors , as well as automotive retailers AutoNation and Asbury Automotive . Several popular apparel retailers made the list too, such as Abercrombie & Fitch , American Eagle Outfitters and Gap . Other stocks with downside include Best Buy , Garmin , and Micron , according to the bank. Stocks with upside However, "not all industries are at risk from the inventory theme, and some are still benefiting from idiosyncratic supply chain bottlenecks," according to Weaver and Wilson. Machinery is one such industry, the bank said. Morgan Stanley's screen for companies with upside over the next three to six months turned up the likes of machinery firms CNH Industrial and Deere & Company, as well as discount retailers Burlington Stores and TJX Companies .