The S&P 500 rose about 2% in December as the Trump rally rolled on, but that didn't stop a large number of individual investors from locking in gains.

"We've been seeing profit-taking in some sectors after the election, even when the S&P 500 was hitting new highs," says Steve Quirk, executive vice president of the trader group at TD Ameritrade (AMTD) .

The behavior-based TD Ameritrade Investor Movement Index, or IMX, which aggregates Main Street investor positions, fell 1% to 5.48 in December as retail investors slightly decreased their exposure to the U.S. equity markets for the second month in a row. The VIX, or so-called fear index, started and finished the month at 14.

Each month, TD Ameritrade pulls a sample from its client base of 6 million funded accounts that includes all accounts that completed a trade in the past month. The holdings and positions of this statistically significant sample are evaluated to calculate individual scores, and the median of those scores represents the monthly IMX.

As the holiday shopping season reached its peak in December, Amazon (AMZN) was a net buy. This is the third month in a row TD Ameritrade clients were buyers of Amazon as well as of Facebook (FB) .

Bank of America (BAC) , which appeared to stabilize following a dramatic increase after the presidential election in November, was also a net buy. Chipmaker Nvidia (NVDA) , one of the best performing stocks in the S&P 500, was also a popular buy.

If you liked this article you might like

8 Reasons Goldman Sachs CEO Has Every Reason to Be Terrified of Stock Market

8 Reasons Why Lloyd Blankfein Has Every Right to Be 'Unnerved' by This Market

Hurricane Irma Exposes Rising Fear in the Stock Market's Near-Term Future

Storms, Indexes Pose Growing Threats

Massachusetts Opens Inquiry Into 7 Brokerage Firms