That’s one of the clearest lessons from the Federal Reserve’s decision this Wednesday to scale back, or “taper,” its bond-buying program to $75 billion from $85 billion per month.

Between Wednesday morning and Friday’s close, stocks gained 2.1%. But real-estate investment trusts—the popular, publicly traded bundles of commercial, residential and other property—were up just 1.2%, with sharper bounces along the way.

This week’s jittery behavior by REITs is the latest scene in an eternal tragedy of investing: When too many people want to own something all at once for the wrong reasons, they will almost certainly end up sorry they bought it at all.

You should own REITs because you want to diversify some of the risks of stocks and bonds and to combat inflation—not because you are chasing high dividend yields or because you think the hot returns of the past will persist.

Until earlier this year, REITs were one of the hottest assets around: Between the beginning of 2009 and the end of 2012, the FTSE NAREIT Equity REITs Index, a broad measure of the sector’s performance, returned an average of 20.3% annually, including dividends, while U.S. stocks overall earned 14.6%.

“For investors who were worried by what they saw in [stocks] in 2008 but wanted to move a little beyond fixed income, there was an attractiveness to REITs,” says Wyatt Lee, manager of the T. Rowe Price Real Assets Fund, a portfolio of companies related to energy, commodities, real estate and other physical assets; the fund has more than 30% of its $3.5 billion in REITs.

Unlike most corporations, REITs are required by law to pay out essentially all of their net earnings as dividends. Their average yield—annual dividend divided by share price—of approximately 4% is twice the payout on stocks and one-third more than you can earn on 10-year U.S. Treasury bonds.

By the beginning of this year, investors weren’t just adding money to real estate; they were attacking it. In the first five months of 2013, $10.3 billion poured into real-estate funds, according to Morningstar. By the end of May a remarkable 9% of the $110.8 billion in these funds’ total assets had arrived since Jan. 1.

That month, the Federal Reserve began talking about tapering, which many investors regard as a prelude to rising interest rates. REITs promptly collapsed, with a 5.9% loss in May alone. This year, the S&P 500 has returned 30%; REITs have earned less than 2%, even after counting their 4% dividend.

Right on cue, between May and last month, many investors locked in their recent losses, yanking $2.5 billion out of real-estate funds as prices fell.

“As bond yields go higher, the dividend yields of REITs relative to those on bonds aren’t as attractive,” says Jeffrey Kolitch, manager of the Baron Real Estate Fund, with roughly $927 million in assets. Because REITs can’t retain their earnings to fund capital expansion, says Mr. Kolitch, they “are more susceptible to higher borrowing costs than many other companies.”

But it’s important to look beyond the short term, says Mike Kirby, chairman of Green Street Advisors, a real-estate research firm in Newport Beach, Calif.

In the long run, REITs “are not quite as interest-rate sensitive as some people think,” he says, because their earnings tend to grow as the economy improves: “REITs will probably do fine if interest-rate increases are tempered and moderate,” say a half-percentage point annually for a couple of years. They would, however, underperform stocks if interest rates jump sharply, he says.

After this year’s setbacks, says Mr. Kirby, “REITs are on the cheaper side of a fair range of valuation”—no bargain, but no longer as overpriced as they were in spring.

A reasonable expectation for total return over the next few years, say industry experts, is 6% to 7%. “The days of 20% returns, they’re gone,” says Mr. Kolitch.

Don’t be tempted to move into funds with yields above 4%, says Mr. Kirby: “The highest-yielding REITs are generally the most overpriced. You still have an awful lot of investors trying to pick up pennies in front of a steamroller.”
Anyone who overpays for lower-quality, higher-yielding assets could be crushed if interest rates rise sharply. The Fed promised again this week to keep rates low, but you never know.

Those who already own a REIT fund with annual expenses under 1% and a conservative yield below 4% should hold on.

Those who don’t should watch and wait: If interest rates take a sudden jump or stocks take off again, REITs could go on sale. As anyone who has ever bought a house knows, you will do best if you wait for a buyer’s market.