Investing icon Peter Lynch used to say that some of his best stock ideas came from observing everyday trends in stores and on the streets.

Michael Mattioli, a portfolio manager with John Hancock Asset Management, thinks he’s found one. He’s been going to a lot more weddings lately. To Mattioli, a millennial in his early 30s, that means at least one thing: They’re going to buy homes. And demographic experts agree with him.

Once bashed as “the lamest generation” by The Daily Beast, millennials have been ridiculed for being too self absorbed to consider getting married and raising a family. But that’s about to change. Millennials are about to “grow up” and start moving out of their parents’ homes.

If more millennials will be tying the knot, as Mattioli is already observing in his own personal life, this trend will boost housing sales over the next few years. That will help the shares of Lennar L, -3.39% , NVR US:N, Lowe’s LOW, -1.82% and Tempur Sealy TPX, -1.61% , which Mattioli owns in part as a play on this trend.

“Millennials are leaving the basement,” Mattioli says.

To see why, I recently checked in with Samuel Sturgeon, an expert in marriage and fertility trends at Demographic Intelligence, which publishes the U.S. Wedding Forecast. Here are three key factors creating a dynamic that explains why a lot more millennials will be getting married and buying homes over the next few years, creating a housing boomlet that you can invest in now.

1. Millennials are the most educated generation in U.S. history (thanks to the achievement of females in the group), and college-educated people are more likely to buy homes.

2. College-educated millennials start getting married in big numbers at age 25-26 and beyond.

3. The two biggest age cohorts among millennials, the bulge in the python, if you will, are now 24 and 25 years old.

Add it all up, and here’s the key takeaway: The biggest chunk of millennials who are more likely to buy homes are just now moving into their prime marriage and home-buying years. This will put a fresh bid in the housing market for the next several years.

“The reputation of millennials is that they are putting off marriage and taking too long to grow up,” Sturgeon says. “But we are at the front of a big wave of millennial marriages,” he says.

Read:More than half of millennials have less than $1,000

The early signs of this trend appeared last year when marriage rates ticked up for the first time in over two decades, a data point that reinforced Mattioli’s observation that he’s suddenly going to more weddings.

He thinks the reasonably strong job market and wage inflation — there are now emerging signs that wage growth is picking up — will support home-buying demand as well.

Help from their seniors

Another factor in the mix here: Mattioli believes millennials will be joined soon by their seniors in the hunt for the perfect home, for a simple reason: We are now seven years from the financial crisis. Seven is the magic number for people whose credit ratings got hammered by personal bankruptcy because they had to bail on mortgages during the financial crisis. It’s the point where bankruptcy gets expunged from their records.

Big picture, the gap between recent levels of home ownership and the long-term averages offer an idea of how much demand will come on to the housing market, if the factors above push the country back toward those historic averages.

Also see:Why you might retire to a tiny house — by choice

Across age groups, home ownership is 3-6 percentage points below historical averages. “If you think we are going to get back to long-term averages eventually, that is a lot of slack to be picked up in the housing market,” Mattioli says.

Goldman Sachs analyst Samuel Eisner predicts single-family housing starts will nearly double by 2019, to 1.1 million a year from 645,000 in 2014.

“We remain bullish on the outlook for the housing market as we believe a multi-year demand wave from millennials coupled with tightening available supply should require increased levels of building,” Eisner says.

One false belief suppressing bullishness on homebuilders and related retailers is that Federal Reserve interest-rate increases will drive up mortgage rates so much that it will stifle demand. But this probably won’t be the case, for two reasons.

First, the Fed is working the short end of the yield curve, but mortgage rates tend to price off the 10-year U.S. government bond yield, which is set by the market. It’s not certain that Fed rate hikes will drive up the entire yield curve. Next, even if mortgage rates do go up a bit, they will still be low by historical standards.

Investing in the millennial home-buying trend

It’s important to remember that housing trends have a huge impact on the economy. A million housing starts creates four million permanent jobs — outside of the work needed to build those homes, in everything from restaurants and hospitals to law offices.

As for specific stock plays, Mattioli favors Lennar and NVR among homebuilders because they do business across the country. This eliminates the need for a geographical call on which areas will do best.

Those two offer a nice blend of business models. Lennar is a kind of land bank that buys lots of land and holds it until the company thinks it’s the right time to build. Lennar bought a lot of land when it was on sale during 2009-10. He also likes the high insider ownership here.

“We like to bet with management,” he says. NVR buys options on land, and then exercises the options when it thinks the time has come to build. So it has less debt.

An increase in home buying will help home-supply chains like Lowe’s, which Mattioli prefers over Home Depot HD, -2.47% because Lowe’s is cheaper. While Amazon.com AMZN, -4.12% is taking market share from retailers, Mattioli sees less of a risk here since so much of the buying at Lowe’s happens on the spur of the moment, during a home-repair project. Next, new homeowners often buy new mattresses, and here Mattioli favors Tempur Sealy because the perceived advantages of its Tempur-Pedic mattresses makes them easier to sell without running discounts to bring in customers.

And, finally, here’s a homebuilding play you might not have thought of: Ford F, -2.06% . Since 2000, housing starts have been a good predictor of demand for pickup trucks, according to analysts at Goldman Sachs. Ford makes the popular F-150, and it’s launching a new Super Duty model in the middle of 2016.

At the time of publication, Michael Brush had no positions in any stocks mentioned in this column. Brush is a Manhattan-based financial writer who publishes the stock newsletter Brush Up on Stocks. Brush has covered business for the New York Times and The Economist group, and he attended Columbia Business School in the Knight-Bagehot program.