Despite it falling in recent months, we're still not out of the woods regarding inflation. The Consumer Price Index (CPI), a measure of the cost of consumer goods, saw its annual change peak in June of last year at 9.1%. The most recent reading from December shows inflation up 6.5% year over year, which is still well above the Federal Reserve's 2% inflation target.

Investors are optimistic that inflation will continue falling in the coming months. This would be a positive development for the economy and stock market, because it means the Federal Reserve won't have to keep raising its interest rates as aggressively to bring it down. However, not all investors think inflation will go away so quickly.

A person holding groceries in a mall and looking at a receipt.

Image source: Getty Images.

Howard Marks, co-founder and co-chairman of Oaktree Capital Management, recently spoke to The Motley Fool's director of small-cap research, Bill Mann, about his outlook on the economy. Marks talked about a "sea change" for investors, where an era of low interest rates and stimulative policy is over.

He noted that while inflation is falling, a tight labor market, rising wages, strong economic growth, and a reversal of globalization could keep it higher than what we've grown accustomed to in the last 40 years. While we don't know for sure if inflation will stick around, it would be prudent for investors to buy quality companies that can perform well in all environments, including an inflationary one.

Three inflation-resistant stocks you can buy today include Dollar General (DG -0.36%), Costco (COST -0.12%), and Progressive (PGR -1.00%).

More people turn to dollar stores to help stretch their budgets

The first inflation-resistant stock on the list is Dollar General. When consumers feel the pinch of inflation, they seek cheaper alternatives, and dollar stores are one popular place to go.

According to Coresight Research's U.S. Consumer Tracker, more than one in five shoppers have turned to dollar stores to stretch their money further. Data from Placer.ai shows that foot traffic in dollar stores for January was up 19.1% compared to January 2020, before the pandemic. 

Dollar General has a massive footprint with more than 18,000 stores across the U.S. It has locations all over rural America, and last year it put up solid growth as inflation ran hot. In its third quarter ending Oct. 28, 2022, the company's net sales grew 11.1% while same-store sales grew 6.8%. Driving this growth was the above-average transaction value (driven by inflation) and increased foot traffic. 

Chart showing Dollar General's number of stores higher than several other retailers in 2021.

Data source: Statista. Chart by author.

The company also expanded its frozen and fresh food offerings to better compete with grocery stores and big retailers like Walmart. If you're looking for a company that can shield your portfolio from inflation, Dollar General is an excellent option.

Low-cost leaders can thrive amid rising prices

The next inflation-resistant stock to buy right now is Costco. Costco operates a membership-only warehouse that provides customers with bulk products and big cost savings. The company is in a similar position to Dollar General, because when people look to tighten their belts, they turn to discount retailers for savings.

The company negotiates with vendors to get the best prices possible. It has more than 845 warehouses globally and is the third largest retailer in the world. Its scale and paper-thin margins make it one of the top low-cost providers today. In its most recent quarterly earnings (ending Nov. 20, 2022), it saw sales grow 8%, while same-store sales increased 6.6% and foot traffic grew 3.9%. 

Another appealing aspect of the business is that when customers become members, they tend to stay members for a while. In the quarter, 90% of its customers renewed their membership, providing a steady stream of customers and revenue.

Insurers can pass costs on to customers, and this one is the best in the game

The final inflation-resistant stock you can buy today is Progressive. Progressive writes insurance policies, mainly focusing on individual automotive insurance.

Insurance is always in demand because individuals                   and businesses need it, either for legal purposes or just for peace of mind. Because of this steady demand, insurers have a lot of pricing power, allowing them to pass on most costs to customers. This makes them especially attractive investments when inflation is high like it has been. Over the past year, Progressive stock gained 35% while the S&P 500 index fell 12%.

What makes Progressive stand out is that it's one of the best, if not the best, in the industry at writing profitable policies. One important metric in the insurance industry is the combined ratio. This ratio tells you how profitable an insurer's policies are. It's the ratio of claims costs plus operating expenses divided by total premiums collected. The key to success is keeping this ratio below 100% -- the lower, the better.

Over the last 21 years, Progressive's combined ratio has averaged 91.6% -- crushing the industry average of 99.9% during that same period. 

Chart showing Progressive's combined ratio beating the industry over the last 21 years.

Data sources: Progressive and National Association of Insurance Commissioners. Industry data for 2022 is through Sept. 30. Chart by author.

Progressive has a long history of writing profitable policies, and its pricing power makes this another stellar inflation-resistant stock to buy right now.