Inflation. It's a period investors worry about because prices for goods and services rise, putting a dent in everyone's pocketbooks.

But savvy investors know that inflation is a normal part of the economic cycle and there's no way to stop it from occurring. However, there's a way to make sure that your investments can withstand any negative effects. Below, three Motley Fool contributors pinpoint investments that can help your portfolio thrive during (and even after) inflationary times.

Two young people looking at a computer with worried expressions on their faces.

Image source: Getty Images.

Start at the source

Chuck Saletta (Utilities Select Sector SPDR Fund): Inflation often starts with energy prices. When you think about that, it makes sense. After all, energy is usually an input cost into many other things, be it manufacturing, food, transportation, or even what goes on in our online universe. When energy costs go up, they can often force other prices up as those producers have to find ways to cover their increased costs.

In fact, energy is often such an important factor in driving inflation that the Bureau of Labor Statistics publishes two views of the measure: One with and one without energy (and food) costs included. That dual view is there to help people see whether higher energy prices have trickled through to the rest of the economy.

Energy's key role in often driving inflation makes the Utilities Select Sector SPDR Fund (XLU -0.59%) a powerful option to consider as an investment designed to fight back against inflation. Utilities tend to either be directly involved in energy production and transportation, or at least have their operations heavily influenced by energy prices.

Utilities also tend to be fairly heavily regulated natural monopoly type businesses. For most practical purposes, that usually means that when their input costs go up, they can either automatically raise their prices to offset or petition the relevant regulators for the ability to do so. That ability to raise prices in response to energy-cost pressures helps utility companies like those in the Utilities Select Sector SPDR Fund typically pass through inflation while still earning reasonable returns.

In a mature, advanced economy like the U.S., it's unlikely that utilities will be the fastest growth sector around. Still, the way they operate makes it likely that they'll be able to effectively hold up against inflation over time. If that's a key goal for your investments, then the Utilities Select Sector SPDR Fund may very well be worth considering.

The aisle at a big-box store.

Image source: Getty Images.

Put a top retail stock in your cart

Eric Volkman (Costco Wholesale): In inflationary times, consumers usually turn to retailers that consistently and reliably offer low prices. That's why my pick would be the stock of a retailer that competes very effectively on that basis and manages to make a healthy profit while doing so: Costco Wholesale (COST -1.64%).

What sets Costco apart from your neighborhood grocery or supermarket chain is that it functions effectively as a giant shopping club. Like any club, membership is required for admission, and the company makes a tidy sum on fees for this. Two membership tiers for individuals are available: The low-frills Gold Star ($60 per year), and Gold Star Executive ($120), which has a set of perks including an annual 2% reward on qualifying Costco purchases. In membership fees alone, Costco earned $901 million in its most recently reported quarter. 

That's small compared to the nearly $44.4 billion the company posted in net sales. Still, it's a very steady revenue stream. It also has the effect of cementing customer loyalty. If you spend $60 on a membership in anything, you'll be compelled to use it on at least an occasional basis.

Feeding this loyalty are 809 Costco warehouses spread throughout the world (as of the end of April), the vast majority of which (559) are based in the U.S. Those are big numbers. With the constant customer traffic -- even through the coronavirus pandemic -- that means a thick revenue stream. And $44 billion-plus in a quarter is considerable by any standard. 

With the padding of membership fees, Costco also has the space to sell its many wares at very thin margins. This helps lift the company well into the black on the bottom line consistently. In said quarter, Costco's attributable net income was $1.22 billion.

Better, annual free cash flow has ballooned, from $2.8 billion in 2018 to over $6 billion a mere two years later. This is more than enough to fund a dividend that's been raised once annually for years, although the yield is low (0.8%) due to the strong popularity of Costco stock. 

The company also pays one-off special dividends in particularly abundant years. The most recent one was dispensed in December and totaled a hefty $10 per share.

While Costco isn't the cheapest stock on a yield or valuation basis, compared to other retailers, the company is a solid performer with a robust business model. And if our economy comes under siege from inflation, budget shoppers are going to flock to their local Costco even more than they already do -- and the stock should rise commensurately.

Two people looking at a computer.

Image source: Getty Images.

The 500 best stocks for an inflation hedge

Barbara Eisner Bayer (Vanguard S&P 500 ETF): If you want your investments to thrive in spite of inflation, an excellent choice is investing in the S&P 500. The index is composed of the 500 largest companies in the U.S. and is representative of the U.S. stock market as a whole.

During the past 30 years, the inflation rate has ranged from a low of 0.1% (2008) to a high of 4.1% (2007). These have been relatively good times when compared to the 1970s, when inflation was as high as 13.3% (1979). But the Federal Reserve has a pretty good record of keeping inflation at bay in contemporary times.

During the same 30-year period, however, the S&P 500 has returned an average annual return of 10.7% growth per year. Even with the inflation high of 4.1% in 2007, an investment in stocks would well surpass that number.

Remember, though, that's an average annual return, so some years will be higher and others will be lower. That's why it's important to have a long-term perspective when investing in any stock, including an index. Over the long term, inflation will rise and fall, but stocks have only gone in one direction -- and that's up.

There are several S&P index funds to choose from. I prefer using an exchange-traded fund (ETF) because it can be bought and sold just like any other stock (although you don't want to trade it, as it should be a long-term holding). Two possible buys are the SPDR S&P 500 ETF (SPY -0.13%) and the Vanguard S&P 500 ETF (VOO -0.22%). While they're both excellent choices, the latter has a slightly lower expense ratio, so it will keep a little more money in your pocket over the long term.

Your assets don't have to be devastated by inflation. By opting into the choices above, you can sail through periods of high inflation knowing you'll be on solid gound when they're over.