Look before you leap, as the old saying goes.

Nowhere is that more true than real estate investing. After all, when you’re sinking hard-earned capital into an investment, success is always balanced by some degree of uncertainty. The trick, then, is to do your due diligence on the forces influencing any given housing market; factor these into play before you make an investment, and your chances of making a profitable, successful investment will increase.

Let’s take a look at four indicators of an up-and-coming housing market.

Construction Spending

One great gauge of the overall growth of a real estate market has to do with construction spending. The Census Bureau does release residential construction spending statistics through its web portal, often disaggregated by state and region.

And some interesting trends can be seen, namely that construction spending is projected to slow down: beginning in 2017, estimated increases will only be about $10-20 billion per year–a significant slowdown compared to the quick growth from 2013 through 2015.

At any rate, it’s also important to disaggregate the data, especially for your regional location. For that, there are a number of more detailed reports, some by local and state authorities, and others by private consulting firms. Whatever source you choose, be sure to cross-reference these numbers to get a clearer, more accurate picture.

Construction Activity

But user beware: construction spending, in and of itself, isn’t the whole story. If it was, you could isolate booming markets on that alone–making for a predictable, obvious set of target markets (coastal cities with a large workforce and a developed economy).

Yet there’s more to the picture. For instance, in 2016, construction spending in New York was estimated at an all-time high of $43.1 billion, a 26% increase from 2015, and the first time that the indicator surpassed $40 billion. But here’s the thing: construction costs in New York City are also vastly higher, as well, not just for big, public infrastructure projects but also for residential developments.

The culprit? Intense, unyielding regulation, particularly in the big coastal cities like New York, which stifles new development by inflating costs and adding a whole raft of unnecessary permits and oversight. It’s gotten so bad, in fact, that one cornerstone of New York’s affordable housing plan is to reduce the byzantine zoning rules and community planning that all builders, investors, landlords, and residents must work around–simply to encourage the development of a small handful of apartments.

So remember: look at construction prices in tandem with construction rates, especially how fast apartments are being built, and what types are most common. Otherwise, you may be tempted to invest in markets whose rapid growth only serves as a cover for other, more serious weaknesses.

Vacancy Rates

Because residential real estate investment is built on the cash flow earned from rents, vacancy rates are a key metric of profitability and market success. This number will determine the average length of time that any of your apartments are likely to sit empty, not earn money, and thus, reduce cash flow, income, and the overall value of your investment.

To return to the example of New York, another weakness of a seemingly strong residential market is the city’s growing vacancy rates. This trend is most pronounced in Manhattan, the city’s economic center, which has a historically low vacancy rate of 2.8 to 3.1 percent. Analysts speculate that this increase is a result of two things: inflated rents and considerably more apartments than there are renters. Still, this trend isn’t seen in other boroughs, such as Brooklyn and Queens, which boast even lower vacancy rates than Manhattan.

Clearly, vacancy rates are a strong indicator of the overall health of any residential market.

Migration vs. Departure Rates

Just as you can track a company’s reputation and performance by its turnover, so too can you track a city’s desirability by its migration. Taken in context with other economic factors, such as wage growth and rent increases, migration rates can help investors can paint a clear picture of a city’s living conditions–essential to gauging the long-term health of any given development or portfolio of apartments.

The key here is to balance the migration rates (how many people come) with the departure rates (how many people leave). For instance, America is undergoing a historic shift: millions of residents who left the suburbs for cities at the height of the Great Recession are now returning to the suburbs from whence they came. Though there’s no single reason for this shift, it boils down to increasing costs, more space, lower gas prices, and a strengthening housing market. In essence, many cities are increasingly being treated as waystations for the native-born and immigrants alike: they arrive in cities, work and make some money, and then leave for wider, more spacious shores.

As a result, in/out migration rates should be considered in tandem with population growth statistics: ideally, in-migration should far outstrip out-migration. It’s a simple matter of supply-and-demand: more residents moving into a state means an increased number of apartments–which translates into higher rent, more cash flow, and thus, more value for your investments.

In the end, all these indicators are here to help you make an informed decision, and to make the best investment possible under the circumstances. Needless to say, there’s no magic formula for spotting a strong investment, and the best investors will rely on experience, data, and even intuition.

Good luck.