All six of the major health insurers topped Wall Street expectations in the second quarter as the industry distanced itself from turmoil in Washington.

Cigna Corp. was the final insurer in the Standard & Poor’s 500 Index to report on Friday. Its earnings came in higher than analysts anticipated and the company raised its profit outlook for the year.

For-profit health plans, among them UnitedHealth Group Inc., Aetna Inc. and Humana Inc., are benefiting from their decisions to largely retreat from the Affordable Care Act’s markets after posting losses. Their stocks have soared this year, even while the fate of the health law was in jeopardy in Washington. Although Republicans’ latest effort to repeal Obamacare failed in the Senate last month, President Donald Trump has threatened to let the health law collapse, and its future remains uncertain.

Centene Corp., the smallest of the S&P 500 health plans, is also the best performing of the six this year with a 47 percent jump as of Thursday’s close. Anthem Inc. is second with a 33 percent gain, followed by Cigna, up 32 percent. Meanwhile the S&P 500 rose 10 percent.

Four of the insurers, including Cigna, are also demonstrating that they can thrive on their own after two megamergers collapsed this year after being opposed by antitrust regulators and blocked by judges -- a tie-up between Anthem and Cigna, and an Aetna-Humana deal.

Cigna raised its 2017 earnings forecast to $9.75 to $10.05 a share, excluding some items, up from a June range of $9.35 to $9.85. Analysts anticipated $9.77. Earnings were $2.91 a share on that basis, topping the $2.48 average estimate.

Cigna has been a relatively small player in Obamacare from the start. The company focuses on selling coverage to employers, a business that’s been far less affected by the health law and the legislative debate. The insurer is pursuing growth in the private Medicare Advantage program for U.S. seniors, as well as in overseas benefits offerings.

Following the collapse of the $48 billion acquisition by Anthem, Cigna Chief Executive Officer David Cordani laid out his strategy to investors in late June. He said he’s targeting per-share earnings of $16 a share by 2021. Deals could help accelerate the expansion, the CEO told investors, adding he’s not counting on them.

This article was provided by Bloomberg News.