Investing in 2022 hasn't been a fun ride. The S&P 500 sits in a bear market, and many high-flying growth stocks from recent years have declined significantly over the past year.

While most stocks are down on the year, there are pockets of the market where you can find excellent companies holding up quite well. These companies thrive despite inflationary economic pressures and have proven themselves cash-producing machines. Not only that, but these companies are in an excellent position to continue delivering stellar returns for investors.

Globe Life (GL 1.30%), Progressive (PGR 1.52%), and Kinsale Capital (KNSL 1.36%) are three stocks that have delivered positive returns regardless of weakness in the broader market. Here's why they are good buys today.

1. This Buffett stock has bounced back from the pandemic and is capitalizing on higher interest rates

Globe Life sells insurance policies that include life, supplemental health insurance like cancer and intensive care coverage, and supplemental Medicare insurance. So far this year, Globe Life stock has held up well, delivering investors a 21% return compared to the S&P 500's 22% decline.

Globe Life faced some difficulties amid the pandemic as claims rose because of higher mortalities related to COVID-19. The insurer's premiums grew 5% in the third quarter from the prior year. However, its claims experience has improved this year as COVID-related deaths have fallen, and the underwriting margin on its life insurance business improved, increasing 28% from last year thanks to fewer claims on policies. 

The stock is one of Warren Buffett's longest-held stocks, which he added to Berkshire Hathaway's portfolio for the first time in 2001. One big reason Buffett loves insurers is because of the cash flows they generate.

Insurance companies operate in a way that looks backward compared to most other industries. That's because they collect their payment up front in the form of insurance premiums and don't have to provide their service until a customer makes a claim. As a result, they sit on a pile of cash known as float that can be put into short-term investments to juice returns. When a policy ends, the insurer keeps whatever cash is left over and is free to invest it however it sees fit.

Globe Life stands to benefit from rising interest rates. That's because the insurer can put its cash to work in safer investments that will deliver higher yields than they've seen in years. The company has been reshaping its investment portfolio, selling $324 million of fixed-maturity investments with a riskier BBB credit rating. In the third quarter, it put $431 million into investment-grade securities with an average rating of A+ -- specifically seeking companies that can survive multiple economic cycles. 

The average yield on its new investments is 5.56%, above its portfolio yield of 5.17%. The company saw the average yield on its portfolio go up for the first time since 2008, and it expects to have invested $1.4 billion at these higher rates by the end of the year. 

Globe Life is benefiting from tailwinds from declining COVID-related life insurance claims and is taking advantage of higher interest rates -- which should bode well for the company regardless of what the market is doing.

2. This popular auto insurer has delivered market-beating returns for decades

Progressive writes policies covering automotive and homeowners insurance and is one of the best in the game. The company was on the cutting edge of the industry when it first rolled out its telematics program -- known as Progressive SnapShot -- that would allow it to price auto insurance based on driver behavior.

One way to measure how well an insurer is at writing profitable policies is the combined ratio. This ratio measures the expenses plus claims costs, divided by the total premiums taken in. A ratio under 100% means its policies are profitable, and the lower the percentage, the better. Since 2002, Progressive's combined ratio of 91.4% has crushed the industry average of 100%. At that same time, the stock's 1,880% return has absolutely blown past the S&P 500's return of 387%.

A chart shows Progressive's combined ratio from 2002 to 2021.

Data source: Progressive 10-K filings and National Association of Insurance Commissioners. Chart by author.

Progressive has held up well this year despite inflation. Through the first three-quarters of the year, the insurer has increased its earned premiums by 11%. Progressive has done a stellar job of writing policies for years, and its performance this year is another positive sign for investors that the insurer can continue to outperform, no matter what the market throws at it.

3. The specialty insurer has achieved impressive growth since going public in 2016

Kinsale Capital writes policies that traditional insurance companies won't cover. These policies, known as excess & surplus (E&S), tend to be higher risk than many insurers are willing to take on and are left to companies with expertise on these particular areas.

Kinsale focuses on providing liability insurance covering small businesses, construction companies, and other professional services. The company has done a stellar job writing these policies since going public in 2016. Over six years, Kinsale's combined ratio averaged 82% -- crushing the industry average of 99% during the same period. This skill in underwriting has rewarded investors handsomely, with a return of 1,620% since it went public in 2016.

The company's impressive growth has continued this year, with its net written premiums through nine months growing 44% compared with last year. Kinsale has done an excellent job of balancing risks and rewards with its policies and should continue performing regardless of what the market does.