Emotions have run exceptionally high in this campaign—so high that hyperbolic statements about the likelihood of one candidate or the other torpedoing stocks, capsizing the bond market, or crippling the economy have the ring of truth for many voters. So it’s understandable for investors to worry that the outcome of the election could upend their portfolios. After votes are tallied on Nov. 8, about half the country will be elated, and nearly half will be scared. And research suggests that both groups are likely to rearrange their investments accordingly.

Neither euphoria nor depression is great for decision-making. “People’s positive sentiment when their party is in power leads them to think the world will deliver higher returns with lower risk,” says Santa Clara University professor Meir Statman, an expert in behavioral finance. One study looked at the behavior of about 60,000 investors from 1991 to 2002 and found that people took greater market risks when their party controlled Washington. Investors affiliated with the party out of power, on the other hand, tended to grow restless and trade more frequently, hurting their performance.

But while the inhabitant of 1600 Pennsylvania Avenue can alter our lives, history suggests that presidential politics have a surprisingly modest impact on stock markets. In the long run, broader economic cycles and the push-and-pull decisions of millions of businesses and shareholders do far more to move stock prices than any one leader. That’s why the investors who fare best after an election are the ones who keep their emotions in check—and avoid politicizing their portfolios.


Predicting which industries will benefit most from which candidate is a favorite parlor game of market seers. Right now, some pundits are advising audiences to invest in clean-energy companies, defense contractors, and multinationals in the event of a Hillary Clinton victory—which looked increasingly likely according to polling and prediction markets as of press time. A Donald Trump presidency, others say, should be a windfall for coal miners, small-cap U.S. companies (because their sales are mostly in the U.S.), and, of course, construction companies that might benefit from a massive government wall-building contract.

It all seems so logical—but history seldom supports such reasoning. In 2008, for example, the assumption based on his campaign platform was that President Obama would put gunmakers out of business, turn health care providers into wards of the state, and usher in a golden era for alternative energy. Tell that to Smith & Wesson swhc , whose stock price is almost nine times as high as it was five years ago. Or to the health care sector, which has outpaced the market throughout this administration. (Or to clean-energy stocks, down 49% under Obama.)

“The President isn’t a dictator,” says Brian Jacobsen, chief portfolio strategist at Wells Fargo Funds Management. “Just because he or she runs on a platform, it doesn’t mean that agenda will be put in place.” And even if the President gets what he or she wants, the real economy may not cooperate.

For more investment advice, watch this Fortune video:


Rather than hitch your strategy to a candidate, it may be wisest to observe the informal motto of the 1992 Bill Clinton campaign: “It’s the economy, stupid.” Over the past 150 years, the average economic expansion has lasted about 39 months. The current upturn, which began in June 2009, shortly after Obama took office, is in its 89th month, making it the fourth-longest since the Civil War. This means, if history is any indication, that either of today’s candidates is relatively likely to confront a recession early in his or her administration.

With that in mind, investors should focus on sectors that can withstand a downturn, such as health care. Like demand for toothpaste and other necessities, demand for health services isn’t dependent on a strong economy. Health care revenues are already growing more than eight times as fast as the overall economy, according to S&P Global Market Intelligence. For broad, cheap exposure, go with the Vanguard Health Care Fund vghcx . The actively managed fund, whose top holdings include drug giants Merck mrk and Allergan agn and insurer UnitedHealth unh , has beaten nearly 75% of its peers over the past 15 years.

Bull markets, likewise, have a finite life—about 4½ years on average. This one is already more than 7½ years old. Assuming it’s near its expiration date, investors should favor the large, dividend-paying stocks that tend to outperform in this stage of a market cycle. Income-seeking investors have loaded up on dividend stocks lately, leading some pros to worry that they have become too pricey (see our previous story). To focus on dividend payers that are better positioned to weather a downturn, go with SPDR S&P Dividend sdy : It’s an exchange-traded fund that invests only in large companies healthy enough to have boosted payouts for at least 20 consecutive years, including warhorses like AT&T t and Chevron cvx .

Portfolio tweaks like these may seem minor compared with the splashy tax and policy proposals of a new President. But whoever is elected will last, at most, eight years. You, on the other hand, are investing for the rest of your life—and there’s no need to do anything rash.

Taylor Tepper is a staff writer at Money.

A version of this article appears in the November 1, 2016 issue of Fortune with the headline “How to Invest, Whoever Wins.”