Traders eyeing U.S. retail giants like Amazon.com Inc. (AMZN  ), Walmart Inc. (WMT  ) and Best Buy (BBY  ) ahead of Black Friday and Cyber Monday may be in for an unpleasant surprise as December kicks in.

Despite the holiday shopping frenzy, historical data spanning decades suggests December is not the ideal month to invest in these retail behemoths.

December Is (Not) The Most Wonderful Time Of The Year For Walmart

Over the last 20 years, December has been Walmart's weakest month of the year.

Shares of Walmart fell by an average of 1.1% during the month, marking their worst average monthly performance.

Adding to the gloom, Walmart shares have only closed December in positive territory 40% of the time-just 8 times in 20 years. This is the lowest winning ratio for any month in the calendar year.

The retailer's worst December performance in recent history occurred in 2022, when Walmart shares tumbled 7% during the month.

When extending the timeframe to 30 years, the data remains consistent: December is still Walmart's worst-performing month, with shares dropping 0.9% on average and maintaining a winning ratio of just 40%.

Amazon Also Sees Red In December

Amazon.com Inc. also tends to falter during the holiday season. While the e-commerce giant doesn't post losses as steep as Walmart's, December ranks as Amazon's second-worst month for stock performance, trailing only February.

Over the last 20 years, Amazon shares have fallen an average of 0.27% in December, with a winning ratio of just 45%.

The worst December on record came recently in 2022, when Amazon's stock plummeted by 13%, reflecting broader market turbulence.

However, December hasn't always been grim-Amazon saw some standout gains in the past, including a 20.1% rally in 2008 and an 11.6% jump in 2004.

Why Do Amazon And Walmart Struggle During the Holidays?

At first glance, the holiday season-a time of frenzied shopping activity-might seem like a boon for retail stocks. But Wall Street investors often shy away from buying retail giants like Amazon and Walmart during this period, and the reasons boil down to profit margins.

Black Friday and Cyber Monday deals may boost revenue, but they also weigh on profit margins. The steep discounts needed to attract consumers during the holidays often lead to margin compression, a red flag for investors prioritizing profitability.

The holiday period is typically when expectations for retail performance are already sky-high. If results don't meet or exceed those lofty benchmarks, stocks often sell-off.