Frans and Caroline Swaalf, management consultants in the Netherlands, have been enamored of South Florida since they were graduate students at the University of Miami in the 1990s.

When the housing crisis hit in 2007, they thought their time to buy had come. They bought a condo in the Fontainebleau, a resort in Miami Beach, in 2010, after prices had bottomed out, paying 60 percent less than it had sold for two years earlier. The condo has since doubled in value.

The Swaalfs began investing in other properties. In 2011, they bought a small condo in an Art Deco building and doubled their money when they sold it six years later. They put that money into a larger condo in Miami that overlooked the water, and then looked for a buyer. But Mr. Swaalf expects to make only 5 to 10 percent when the sale closes.

That was a signal to the couple that the market was slowing and that it was time to put their investment gains elsewhere. Prices in the Miami area have cooled since September, according to Trulia, a real estate search engine.

Real estate investments, whether residential or commercial, have long been associated with wealth creation in the United States. The 2007 housing crash put a damper on that; the market lost about a quarter of its value over two years. Housing has since stabilized, although sales have been sluggish in the face of rising interest rates.

In a recession, though, the value of real estate — a mix of the home’s or building’s value and its location — becomes harder to discern. An investment can become illiquid when the market drops as the number of buyers dries up, and sellers have to learn to be patient to avoid taking a loss.

“Real estate has a good track record,” said Peter Heilbron, senior investment officer at Northern Trust. “But we know that these downturns are going to come along from time to time.”

Mr. Heilbron equated housing losses in 2007 to what happened to stocks after the Great Depression. “It’s not that the market went down — it’s that people needed to sell the stocks on the way down,” he said. “If I get into a downturn today, am I going to have to sell the things that I really need?”

This is the fifth and final installment in a series looking at how people manage passion assets, those that produce tremendous investment gains and carry social cachet and provide personal enjoyment. But when the economy slows, they can be hard to sell and can act as a drain on a portfolio. Previous columns have looked at artcarscollectibles and private equity.

Real estate traditionally has two prongs: residential properties that owners live in or rent out, and commercial real estate like apartment buildings, office space and shopping centers that are bought and sold based on the revenue they generate.

For residential owners, the risks can be greater going into a recession. The value of their home is almost always a bet on appreciation, which is no guarantee.

“Where it tends to work out better than not is at the top tier,” said Karen Harding, leader of the private wealth practice group at NEPC, a wealth adviser. But owners of luxury properties face additional costs, she said: “They’re going to spend a lot of money for the upkeep and maintenance.”

Several high-end property markets are softening, which presents a buying opportunity — or a selling crisis. New York is still in the midst of a boom for high-end properties. Kenneth C. Griffin, founder and chief executive of the hedge fund Citadel, paid a record $238 million in January for a penthouse apartment overlooking Central Park.

But parts of the Manhattan market have cooled, said Noble Black, a broker at Douglas Elliman. “The era of aspirational pricing is over,” he said. “Anyone who is selling a property is selling it for less today than 12 to 18 months ago.”

Allison Turk, a broker with EWM Realty in Miami who advised the Swaalfs, said that some neighborhoods, like Coconut Grove, were flourishing, but that buyers had to be more selective and sellers more pragmatic.

For commercial properties, investors should focus on price and long-term returns, but there are such enormous tax advantages for real estate that losing money may seem hard to do.

The oldest tax break is the 1031 exchange, named for its section in the Internal Revenue Code. It is also known as a “like-kind”  exchange and traces its roots back to farmers trading parcels of land to create contiguous farms. They were able to do so without paying any capital gains tax on the swap.

Since then, these exchanges have come to include all manner of real estate transactions in which enormous taxable gains are rolled into another property of equal or greater value. In theory, capital gains taxes on real estate might never be paid if the owner dies and the property is passed on to heirs.

This break was pared back in last year’s tax overhaul to exclude collectibles like art and cars. But interest in it remains strong. David Gorenberg, a vice president at Wilmington Trust, said business was growing because real estate values had increased so much over the past decade.

But these transactions carry risk, particularly in a slow market. During the last recession, Mr. Gorenberg said, investors who hoped to take advantage of a 1031 exchange were unable to buy a new property to complete the deal and ended up having to pay taxes on the property they sold.

“It’s always a good idea to know where you’re going before you leave where you are,” he said.

A new tax incentive for real estate is the opportunity zone, which allows people with any sort of capital gains — not just from real estate — to invest in real estate and businesses in designated communities. But to realize the full tax benefit, investors must leave their investment in the opportunity zone for 10 years, during which a recession could occur.

Residential or commercial, properties have carrying costs, like debt on the property and associated taxes, which are known up front. But there are also variables like maintenance and insurance costs.

With any investment property, some or all of these expenses can be tax deductible. State and local taxes, for example, can be claimed as a deduction on a business asset.

This strategy has helped some affluent owners in soft markets. Chris Zander, president of Evercore Wealth Management, said clients struggling to get the price they wanted had turned to renting the homes to offset the carrying costs.

“If it’s a large property, the ongoing costs are significant,” he said. “Renting may be an option to ride out a downturn or allow you to find that unique buyer for that property.”

Historically, rental revenue has remained stable in downturns — although a luxury home is more difficult to rent than a standard two-bedroom apartment.

“The rent on a $1 million house isn’t 10 times the rent on a $100,000 house,” said Gary Beasley, chief executive and founder of Roofstock, a marketplace to buy and sell investment properties. “Your yield tends to go down as the price goes up. Typically, the less expensive the home, the higher yield you can generate.”

Still, what matters are the price you paid and the rental income you’re getting above the costs of the mortgage and maintenance.

Real estate also needs to be considered against other assets in a portfolio to ensure there is sufficient cash to withstand a downturn.

“People collect passion assets and invest in them episodically, but they do not think about them in total,” Mr. Zander said. “You really need to model all of that out and see where you are. That’s how these liquidity squeezes can happen.”

As for the Swaalfs, they are leaving the door open to investing in South Florida real estate again.

“It could be that we’re back in Miami with another president and after a recession that will make the market more interesting,” Mr. Swaalf said. “If you have the patience, a bear market recession can be bad, but it usually doesn’t last long. You just need the time in life.”

Read the article on The New York Times site here.