"It could be like ... Coolidge prosperity. It went for a while and it ended badly," he said, referring to the presidency of Calvin Coolidge who presided over the Roaring 1920s before the decade-long Great Depression that started in 1929.

The stock rally since Donald Trump won the presidency can only be explained by psychology — an overwhelming sense of excitement about the prospects for growth — not efficient markets, Nobel Prize–winning economist Robert Shiller told CNBC on Wednesday.

President Calvin Coolidge tosses out the ceremonial first ball in a 1925 game between the Washington Senators and the Philadelphia Athletics.

"There's a difference, though, between Calvin Coolidge and Donald Trump, if you haven't noticed. Trump is way more controversial," Shiller added.



While saying the current bull market in stocks may come to an end sooner rather than later, Shiller did advise investors not to sell yet. "Right now, I would still keep a good part of the portfolio in the market. ... The thing is, we just don't know."

But Shiller said he's loath to tell people to buy into the market right now, as the Dow Jones industrial average approaches 20,000 after logging on Tuesday its 17th record close and an overall gain of about 9 percent since Election Day.



"I feel funny about urging someone who hasn't been in the market to come in now. There's a thought that this Dow 20,000 is a resistance level and we're just going to be stuck at it for a long time," he said. "There's [also] a real chance at a correction."



A correction in the stock market is defined by a fall of at least 10 percent from record highs. A bear market starts at a 20 percent decline.



Trump is a "genius" at motivating the large segment of the population that voted him into office, Shiller said. "But I don't know whether he or anyone can control ... sentiment."



Besides the stock market, Trump's cult of personality and roots as a real estate billionaire could boost housing, said Shiller, who, with Karl E. Case, developed the S&P/Case-Shiller home prices index.

"He talks about living big, living large," Shiller said. "I can imagine that this can boost housing demand as well, at least among those who are excited by Trump."