History doesn’t repeat itself, but it does rhyme, Mark Twain probably never said.

That’s most true in financial markets, where bullish and bearish phases follow certain clear, discernible patterns. “Bull markets are born on pessimism, grow on skepticism, mature on optimism and die on euphoria,” the late, great Sir John Templeton surely did say.

Problem is, when you live through a bull or bear market, you’ll likely get swept up in the prevailing sentiment and will be unable to put things in perspective—especially if you’re young or new to investing.

Which brings us to a report by TD Ameritrade about the investing habits of the much-chronicled millennials, who are rapidly replacing baby boomers on the economy’s center stage.

According to TD Ameritrade, the five stocks most owned by its millennial customers are—wait for it—Apple AAPL, +0.41% Facebook FB, +1.09% Amazon AMZN, -0.37%Tesla TSLA, +2.61% and Netflix NFLX, +0.96% almost all staples of millennials’ daily diet. (Few millennials can afford to drive Teslas, but they’re way cool, so I guess it counts.)

Capitalism Summer Camp for ​Grade-Schoolers

These also have been among the market’s hottest stocks over the last few years, until the recent selloff took some wind out of their sails. None of the millennials’ top 10 stocks pay boring old dividends, Steven Quirk, executive vice president of TD Ameritrade’s Trader Group, told CNBC.

Quirk said nearly half of the firm’s millennial clients trade on their mobile devices, twice as much as the overall customer base. They “all trade the same” social media stocks, he said, including hip losers Snap SNAP, -8.06%  and Twitter TWTR, +2.49%both now below their initial public offering prices, as millennials invest in what they know.

Those of us who’ve been around for a while have seen this movie before, and it looks like a bad sequel, like “Alien: Resurrection” or “Pirates of the Caribbean: Dead Men Tell No Tales.”

Not so long ago, before the turn of the Millennium, novice investors, caught up in the giddy potential of an internet that was going to “change everything,” threw gobs of money into fly-by-night dot-coms and solid technology companies like Cisco Systems CSCO, +0.18% Many of these “investors” may be parents of millennials, who were born roughly between 1981 and 1997.

A famous E*TRADE ad from that era urged investors to “boot your broker” and trade online. Thousands followed that advice, sometimes quitting their real jobs to day trade hot stocks like Yahoo and internet incubator CMGI (which gained almost 5,000% in five years) dozens of times a day. Sure, they used clunky old desktop PCs rather than sleek iPhones, but the result was exactly the same: Very few made any money.

Nobody expected the merry-go-round to stop, but of course it did, and even non-day-trading investors, who had bet heavily on technology and the internet, lost their shirts. The S&P 500 SPX, -0.08%  tumbled 49% and the Nasdaq Composite IndexCOMP, +0.20%  lost an astonishing 72% of its value. Some people who had lived through this grim experience swore off investing forever.