A flattening of the yield curve is no reason to bail out of stocks, argues one investment bank in a new report. But it’s a reason for stock investors to begin paying careful attention to bond yields, which could provide a sell signal in the years ahead.

A recent article in Barron’s reports that while a flattening yield curve is “no reason to bail out of stocks,” bond yields could provide investors with “a sell signal in the years ahead.”

A flattening of the yield curve occurs when short-term bond yields rise faster than long-term yields, which can happen, the article explains, if investors “think the Fed is making a mistake” in hiking interest rates and may have to reverse its course.

According to Barron’s, “The two-year Treasury yield has jumped from 0.97% to 2.37% since Dec. 15, 2015–the day before the Federal Reserve began hiking its core Federal Funds rate for the first time since 2006. The 10-year Treasury yield has risen from 2.27% to 2.84% over that stretch. The curve has gotten flatter, because the spread between the 10-year and two year has fallen from 1.30 percentage points to 0.47.”

A flattening can make investors nervous since it can precede an inversion (short-term yields exceeding long-term), which the article points out “has historically been a warning sign of a coming recession, and bear market for stocks.”

Related: High Dividend Stocks: A Lonely Opportunity?

A recent report by J.P. Morgan’s global stock strategists argues, however, that the Fed Funds rate remains “modest relative to the rate of inflation” and that investors need not fear a flattening of the yield curve. Historically, it says, the S&P 500 has posted positive returns during each of the six “flattening” periods since 1980 (with a median return of 9%).

“In other words,” the article concludes, “if history is a reliable guide, stock investors should shrug off flattening bond yields and stay invested, until the yield curve inverts, after which it will perhaps be time for some orderly profit-taking, but not panic selling.”

This article has been republished with permission from Validea’s Guru Investor.