It's been a good year for investors. Since the start of 2023, the S&P 500 index has gained 14% while the tech-heavy Nasdaq Composite jumped 29% higher. The gains have many investors optimistic that the start of a new bull market is at hand.

Despite this, investors still have a reason for caution. Interest rates are at their highest level in nearly two decades, and how these rates could affect the economy over the next year is still unknown. Bank lending and commercial real estate are two segments of the economy that are certain to feel the impact of the Federal Reserve's aggressive interest rate hiking campaign. 

There are potential risks to the stock market right now. However, as long-term investors, we can't predict when (or if) a market downturn will occur. What you can do is own stocks in high-quality businesses that can weather downturns and thrive during economic expansions. Three resilient businesses to consider adding to your diversified portfolio today are Progressive (PGR -0.97%), Berkshire Hathaway (BRK.A -0.76%) (BRK.B -0.69%), and Costco (COST 1.01%).

1. Progressive

Insurance companies are excellent at generating cash flows, and their stocks can make for robust investments in your portfolio. Insurers benefit during periods of economic growth because companies and consumers always need to insure their property, autos, inventory, and other assets. Not only that, but insurers can be good hedges against economic inflation because of their ability to raise premiums.

Progressive is one of the best auto insurers in the game. The company was an early adopter of using driver data, known as telematics, to price its insurance policies. Telematics data includes driving speed, sudden braking or rapid acceleration, and mileage driven. In 2004, Progressive rolled out its telematic product for the first time and made it widely available in 2010 through its Progressive SnapShot product. 

A happy family is sitting in a car together.

Image source: Getty Images.

Progressive has displayed excellent underwriting discipline with its auto insurance policies, which has led to industry-beating profit margins. For insurers, the combined ratio is a metric that measures the claims and expenses of a company divided by the total premiums taken in. A ratio of 100% means a company is breaking even on its policies; the lower the ratio, the better. Over the last 20 years, Progressive's combined ratio of 91.6% crushed the industry average of 100%. 

Progressive has struggled more recently. In the first half of this year its combined ratio was 99.7%. However, this isn't unique to Progressive. In the year's first half, harsh conditions affected the entire industry. Insurers have dealt with higher claims costs due to the increased frequency of weather-related events and higher costs to resolve claims due to increased auto repair and replacement costs.

With this in mind, Progressive has held up much better than its peers. According to data from S&P Global, the average combined ratio for property and casualty insurers in the first quarter was 102.2%. Progressive's most recent July data shows its combined ratio came down to 90.6% -- a positive sign that pressures could be easing. 

Progressive is one of the best in the game at writing insurance policies, and its stable business and solid profit margins are why this resilient stock deserves a spot in your portfolio.

2. Berkshire Hathaway

Berkshire Hathaway has delivered phenomenal returns of 20% compounded annually since Warren Buffett became chief executive officer in 1965. Between Buffett and Vice Chairman Charlie Munger, Berkshire has displayed an excellent ability to pick stocks and hold on to its best performers for decades. However, its investment portfolio is just one component of a complete business with a cash balance that keeps growing yearly.

Berkshire Hathaway owns several insurance companies, including GEICO, General Re, Berkshire Hathaway Reinsurance, and Alleghany, to name a few. Buffet likes that insurance will always be in demand, which is why these businesses can be an excellent source of cash flow. He also likes that these cash flows, also known as float, can be put to work in investments, from short-term Treasuries to long-term stock holdings.

Since Berkshire acquired National Indemnity in 1967, its float has grown from $19 million to $164 billion in 2022 -- an annual growth rate of 18%. This float is one reason Berkshire has a huge pile of cash in reserve that it can put to work during economic downturns. At the end of the second quarter, Berkshire had $150 billion in cash on hand, ready to deploy when the time is right. 

Berkshire Hathaway is a money-making machine. The company has an excellent history of investing, and has vast amounts of cash ready to make acquisitions when other investors run for the exits -- making Berkshire another resilient stock you'll be glad you own.

3. Costco

Costco is another business that has proven resilient during recessions and inflationary periods. One key to Costco's success is its membership-based model. The company charges an annual fee for members, which is a steady source of income. The yearly fee encourages customer loyalty, too, as customers are more likely to be repeat visitors to the bulk retailer and take advantage of the benefits that come with it.

Ultimately, Costco's resilience comes from its business model. The company offers bulk goods at affordable prices, and can be a go-to for customers during economic downturns. In the event of a recession or inflation, Costco can be the retailer of choice for many individuals looking to tighten their belts and save money where possible. From 2020 to 2022, which included the pandemic-induced recession and inflation at its highest level in 40 years, Costco saw its revenue and net income grow by 46% and 56%, respectively. 

Costco has a loyal customer base and a resilient business model, making it another solid investment for your portfolio that can perform well across economic cycles.