The past seven months have been a wild ride for stocks. In March, the market crashed as a result of the coronavirus outbreak. Then, stocks recovered, only to encounter a major sell-off in early September. In fact, the stock market has bounced around a lot in October, and as we inch closer and closer to the upcoming presidential election, we could see even more turbulence.

As an investor, that puts you in a tough spot, so if you're worried about managing your portfolio during these trying times, here's one solution worth considering: dollar-cost averaging. It's a strategy that investing legend Warren Buffett has long advocated, and it's a good bet for navigating a volatile market like the one we're in.

Man at laptop talking on phone while holding pen

Image source: Getty Images.

How dollar-cost averaging works

The concept of dollar-cost averaging is simple: Pick some stocks, figure out how much you can afford to invest, and then commit to buying shares at preset intervals. For example, say you decide you want to buy Netflix (NFLX -0.51%) and can dedicate $200 every two weeks toward its shares. (Technically, $200 isn't enough to buy a full share of Netflix right now, but you can buy fractional shares instead.) In that case, you'd buy Netflix every other week, regardless of the price it's trading at on the day you purchase your shares.

The idea behind dollar-cost averaging is that while you might overpay for shares some weeks, you'll also underpay other weeks. All told, things should all work out in your favor so that you're ultimately paying a lower price per share all in.

Dollar-cost averaging is a far safer bet than aiming to time the market during periods of volatility, because in doing so, you might miss out on great buying opportunities and risk getting stuck with a higher share price overall. Remember, the stock market is unpredictable on a good week, but when we're in the midst of election season, it can be even wilder. And at a time like that, being consistent is crucial.

Of course, if you want to take Buffett's advice even further, employ dollar-cost averaging to buy shares of S&P 500 index funds. That way, you get exposure to the broader market and aren't putting all of your money into a single stock. Buffett has stated many times over that index funds are a great way for the average investor to grow wealth, so if you don't want to do the legwork involved in vetting individual stocks, index funds are the way to go.

Take Buffett's advice

A man with the investing track record of Buffett is someone to take seriously. If you're looking to invest in the coming weeks, it pays to employ dollar-cost averaging rather than attempt to time the market in an effort to score the lowest stock prices. Investors who try timing the market often get burned, and given the way stocks could swing in the near term, a stable, steady approach is not only a safer bet, but most likely a more lucrative one as well.