Nobel Laureate economist Robert Shiller said that thanks to a bullish Trump effect on the economy, a recession could be years away even as warning signals like the inverted yield curve, a contraction in the manufacturing sector and Federal Reserve easing have recently gone off.

“If the economy is strong, which is what he built is case on — ‘make America great again’ — he has a good chance of getting reelected.”

Shiller said the environment created by President Donald Trump is helping prop up consumer spending, a major driving force in the U.S. economy that should be able to hold off a recession for the foreseeable future, even a couple of years.

“Consumers are hanging in there. You might wonder why that would be at this time so late into the cycle,” Shiller said during a recent appearance on “Trading Nation” on CNBC. “This is the longest expansion ever. Now, you can say the expansion was partly (President Barack) Obama. But lingering on this long needs an explanation.”

Shiller is a behavioral finance expert and a professor at Yale who won the Nobel Prize in 2015, and he said he thinks Americans are willing to keep spending because they’re following the lead of their free-spending president.

“I think that (strong consumer spending) has to do with the inspiration for many people provided by our motivational speaker president who models luxurious living,” he said.

Shiller’s prediction doesn’t come without some warnings, however. He mentioned uncertainty and risk on Wall Street, and he said Trump needs to get past the ongoing impeachment inquiry from House Democrats.

He also mentioned his own Shiller PE Ratio, the CAPE, which tracks the price-to-earnings ratio based on average inflation-adjusted earnings over the past decade, and he said it’s still at a level that is concerning.

“If he survives that, he might contribute for some time in boosting the market,” Shiller said. “We’re maybe in the Trump era, and I think that Donald Trump by inspiration had an effect on the market — not just tax cutting.

“I’m not saying that I’m so bullish because I have a CAPE ratio that is bearish.”

If Trump is able to stay in office, there should still be room for the record-long bull market to run thanks to his pro-spending and business backgrounds.

“Let’s not make the mistake of assuming (recession is) right around the corner,” Shiller said. “If the economy is strong, which is what he built his case on — ‘make America great again’ — he has a good chance of getting reelected.”