UnitedHealth, the industry bellwether, has reduced its exposure to what was its biggest problem in Obamacare: money-losing insurance that it sold in public exchanges to individuals, who often received government subsidies.

Last April, it announced that in the face of mounting losses from individual policies sold in public exchanges under Obamacare, it would radically cut its participation in those markets. It disclosed in its annual report in January that in 2017 the company “will participate in individual public exchanges in three states, a reduction from 34 states in 2016.” It also said that it would shed more than $4 billion in revenue from them, in an effort to cut its losses.

With those kinds of problems, you might think that the stock market has looked with disfavor at UnitedHealth and its competitors, and that investors have been counting on Congress to repeal Obamacare and replace it within something more palatable for the insurers.

But that assumption, which I made before looking at the performance of the companies’ shares, couldn’t be further from the truth.

UnitedHealth has bolstered its position, first by abandoning those profit-sapping exchanges wholesale. That move may have troubled the stock market, because it may seem to suggest that the company was giving up on what had been an important growth opportunity.

But a second maneuver, an accounting one, helped its standing in financial markets immensely, said Sheryl Skolnick, director of United States equity research for Mizuho Securities. In November 2015, UnitedHealth made an adjustment on its balance sheet, setting aside an initial “premium deficiency reserve” of $200 million for expected losses in those marketplaces.

Those losses have cumulatively swelled to more than $1 billion, Ms. Skolnick said, but because they have been segregated in the company’s accounting, and because the company has been leaving those markets, investors have been able to easily assess the company’s value “entirely separately from the problems it’s had with the exchanges,” she said. Other managed care companies have made similar provisions.