Aflac (AFL 0.71%) is holding up quite well in what has been a tough year for stocks. The insurer is up 20.8% this year, while the S&P 500 fell 16.6%.

This year was a positive one for many insurance companies that held up quite well in the face of inflation. Life insurers like Aflac saw fewer pandemic-related claims payouts and are positioned to take advantage of higher interest rates. Here's why Aflac is beating the 2022 bear market in stocks.

Pandemic headwinds are waning for life insurers

Aflac provides companies with employee benefits that go beyond traditional health insurance. The company covers millions across the U.S. and Japan through its life insurance and supplemental health insurance products. Some of its policies include dental and vision, cancer, and critical illness insurance, which pays benefits to those who have had life-altering events like a stroke or heart attack.

The COVID-19 pandemic has weighed on many life insurance companies, which saw sales drop while claims costs exploded. In 2020, Aflac's sales fell 31% in the U.S. and another 36% in Japan.

Net earned premiums through nine months are down nearly 13% compared to last year as the company feels pressure on its business, notably in Japan. The company pointed to economic conditions as a headwind this year, with economic growth slowing as central banks pump the breaks on the economy to tackle inflation. However, in the third quarter, its sales figures improved, with sales in its Aflac Japan segment up 10.2% from last year -- thanks to its new cancer insurance product launched in August. Sales in its Aflac U.S. segment grew 11.8%. 

The company is slowly recovering from pandemic-related claims, and its benefits and claims costs fell by 10% this year. In the third quarter, its Japan segment saw another surge in COVID-19 cases. This "seventh wave" increased claims to 46,000, primarily due to Japan's practice of "deemed hospitalization," which allows for payment of claims outside the care of a hospital. However, because hospitalization remains low and infections are less severe, the Japanese government is narrowing the scope of this definition -- which should lead to fewer claims submissions moving forward.

How Aflac benefits from higher interest rates

Life insurers make money in two ways: premium payments and investment returns from investing those premiums. These companies price their policies on several factors, and actuaries help them calculate the right premium based on an individual's mortality risk. Because there is a period between when the insurer collects the premium and when it pays out claims, life insurers can invest the funds in bonds or other investments to help boost their earnings.

Low interest rates make it difficult for life insurers, who make money on the spread between the amount earned on their investments and the amount of interest paid out on whole life insurance or annuities with a guaranteed rate of return. 

Aflac benefits from central banks raising their benchmark interest rates because it can put its cash to work in higher interest-earning assets. In the third quarter, Aflac purchased $1 billion in investments through its Aflac Japan segment, with the yield on new investments coming in at 5.73% -- well above its average return on invested assets of 2.87%. It also purchased $427 million of investments in its U.S. segment with a yield of 6.24%. 

A good defensive business to own in a slowing economy

Aflac is seeing its business recover slowly as we emerge from the pandemic. The company will continue to benefit from fewer pandemic-related claims, and Japan's latest relaxation should help reduce its claims payouts further.

It's also in a solid position financially, with over $114 billion in investments and cash on its balance sheet. It has put some of this cash to work for investors, buying back 30 million shares totaling $1.8 billion while returning another $800 million through dividends to investors. Aflac yields a solid dividend of 2.26% and recently raised its payout for the 40th consecutive year.

Aflac could face some headwinds from slowing economic conditions, but the nature of the business tends to be more defensive and stable through economic cycles -- which is why this stock is up while the rest of the market is down in 2022.