If there's one thing investors were reminded of this year, it's that stocks can be very, very volatile in the short run. After rallying nearly 27% in 2021, as of mid-October the S&P 500 was down by almost as much. Since then it's recovered somewhat and is down about 18.6%. The volatility has all been a bit maddening for anyone keeping daily tabs on the market.

For truly long-term investors, very little of this volatility really matters. Ten -- or even five -- years from now the details of a wild 2022 will likely be more than a little fuzzy and not matter greatly. If you've got an extra $3,000 available that you know you won't be needing anytime soon to boost an emergency fund, pay off short-term debt, or cover the monthly bills, here are three stocks to consider scooping up as true long-term holdings.

1. Tractor Supply

The retail industry as a whole remains on the defensive. Analysts at UBS estimate as many as 50,000 U.S. storefronts could be permanently shuttered between the end of last year and the end of 2026. That's in addition to the tens of thousands of closings prior to the pandemic.

There are pockets of clear strength within the business, though. Specialty stores located closer to people's homes rather than at the mall are holding up rather well.

Retailer Tractor Supply (TSCO -0.02%) is one of these thriving names. Its revenue is up more than 8% through the first three quarters of the year, and last year's top-line growth of 20% follows shockingly strong sales growth of 27% in pandemic-crimped 2020.

The company isn't just another chain of garden supply stores that are more accessible than a Lowe's or a Walmart. Tractor Supply is plugged into a much bigger cultural trend. Its store locales are generally rural, and its core customers are the growing crowd of people embracing self-sufficiency, particularly as it pertains to food.

And there's arguably never been a better time to be in the business. The U.S. Department of Agriculture estimates food prices will end the year up 10%. Although inflation rates are expected to level off in the foreseeable future, food prices aren't actually expected to peel back as a result. In fact, the Department of Agriculture is still calling for more muted food price increases in 2023, and quite possibly beyond.

2. Merck

The pharmaceutical business can be a tricky one. Drugmakers are forever working on new therapies that outperform existing ones, and even when that can't be done, any drug's patent protection eventually expires. That's why revenue ebbs and flows for most of the names in the business.

But when you're a drug company as big and deep-pocketed Merck (MRK -0.11%) is -- and boast a drug portfolio as robust as Merck's -- these challenges actually work in your favor. You can afford to buy or develop whatever drug you need, and do so as often as is needed.

And it's done exactly that.

Merck's cancer-fighting drug Keytruda accounts for roughly one-third of all its sales. It didn't develop Keytruda from the ground up, however. The company actually acquired the oncology therapy back in 2009 via the acquisition of Schering-Plough, before anybody could fully appreciate the blockbuster it would become.

In the same way, the market may be underestimating last year's acquisition of Acceleron Pharma, which brings a cardiovascular drug called sotatercept into the mix. Although sales forecasts for the treatment are varied, the company and a handful of analysts peg its potential annual sales somewhere in the ballpark of $2 billion to $2.5 billion.

Sotatercept and Keytruda aren't the point, however. The point is, the blended approach of in-house research and development and the acquisition of intellectual property developed by other pharmaceutical outfits works, but can only be done consistently well by a player like Merck. Not every year will be a winner, but most years will be great ones as long as the world needs prescription pharmaceuticals.

3. Taiwan Semiconductor Manufacturing

Finally, add Taiwan Semiconductor Manufacturing (TSM -4.86%), better known as TSMC, to your list of long-term stocks you can buy today.

It's been a particularly tough year for TSMC shareholders. The stock price's down more than 50% from January's high, dragged lower by the semiconductor shortage that's upending every facet of the industry.

Except, the company didn't exactly deserve to be lumped in with other chipmakers struggling to find materials and components. Taiwan Semiconductor Manufacturing is one of the few names in the business positioned to actually help combat the supply crunch. See, it's a contracted manufacturer of other organizations' silicon, manufacturing chips for companies like Apple, Qualcomm, and Advanced Micro Devices. That's why analysts expect this year's top line to be up more than 30%.

Investors keeping their finger on the pulse of the chip market's current turbulence likely know these underpinnings are shifting. Not only is broad economic weakness starting to crimp demand for semiconductors, but several key players in the business are increasingly taking production matters into their own hands. For instance, Qualcomm is tightening its relationship with chipmaker GlobalFoundries, while Nvidia's CEO has floated the idea of teaming up with rival Intel to manufacture some of its silicon. Intel in the meantime is adding to its existing production capacity with plans for a $20 billion facility in Ohio.

But none of these efforts will negate the need for third-party manufacturing of semiconductors -- the business just moves too fast for chip designers like Qualcomm and AMD to handle all production on their own. Indeed, if anything the world's going to need more third-party chip production five and 10 years down the road, as tech continues to become more central to people's everyday lives. Research outfit McKinsey suggests the semiconductor market is going to grow from $600 billion per year as of 2021 to $1 trillion by 2030, in fact, boding very well for Taiwan Semiconductor's long-term investors.