It's election season, a time when investors analyze their portfolios and look to make changes according to whom they think will win and what kind of policies might result.

They will almost always be wrong.

In 2016, the markets initially cratered following Donald Trump's surprising election win, only to reverse course immediately. And while many investors believe Republican low-tax policies would be better for the stock market, data from the last 70 years shows the opposite. Between 1952 and June 2020, the stock market has returned some 10.6% under Democrats and 4.8% under Republicans.

Whether this is a matter of causation or the luck of the business cycle is up for debate. But what is not up for debate is the difficulty of making investment decisions based on a single election.

With the market selling off in a big way last week as investors "de-risked" their portfolios ahead of Tuesday's election, like all market downturns, it opened up opportunities to add high-quality stocks poised for big things, no matter who wins. Here are three names you can snap up during the election volatility for safe long-term gains.

A young woman sleeps peacefully on her side with her phone on the nightstand next to her.

Three sleep-well-at-night stocks to buy this election season. Image source: Getty Images.

Microsoft

It was a bit strange that Microsoft (MSFT 0.73%) sold off after its earnings report last Tuesday; its results were nothing short of terrific. Oh, well -- these pullbacks just give long-term investors the chance to pick up shares at a discounted price.

Metric

FY Q1 2021 Growth (YOY)

Revenue

12.4%

Operating income

25.1%

Diluted earnings per share

31.9%

Data source: Microsoft FY Q1 earnings release. YOY=year-over-year.

Not a lot to complain about here. With its massive size and this being the last quarter before its new Xbox gaming consoles hit the market, revenue growth of 12.4% is a terrific result. Perhaps even more impressive, Microsoft is growing its top line nicely with little incremental investment, leading to a big margin expansion. And Microsoft is throwing off enough cash to buy back its stock the tune of $6.7 billion last quarter, lowering its share count further and boosting EPS by more than 2.5 times the rate of revenue growth.

Microsoft should continue to do well into 2021 and beyond, no matter who is president. Unlike the other FAANG stocks, Microsoft is not currently a target of antitrust regulators and politicians. In addition, Microsoft is mostly insulated from the U.S.-China trade war, should that conflict go south amid a Trump win.

With a solid No. 2 position in the high-growth cloud computing market, wide-moat software and enterprise resource planning franchises, and the new Xbox consoles hitting shelves this holiday season, Microsoft is one of the safest long-term buys in the market, as long as Satya Nadella remains CEO.

Costco Wholesale

Recession-proof discount wholesale club Costco (COST 1.42%) is also well-positioned for long-term gains, no matter who wins the election. One might have thought that COVID-19 would crimp Costco's sales this year, as most of its business still occurs in its warehouses. However, the company's strict safety protocols and the consumer need to stock up on a budget fueled big-time 14.1% comparable store sales growth last quarter, adjusted for gasoline and foreign exchange rates. In addition, Costco's nascent e-commerce offerings surged an impressive 91.3%. These impressive sales figures, combined with its usual solid membership growth, led to 26.7% growth in earnings per share.

While some might think that a low-cost discount retailer would be susceptible to an increase in the national minimum wage or additional worker benefit mandates that might come from a Democratic administration, Costco is already well ahead of the curve. In addition to a minimum starting wage of $15 per hour, which is more than double the federal minimum wage, Costco has also bumped employee pay this year amid the pandemic, in addition to offering employees overtime pay, 401(k) matches, and health benefits even to part-time employees. Coscto's unique membership-based business model allows for these perks, while also giving the company the additional benefit of lower turnover and better customer service.

Costco also appears to have a good long-term growth opportunity, especially in China. After the overwhelming response to Coscto's first store opening in Shanghai back in 2019, the company has an additional store planned for Shanghai and another in Suzhou for 2022. While U.S. technology firms have either been banned or run into great difficulty entering China, certain U.S. retail brands have had success there, and Costco's unique model seems to be resonating.

With a pandemic-proof, wide-moat business and ample expansion opportunity in the U.S. and abroad, Costco is another worry-free stock you can buy regardless of the U.S. election.

Texas Instruments

Regardless of who wins the election, it's safe to say that automobiles and factories will become "smarter" and more automated in the years ahead, thanks to improving technology and the Internet of Things. In addition, both political parties have demonstrated they are open to creating incentives for, or even subsidizing, domestic U.S. semiconductor production.

Both trends should benefit Texas Instruments (TXN 0.34%), which is 90 years old and still going strong. TI's longevity can be attributed to its long history of technological excellence, as well as its capital allocation policies that are among the best of any company you will find.

Texas Instruments is currently a market leader in analog chips and embedded processors, small chips that help automate just about every kind of device in the world, from medical devices, to smartphones, to automobiles, to industrial machines. And while the U.S. went into an industrial recession in 2019 and was hit with COVID in 2020, Texas Instruments has continued to generate cash flow, buy back stock, and just raised its dividend for the 17th year in a row -- a payout that currently yields 2.8%. Just imagine what could happen if global industrial companies and automobiles weren't in recession!

While TI sells chips on a global basis, only 2% of its third-quarter sales went to Chinese tech giant Huawei, which may be cut off from U.S.-made chips. That's far less than many other big chip companies, making this technology blue-chip a resilient play even if the Huawei ban sticks.

In all, TI is another top-tier stock poised for success, no matter what the election result.