See more of the story

Despite a bumpy month for stocks, millennial investors remained bullish about the market in August — especially with regard to some relatively young companies — according to data provided to NerdWallet by TD Ameritrade.

The numbers, which come from TD Ameritrade's monthly Investor Movement Index, or IMX, show that millennial investors increased their stock holdings more sharply than the average investor in August.

They also show that millennial investors were more likely than the average stock buyer to buy shares from Facebook, Ford, Snap (phone app Snapchat's parent company) and Redfin, a web-based real estate broker.

The market is hovering at all-time highs, but that won't last forever. And when the market tumbles, could millennials' increasing excitement for these and other stocks end in heartbreak?

Here's a closer look at the numbers and tactics millennials might use to help manage their risks.

How millennials traded in August

Millennials — those born between 1981 and 1998, in TD Ameritrade's survey — seized on market choppiness to add more stocks to their portfolios in August.

Millennials' IMX reading — a metric TD Ameritrade uses to gauge investors' outlook based on holdings and trade activity — jumped 6.8 percent to a reading of 7.72 in August.

Sentiment among all retail investors rose 5.1 percent during the month, climbing to a record high of 7.45.

The Standard & Poor's 500 index fell more than 1 percent twice in a span of six days in August, but that didn't faze young investors.

"Millennials are using any periods of temporary weakness as a buying opportunity," said Joe Kinahan, chief market strategist at TD Ameritrade.

Such behavior counters suggestions that millennials are resisting the stock market. Rather, Kinahan said, they are trading like traditional investors have for decades.

However, even with some dips in the market, the S&P 500 sits close to all-time highs. But millennials have opted for some of the market's still-unproven stocks, which could be costly in a downturn.

Millennials turn toward recent IPOs

In August, millennial investors gravitated toward Redfin and Snap, two companies that held initial public offerings during the last year.

Redfin is up more than 15 percent since its July IPO, while Snap shares fell in August to below 50 percent of their March debut price.

Stocks can turn into fantastic performers even after a rough start, — Facebook, for example — but investors should heed certain lessons to maximize their chances of profiting on individual companies.

And investors of all ages should carefully consider the risks of buying early-stage growth companies.

Both Redfin and Snap were unprofitable over the last year. This doesn't always translate into a declining stock price in the short term, but it will over the long term.

Among millennials' top sells in August? Telecom giant Verizon and oil company Chevron.

Both companies are profitable and rebounded during the month after hitting multimonth lows in July.

"Millennials are selling stocks with higher yields," Kinahan said.

Relative to other investors, they are willing to take on more risk via capital appreciation (when an asset's value increases) rather than focusing on a safer dividend yield (or cash payments to shareholders), he said.

How millennials can manage their risks

With the move to riskier — but potentially higher-return — stocks and the market near all-time highs, millennials are wagering on bright days ahead.

When the market turns, though, growth stocks may feel the brunt. To soften the potential blow, investors should consider:

• Making diversification a priority. It's the easiest way to reduce risk, even for those who favor riskier growth stocks.

Many brokers offer commission-free ETFs that can quickly and cheaply diversify a portfolio.

• Adding less volatile dividend stocks to their portfolios, or alternatively, dividend-paying ETFs.

Anna-Louise Jackson is a writer at NerdWallet. E-mail: ajackson@nerdwallet.com. Twitter: @aljax7. James Royal is a writer at NerdWallet. E-mail: jroyal@nerdwallet.com.