It's a tricky time to be an investor. On the one hand, the 2020 market rally appears relentless, so each day you're on the sidelines is a day you're missing out on prospective gains. On the other hand, the S&P 500's 70% rebound from March's low feels overdone, setting the stage for profit-taking at any time.

Granted, that 70% run-up took shape after a sizable COVID-19-inspired setback. The S&P 500's year-to-date gain of 16% is a relatively typical full-year result that merely balances out the steep sell-off with the recovery. Nevertheless, doubts about more gains being made in the immediate future are understandable.

If that's what your gut is telling you, trust it. Just don't confuse what your gut is telling you about the short term with a long-term outlook. Earnings are still growing, as is the global economy. This ultimately means any big dip is a buying opportunity to capitalize on.

Digital rising stock chart plotted by man in suit.

Image source: Getty Images.

Strained valuations

There's no denying the toll that COVID-19 has taken on the worldwide economy, and by extension, corporate profits. The first quarter's per-share earnings for the S&P 500 -- the time at which the pandemic's impact was the greatest -- were about half of the collective bottom line produced in the first quarter of 2019. Profits have since begun to recover as companies figured out how to cope with stymied demand and logistics hurdles. Earnings are still subpar though, and they are projected to remain lackluster through the first quarter of 2021.

A funny thing is expected to happen around the middle of the coming year, however. Profits are expected to reach their pre-pandemic levels, en route to exceeding them by the latter half of 2021. The graphic below puts the recent past and the near future in perspective.

S&P 500's per-share earnings, past and projected.

Data source: Standard & Poor's. Chart by author.

As long as earnings continue to improve, the stock market should find a tailwind.

That's a bigger-picture view though, measured in months. Much can happen in the days and weeks in the meantime to make life relatively miserable for investors. Blame the incredible run-up since March's bottom.

While the optimism that took shape following February and March's fear-driven plunge was well-intended, it was also overdone. Sound thinking was upended by the fear of missing out sometime around the middle of 2020 when valuations -- past and projected -- moved to uncomfortably high levels. That didn't halt the rally, of course. The S&P 500 is now trading at 30.3 times its trailing-12-month earnings and 22.4 times its forward-looking per-share earnings. That's the highest trailing price-to-earnings ratio since 2001 (when the dot-com bubble finally burst). The index's forward-looking price-to-earnings ratio hasn't been at 22 since the same time.

S&P 500's price-to-earnings ratio, historical and forward-looking.

Data source: Standard & Poor's. Chart by author.

Simply put, stocks are expensive even if companies are able to reach their lofty earnings targets in 2021.

Get ready to pivot

Frothy valuations may set the stage for a market-wide chill, but they don't necessarily cause one. Stocks have been overbought and overvalued for some time now, and it's not stopped the bulls yet.

From an odds-making perspective though, the most recent leg of the rally from March's low has carried stocks to prices that will be difficult to sustain, even with a continued earnings recovery. Investors may be basing their bold bets on the pace of the rebound seen during the latter half of this year, forgetting that the bar was set low by a horrific first-quarter meltdown. The coming year's pace of progress won't be nearly as impressive as the past few months have been, which could easily deflate the optimism that's buoyed stocks of late.

As for timing, the market's December rally tends to linger into January, and there's little reason to think this time around will be any different. Once investors have a chance to survey the landscape and recognize the earnings growth outlooks already factor in an end to the pandemic, however, the broad bullish undertow could weaken. That realization should materialize sooner than later, suggesting some turbulence followed by a modest headwind is on the horizon.

None of this is necessarily a call to get out of the market, of course. As was already noted, any decent dip is a buying opportunity. The changing backdrop is just a reason to update your approach. The volatility that rewarded short-term speculation in 2020 won't be in place in 2021. Sitting on reliable, quality names like Verizon Communications or Alphabet for longer holding periods will ultimately yield better rewards in the environment ahead.