Q. I'm tired of the stock market's mood swings. I'm thinking about taking my money out of equities and putting it into real estate. What do you recommend?

--Washington, D.C.

A. Since I'm not a financial planner, I won't comment on the advisability of pulling your money out of the stock market. But housing inventory is tight, foreclosures are dropping, fewer homeowners are underwater on their mortgages and home prices are improving in most places--all signs that economists and others say point to a recovery under way for housing.

Moreover, 80 million Millennials, despite shaky job prospects, are getting antsy after years of living with mom and dad. After all, the oldest members of this generation are in their late 20s. Eventually they'll form their own families and move out of the nest, and once they do, their boomer parents—76 million strong—will finally be free to sell their McMansions and buy or rent something more age-appropriate.

Of course, no one ever be sure what the housing market will do in a volatile economy, just like no one can really predict where the stock market will go. And bear in mind that housing, unlike stocks, is an illiquid investment.

However, if you decide to become a landlord to take advantage of the improving housing market, I suggest that you look for a well-maintained single-family home in the best neighborhood that you can afford. A dilapidated house in a sketchy neighborhood might cost less initially, but you'll have to put in money to fix it up and won't have the same appreciation potential. You'll also be dealing with less affluent tenants, which could mean more evictions and vacancies. Similarly, a condo may be less expensive to purchase, but is subject to unexpected association fee hikes and rental rule restrictions that could limit your return on investment.

If you buy a rental home, consider forming a limited liability company (LLC) to hold it. It will protect your personal assets from any lawsuits relating to the property, but allow all profits and losses to pass directly to you for tax purposes. A checklist for what you'll need to do to create the business, which includes various tax, licensing and filing requirements, can be found on the District of Columbia website; if you live elsewhere, check out the website of Citizen Media Law Project, hosted by Harvard University's Berkman Center for Internet & Society, for rules applicable to each state. It's worthwhile to get legal help in setting up your LLC; it's also a good idea to create a separate bank account for your business.

Owning a rental home could provide you with steady cash flow, but have you also considered other ways of investing in real estate? Equity REITs, which pool money to buy investment properties, are a possibility as long as interest rates remain low, holding down borrowing costs. You can buy REITs specializing in all sorts of sectors, including apartments, student housing, retail, health care, casinos, offices, warehouses and storage space. Other possibilities that can hedge your risk include REIT mutual funds, exchange-traded funds and home-builders' stocks. Discuss these options with your financial adviser, since they expose you to the real estate market without your ever having to deal with a tenant's stuck garbage disposal at midnight.

Write to June Fletcher at fletcher.june@gmail.com.