The stock market sell-off could be far from over if the U.S. economy is headed toward a recession, according to Goldman Sachs. The S & P 500 dropped 4% on Wednesday, putting it on the edge of an official bear market . The catalyst for the sell-off appeared to be weak earnings reports from retail stores this week, which suggested that inflation is starting to eat into consumer spending and corporate profits. While an economic contraction is not guaranteed, Goldman projects a 35% chance of a recession over the next two years. That signals that there is a risk of a bigger drop for stocks, according to chief U.S. equity strategist David Kostin. "Across 12 recessions since World War II, the S & P 500 index has contracted from peak to trough by a median of 24%. A decline of this magnitude from the S & P 500 peak of nearly 4800 in January 2022 would bring the S & P 500 to approximately 3650 (11% below current levels). The average decline of 30% would reduce the S & P 500 to 3360 (-18% from today)," Kostin wrote in a note to clients on Wednesday evening. Recent economic data has been mixed, with first-quarter GDP turning negative and the housing market showing signs of cooling even as the labor market has remained strong. Inflation, however, remains stubbornly high, raising concerns that the Federal Reserve will have to hurt the economy in order to rein in prices. With Target and Walmart now joining Big Tech stocks in deep drawdowns, the market is starting to look more like a pre-recession environment. Since 1981, the top performing sectors right before recessions include utilities, energy, consumer staples and health care, according to Goldman. "During the 12 months before a recession, defensive sectors and 'quality' factors have generally outperformed," Kostin wrote. Once a recession begins, however, consumer staples and health care are by far the best performers, according to Goldman, while the energy sector badly lags the broader market. Timing the market is always a difficult proposition for investors, and recession-driven moves are no exception. Historically, the stock market starts to fall before a recession officially hits and then bottoms before the economy has shifted back to growth. However, one instance where that pattern didn't hold was the 2000 recession and associated tech bubble, which some strategists have used as a comparison point for the current stock market decline. "In that instance, the market continued to decline well after the economic recession ended, troughing a full 8 months after the recession ended and a full 30 months after its pre-recession peak," Kostin wrote. — CNBC's Michael Bloom contributed to this report.