Caution tape outside the New York Stock Exchange in New York. Adam Jeffery | CNBC

There is a good chance stocks stall out next year as credit conditions tighten and earnings growth slows, according to Bank of America Merrill Lynch. "We believe the peak in equities is likely before the end of 2019," wrote Savita Subramanian, equity and quantitative strategist at Bank of America Merrill Lynch, in a note this week. She sees the rising slightly to 3,000 before the end of this year and then falling 3 percent in 2019 to 2,900.

"Our rates team is calling for an inverted yield curve during the year, homebuilders peaked about one year ago and typically lead equities by about two years and our credit team is forecasting rising spreads in 2019," Subramanian said. "Assuming the market peaks somewhere at or above 3000, our forecast is for modest downside in 2019." An inverted yield curve refers to when the yield on short-term sovereign debt, such as the two-year Treasury note, is higher than the rate on longer-dated paper such as the benchmark 10-year Treasury note. An inverted yield curve is typically followed by an economic recession. Investors have been fretting this year about the Treasury yield curve possibly inverting. The spread between the 10-year and two-year yields was around 24 basis points on Friday. This has been happening as the Federal Reserve has hiked the overnight rate three times this year. The central bank is also expected to hike once more before year-end. The Fed also forecasts it will raise rates three times in 2019. As the yield curve continues to flatten, Subramanian expects equity-market volatility to increase and for more of the firm's "bear market signposts" to be triggered. Currently, 58 percent of these signals are triggered. In October 2007 — roughly a year before the financial crisis — all of the 19 signposts were triggered. "Still-supportive fundamentals, still-tepid equity sentiment and more reasonable valuations keep us positive. But in 2019, we see elevated likelihood of a peak in the S&P 500," the strategist notes, adding S&P 500 earnings growth will likely slow down to a crawl after a blockbuster 2018. S&P 500 earnings grew by 25 percent in the first three quarters of the year, boosted in large part by lower corporate taxes.

Cash as alternative

However, Subramanian says investors can now turn somewhere they have not been able to for a long time as stocks stall out: cash. "There is now an alternative for stocks," Subramanian said, noting yields for cash are higher today than for 60 percent of S&P 500 companies. "Cash is now competitive and will likely grow more so … our Fed call puts short rates close to 3.5% by the end of 2019, well above the S&P 500's 1.9% dividend yield."