Even as the stock market soars to record highs, federal regulators are announcing new, cheaper ways for cash-strapped borrowers to buy a home. With the catastrophic housing crash of the last decade still glaring through the rear view mirror, the government is again pushing home ownership as the best way to build wealth, but is it?

“It would perhaps be smarter, if wealth accumulation is your goal, to rent and put money in the stock market, which has historically shown much higher returns than the housing market,” said Nobel Prize-winning economist Robert Shiller at a Standard and Poor’s conference last week.

Shiller notes that the comparison between stock returns and home value returns is rough, given that stocks pay cash dividends and housing pays “in kind,” in the form of housing services; that is, you get to live in a house.

Still, if you remove all forms of dividends and compare the Standard and Poor’s U.S. composite stock price index since 1871 and Shiller’s own real U.S. home price index since 1890, the stock market capital gains outperform the housing market’s capital gains. Both, he notes, are smaller than one might expect.

“The real S&P composite has increased 12.2-fold from January 1890 to December 2014, or 2.03 percent per year, much less than most people would have guessed. Most of the real return in the stock market over the last century has come from dividends, not real capital gains,” said Shiller. “Home prices have increased only 1.5-fold, or only 33 basis points a year. Essentially, home price capital gains overall have amounted to virtually nothing.”

One must also account for the costs of home ownership, costs that don’t exist in stock ownership. Property taxes, insurance, maintenance, renovation all subtract from the capital gains of owning a home.

The downside to stocks, however, is capital gains taxes.

“If we had much stronger 401K [retirement]-type programs in the United States, much more heavily pushed, much bigger commitment from everybody, would that replace homeownership as a way to build wealth?” asked David Blitzer, chairman and managing director at S&P Dow Jones Indices. “Right now my impression is that the tax benefits of a 401(k) plan or other contribution pension plans pale compared to home ownership.”

Read more: Where to put your cash? A house or a stock