The U.S. stock market will fight strong headwinds in the months leading to Election Day in November 2020.

But the fear that’s transfixing investors on both sides will turn to relief for supporters of the winning party once the outcome is known. At that point the headwind will quickly shift to a tailwind, as those on the winning side put money to work and drive markets higher.

Until then, investors may have to muddle through the fourth year of Donald Trump’s presidency. For any president, the fourth year is typically characterized by weak markets. Our analysis of past election cycles shows stock market declines usually last until the resolution of the election is known (which may come prior to Election Day) and is then followed by a “relief” rally. This has been the case in every election cycle dating back to Reagan versus Mondale in 1984.

This is a challenging juncture because the fundamentals of the U.S. economy are solid, market valuations are fair and many stocks are offering compelling valuations. Beyond that, major 15- to 20-year cycles alternate between despair and exuberance. We can debate if we are more or less than halfway through that cycle, but we have not seen the usual giddiness that typically marks the top of a cycle.

But against that positive long-term view, the psychological factors weighing on the markets today can be expected to remain particularly daunting. The upcoming election is only one more significant factor to consider.

The period leading up to a presidential election is always tricky. This election cycle in particular offers more challenges than most. Between 1984 and 2016, the hard policy distinctions between the parties were subtle. Not so in 2020. For the first time in a long time there is a quantum difference in policy approaches between credible candidates. That is going to be a tough reality for investors to work through.

On top of that, the attempted impeachment of President Trump will generate headlines for the foreseeable future. Regardless of whether you think it is right or wrong, or where you want to lay blame, it does not make for an easy investment climate.

First, fear …

Stock market performance tends to weaken during the fourth year of a presidential term because investors on both sides of the political spectrum become paralyzed. Each side fears what will happen if the other wins, so no one wants to put money to work. Consequently, nobody is confident until they know which way the election will go.

… then relief

Once the outcome becomes clear, half of us remain worried. The other half breathes a sigh of relief and puts money to work, and the pause around the election ends.

Looked at that way, one would expect markets to struggle for some period before the election and then to advance once the results are known.

The data

The following table tries to tease out the specific pause around the election outcome. I looked for:

1. The period within 15 months ahead of the election in which the market reached a near-term peak.

2. The trough moment as the outcome became obvious, fear ebbed and a relief rally started.

3. What happened sooner — when the relief rally ended or one year after the election.

The headwind that markets face in the run-up to a presidential election is stark and real. There is always a pause (or worse).

Yes, there are many calendar-based market-timing strategies bandied about every year in the financial media. An example is “sell in May and go away.” But most of these cliché strategies can be discounted. The average benefit is too small not to be overwhelmed by whatever makes a particular period different.

But the election-cycle argument is different. It is normal for us to be facing a headwind at this moment, and it can easily last another six months to a year, and once there is clarity around the election, the headwind should shift and become a tailwind, giving the market a sharp bounce.

In 1984, the trough was reached in the summer before the election. The outcome was pretty clear at that point. In 2000, the market didn’t hit bottom until December, but of course the outcome wasn’t known on Election Day. The only year in which there was not an extended period of decline was 1996. That was in the middle of a massive bull market and the advance was modest to the election result. Then the stock market jumped 40%.

Don’t make these mistakes

There will be intelligent people on both sides of the political divide that will be sure in their bones that if the other side wins, we will be going to hell in a hand basket. That argument is typical and, for the most part, has been wrong.

The mistake is two-fold. One, we should not underestimate the resilience of the system. Politicians may not be able to muck things up as badly as you fear. And then there is the reality that some of what the other side is trying to do is something we can all get behind, no matter how much we are sure they are wrong.

Investors who make tactical and thematic bets in this market environment can excel if they get them right. Calling the exact moment when despair ends and relief takes hold is fine cocktail talk, but a tough way to invest money.

What to do

Prudent investors ought to tune out the noise to make sound, security-specific investment decisions.

Some examples: Investment bank Goldman Sachs GS, +0.37%  is trading right at tangible book value and 9. times the consensus earnings estimate for the next 12 months, according to analysts polled by FactSet.

Credit-card company American Express AXP, -0.14%  has increased sales by 32% and earnings per share by 67% over four years and trades at 13.7 times forward earnings, with double-digit earnings growth expected.

Investment firm Invesco IVZ, +0.98%  has a solid franchise, trades at 0.6% of assets under management and 6.7 times forward earnings.

Financial-services company MBIA MBI, -1.01%  trades at 40% of our estimate of its true economic assets (which is ultimately a bond portfolio generating a return).

Finally, iPhone maker Apple AAPL, +1.19%, chip company Micron Technology MU, +1.94%  and semiconductor-equipment producer Qualcomm QCOM, +0.36%  dominate their industries, have transformative opportunities ahead of them and trade at very attractive valuations.

Those are just a few companies; there are scores more.

The big picture in the markets may get obscured in the months ahead. What to do about it is not. Investors are being offered high-quality assets at compelling prices. So be invested.

Charles Lemonides is founder, chief investment officer and portfolio manager at ValueWorks LLC, an investment-management firm based in New York.