(Bloomberg) -- A quiet procession of down days is starting to add up in the S&P 500. Losses in eight of the last 10 sessions have pushed the stock market to a level where the psychology of dip-buying may finally get a meaningful test.

Investors face a lengthening list of headaches -- weakening earnings forecasts, the slow shift in Federal Reserve policy, and an overseas credit implosion. Against those influences stands simple conditioning: when prices have gone down in 2021, it’s been a safe bet they’ll bounce back. The result has been a market that is by one measure as resilient as it has been in 25 years. 

The latest retreat has deposited the S&P 500 on the edge of its comfort zone -- at a chart line serving as a floor for most of the last decade defined as its average price over the past 50 days. Twice this week, the benchmark gauge flirted with the threshold -- currently sitting at 4,436 -- before rebounding. But Friday’s selloff, the worst since August, sent the index several points below it.

“These trends always end at some point but boy, you have that kind of run and it’s hard not to take what you’ve seen work and continue to put it into action until it doesn’t work,”  JJ Kinahan, chief market strategist at TD Ameritrade, said in an interview. “Right now, it’s been a pretty reliable source of an area where buyers come in to help support the market.”

Bulls will have to wait until Monday, when trading conditions return to something closer to normal. Friday’s session was roiled by the expiration of stock and index options. The market has swooned into the options rollover on the third Friday of most months this year, only to rebound.

Read more: How ‘OpEx’ Is Shaking Up the Third Week of the Month: QuickTake

The S&P 500 fell 0.6% in the five days for a second straight weekly decline, as investors, who are also awaiting the Fed’s meeting policy decision next Wednesday, watched moderate Democrats balking at President Joe Biden’s plans to raise taxes. The central bank is expected to hint at moving toward scaling back asset purchases and make a formal announcement in November. The Nasdaq 100 slipped 0.7% in the week, with Friday’s plunge its biggest since May. 

With economic data mixed and the uncertainty lingering over monetary and fiscal policies, bulls can at least take comfort in a chart line where bears have repeatedly been thwarted.

Every month, with the exception of April this year, the S&P 500 dipped to its 50-day average before bouncing back right away. As a result, the index has avoided back-to-back closings below the trendline for 219 straight sessions. That’s the longest run of buoyancy since 1996, according to data compiled by Bay Crest Partners and Bloomberg. 

In the week through Wednesday, during which the S&P 500 slipped toward its 50-day average, investors bought the dip and poured $46 billion into U.S. equity funds, the most since March, EPFR Global data compiled by Bank of America Corp. show. Demand for large-cap stocks were particularly strong, with funds scoring a record inflow of $28 billion. 

Strong fund inflows, along with a forceful return of corporate buybacks, have offered such a stable bid for stocks that these two drivers alone could lift the S&P 500 by 3% a quarter, according to an estimate by Deutsche Bank. But strategists including Parag Thatte and Binky Chadha don’t expect much upside into the yearend because investors can’t keep ignoring disappointing growth. 

“Flows and positioning do not move in a vacuum and in fact are closely tied to perceptions of growth”, the strategists wrote in a note. “With activity levels for industries relevant for S&P 500 companies already running far above trend, the risk remains that demand weakens significantly back towards trend.” 

Seema Shah, chief strategist at Principal Global Investors, disagrees, saying the economic backdrop remains constructive for stocks. Should investors keep the habit of buying the dip at the 50-day average, she says, more gains may be in store.

“The 50-day moving average has been a good spot for the past year to start adding exposure to equities,” Shah said in an interview. “For the most part, the backdrop remains positive. Retail sales were solid, claims keep improving, and rates remain low,” she added. “The real surprise into year-end could be a market that takes off to the upside.”

©2021 Bloomberg L.P.