Outsized inflation and rapidly rising interest rates have kept investors' nerves on edge this year, with the market down and many concerned about an even bigger crash in stock prices. One excellent way to hedge against any potential market crash is to own high-quality, blue-chip stocks that keep delivering no matter what the market does.

Costco Wholesale (COST 0.34%) and Progressive (PGR 1.07%) are two companies that fit this description. When economic times get tough, these companies continue to see demand for their products. Here's why these two stellar companies are a good way to hedge against any market crash that might come along.

1. Costco: Doing well as consumers watch their wallets

During tough economic times, consumers tend to turn to cheaper alternatives as they keep a close eye on their spending and cut costs anywhere they can. Costco operates a membership-only warehouse, providing customers with cost savings via its bulk goods offerings. Because of this, Costco can do well in a weakening macro environment marred by persistent inflationary pressures.

This year, the Consumer Price Index (CPI), a common measure of inflation that represents the cost of goods and services, has shown a year-over-year increase in consumer goods exceeding 7% every month since April. Inflation has put pressure on consumers who see their cost of living increasing -- from housing to energy to food prices. Rising costs have consumers seeking out low-cost products, which has benefited Costco. In its most recent fiscal year (ending Aug. 28), Costco's revenue grew 16%, while its diluted earnings per share (EPS) grew 17%. 

Costco's massive scale gives it negotiating power with vendors to get to better prices. It also operates on paper-thin margins compared to competitors, giving the company a substantial advantage when customers seek out the lowest prices they can find.

If tough economic conditions continue, Costco should see sustained strong demand for memberships. Last year Costco's member renewal rate was 93% in the U.S., and its membership count increased by 6.5%. 

Costco does a great job of being a low-cost provider to consumers in any economic environment. It has a business model that helps it withstand a recession. That makes it a great addition to a diversified portfolio as a hedge against a potential market crash.

2. Progressive: An insurer that's insurance for your portfolio

Insurance is one product that never goes out of style. That's because there are forces in place that require consumers to hold insurance policies for their homes, cars, and businesses. Insurance is always in demand and is one of the last things consumers cut during recessions.

Progressive writes auto and homeowners insurance policies and is one of the best in the game. The insurer was the first to use telematics, or technology that prices insurance policies based on driving behavior. This gave the insurer a strong competitive advantage leading to industry-beating profitability and stellar stock returns.

The insurer is an excellent hedge against multiple forces acting on the market now, including inflation and weakness in the stock market. Progressive can hedge against inflation because of its ability to adjust insurance premiums. As claims data comes in, Progressive sees changes in costs of repairs and used cars and can run those costs through its models and increase premiums to adapt. This ability to adapt makes the stock a strong performer this year, up 26%, while the S&P 500 is down 20%.

Progressive has outperformed for years across an array of economic conditions -- and is another excellent stock to include in your portfolio to hedge against a possible crash in the market.