(Reuters) - The U.S. Treasury yield curve is flashing warning signs on the economy, pointing to a less optimistic prediction for longer-term economic growth at the same time as Federal Reserve officials are adopting a more aggressive tone on raising interest rates.

A street sign for Wall Street is seen outside the New York Stock Exchange (NYSE) in Manhattan, New York City, U.S. December 28, 2016. REUTERS/Andrew Kelly

A flattening yield curve is often interpreted as a negative economic indicator as it shows concerns about the future pace of growth and inflation, because buyers of long-dated debt would demand higher yields if they expected higher costs.

“The Fed’s optimism has no real counterpart in any of the data that we’ve seen so far,” said Aaron Kohli, an interest rate strategist at BMO Capital Markets in New York “The presumption of weak economic growth is fairly firmly rooted and you can see that in the long-end of the curve.“

Dallas Federal Reserve Bank President Robert Kaplan on Tuesday said that the yield curve showed the market expected sluggish growth ahead; however, New York Fed President William Dudley said this week that the flat yield curve reflects low overseas inflation and borrowing costs and not a weakening U.S. economy.

The yield spread between five-year Treasury notes and 30-year Treasury bonds US5US30=TWEB on Wednesday flattened to 95 basis points, the narrowest since December 2007.

The gap between two-year note and 10-year note yields US2US10=TWEB also declined to 80 basis points, just above 10-year lows of 73 basis points reached in mid-2016.

The yield curve reflects the extra interest investors require to buy bonds of a longer maturity. When they demand higher payments for shorter-dated bonds than for longer-dated ones it shows that they are more concerned about nearer-term risks.

The flattening is not yet near an inversion, which is typically seen as a harbinger of a recession.

The curve flattened this week after Fed officials including Dudley and Boston Fed President Eric Rosengren took a more aggressive view to rate hikes, which sent shorter-dated bond yields higher.

That came despite recent data that shows inflation retreating from Fed targets and weakening retail sales and housing data.

Still, there is not widespread alarm of the risk of a recession. Economists at Deutsche Bank said earlier in June that the chances of a U.S. recession in the next 12 months are remote. Jeffrey Gundlach, chief executive officer at DoubleLine Capital, said the flatter curve would start being a concern “when two- and three-year U.S. Treasuries yield about the same.”

An economic downturn would be a setback for U.S. President Donald Trump who during his campaign had vowed to lift annual GDP growth to 4 percent, though administration officials now see 3 percent growth as more realistic. First-quarter economic growth disappointed.

Irrespective of economic predictions, investors say demand for high-quality assets is also helping to flatten the U.S. yield curve, as there are few other options that generate returns.

“The market is starved for product and starved for yield and has to be invested. We are still one of the highest-yielding bond markets on the planet,” said Gennadiy Goldberg, an interest rate strategist at TD Securities in New York.

CONDITIONS STILL LOOSE

The flattening yield curve may further loosen financial conditions despite the Fed’s attempts to tighten them, giving an additional boost to risk assets like stocks regardless of the strength of the economy.

That’s because long-dated debt is heavily influenced by pension funds, hedge funds and other participants that lend across the economy, often known as the “shadow banking” industry, and not the U.S. central bank.

“The Fed doesn’t have control over the monetary base because the pile of money represented by shadow banking is so much bigger than what the Fed has under its control,” said Lou Brien, a market strategist at DRW Trading in Chicago.

The Chicago Fed’s National Financial Conditions Index shows that economic conditions have in fact loosened from a year ago even though the Fed has raised rates three times since then.

As the flattening yield curve forces investors to chase higher returns to meet investment objectives, the curve could become even flatter, according to Brian Reynolds, chief market strategist at New Albion Partners in New York.

But history suggests it would be some time before the curve inverts, and even longer before stocks take a turn for the worse, he said.

When the yield gap between two-year and 10-year notes was similar to current levels in 2005 at around 80 basis points, it took 11 months for the yield curve to invert, after which stocks gave an annualized return of 14.8 percent before the bear market began 21 months later, Reynolds said.

In 1994, the yield curve took an additional three and a half years to invert from current levels and in that instance stocks returned 21.6 percent on an annualized basis after the inversion before the bull market ended 22 months later, Reynolds said.