Shares of health insurers charged higher Wednesday, as Bernie Sanders’ victory in the New Hampshire primary was seen as increasing the odds that President Trump will be re-elected, which Wall Street views as a positive for insurers, as well as the broader stock market.

Sanders has proposed Medicare for All, which would in effect replace the coverage currently provided by private insurance companies and supplemented by the government, through Medicare and Medicaid, with a single-payer, national health insurance program with no networks, premiums, deductibles and no copays. Read more about the New Hampshire primary.

Basically, Medicare for All would be bad for health insurers.

But as MarketWatch’s Victor Reklaitis wrote Tuesday, Sanders’ New Hampshire victory is like a double negative, as while it might appear as a negative for insurers, Wall Street seems to believe Sanders would lose to Trump in a general election, which would be a positive for insurers.

Don’t miss: New Hampshire primary: Stocks face a ‘win-win-win’ as Sanders leads in polls, analysts say.

“A Sanders nomination/contested convention increases the likelihood of a Trump victory and potentially even an all-Republican government, also a positive for stocks,” analysts at Raymond James wrote in a recent note to clients.

UnitedHealth Group Inc.’s stock UNH, +0.99% shot up 4.4% to a record close of $303.48, enough to pace the Dow Jones Industrial Average’s DJIA, -0.87% gainers. The stock’s price gain of $12.69 added about 86 points to the Dow’s price, which rose 275 points.

The stock has now gained 19.7% over the past three months, while the SPDR Health Care Select Sector exchange-traded fund XLV, -0.15% has advanced 9.4% and the Dow has tacked on 6.4%.

Elsewhere, shares of Anthem Inc. ANTM, +0.45% advanced 5.8%, Humana Inc. HUM, +1.29% hiked up 4.7%, Centene Corp. CNC, +1.17% climbed 4.4% and Cigna Corp. CI, -0.63% surged 3.4%.