February might be great for romance, but it stinks for the stock market. Or, so says history.

However, is that the case this year? Let's take a look at how things are shaping up and what investors may want to do about it.

A stock chart on a digital screen.

Image source: Getty Images.

February is the second worst month for the stock market

When evaluating the stock market's performance, one usually examines a benchmark index like the S&P 500 (^GSPC 1.02%). For that index, February is, on average, the second-worst month, trailing only September for the lowest monthly average return over the last 100 years.

For another index, the tech-heavy Nasdaq Composite (^IXIC 2.02%), February actually tops the list of worst months in the years dating back to 2000. And, considering how hot the tech sector has been in the current bull market, many investors might be more interested in how that index has performed.

At any rate, so far this year, February certainly doesn't look like a laggard. The S&P 500 is up 3.8%, and the Nasdaq Composite is up 4.4%.

^SPX Chart

^SPX data by YCharts

What's more, some individual stocks have surged even higher in February. For example, Nvidia is up 27%, and Super Micro Computer is up 49%.

To be fair, it hasn't been smooth sailing for every stock in the market. Rivian, an electric vehicle (EV) maker, is down 32%, and social media stock Snap is down 33%.

SMCI Chart

SMCI data by YCharts

Clearly, you can see a few trends emerging just from those big winners and losers.

Artificial intelligence (AI), and the physical components behind it, remain red-hot. Nvidia, which designs the graphics processing units (GPUs) used to train advanced AI models, delivered another stellar earnings report. Super Micro Computer, which makes the server racks that hold advanced AI chips, also reported fantastic results.

Meanwhile, Rivian is reducing its workforce in a bid to boost profitability, or at any rate, to narrow its losses. On the other hand, Snap, the owner of Snapchat, saw a year's worth of stock market gains wiped out after issuing a very disappointing quarterly earnings report.

The lesson: Keep on investing

Good month or not, February, like all months, presents a wonderful opportunity to put money to work in the stock market. That's because the best way to invest is regularly.

Strategies like dollar-cost averaging or an automatic investment plan can help by removing some of the psychological barriers to investing. For example, some investors find it difficult to put new money to work when the stock market is making new highs -- like it is right now. On the other hand, some people find it uncomfortable to invest in the middle of a stock market correction or bear market.

By adopting a set strategy -- and sticking to it -- investors can fight off the all-too-common temptation of trying to time the market.