Credit: The Associated Press

Traders on the floor of the New York Stock Exchange watch President Donald Trump's news conference, Wednesday, Nov. 7, 2018. Technology and health care stocks are leading indexes broadly higher on Wall Street as results of the midterm elections came in largely as investors had expected. (AP Photo/Richard Drew)

Credit: The Associated Press

Specialists on the floor of the New York Stock Exchange watch President Donald Trump's news conference Wednesday, Nov. 7, 2018. Technology and health care stocks are leading indexes broadly higher on Wall Street as results of the midterm elections came in largely as investors had expected. (AP Photo/Richard Drew)

Credit: The Associated Press

Traders work in a booth on the floor of the New York Stock Exchange, Wednesday, Nov. 7, 2018. Technology and health care stocks are leading indexes broadly higher on Wall Street as results of the midterm elections came in largely as investors had expected. (AP Photo/Richard Drew)

NEW YORK — The outcome of the midterm elections was good for the stock market in general, mostly because it didn't produce any big surprises, but it was especially good for the health care industry and several other companies.

Health insurers rose sharply Wednesday as investors anticipated that any prospects of repealing the Affordable Care Act, which expanded health insurance to millions of Americans, diminished greatly now that Democrats control the House of Representatives.

Marijuana companies soared after several states voted to partly legalize pot, oil and gas companies benefited from the defeat of a ballot measure in Colorado that might have restricted drilling, and a dialysis services company rocketed higher after California voters rejected a measure that would have capped the profits of dialysis clinics.

Here's a look at industries and companies that were affected in various ways by the outcome of the election.

HEALTH CARE: Health insurers, hospital operators and companies that run Medicaid health programs all jumped. Democrats' victory in the House means Republicans won't be able to pass legislation repealing the 2010 Affordable Care Act, a goal for the party ever since the law was passed during President Barack Obama's first term. The bill expanded health insurance coverage, and the election results mean more stability for insurers and more reimbursement for hospitals.

Voters in Idaho and Nebraska approved expansions of the federal-state Medicaid program, which provides benefits to poor and disabled people. Winning gubernatorial candidates in Maine and Kansas also support expanding Medicaid benefits to more people.

MARIJUANA STOCKS: Voters in Michigan passed a ballot measure to legalize marijuana while a similar measure in North Dakota was defeated. Missouri became the 31st state to approve marijuana for medical use, while Utah also voted on a medical marijuana proposition. A marijuana legalization measure in North Dakota was defeated.

The stocks built on their gains in the afternoon following the resignation of Attorney General Jeff Sessions. Marijuana remains illegal at the federal level and Sessions had promoted more aggressive enforcement of those laws. Tilray soared 30.6 percent to $139.60 and Canopy Growth climbed 8.2 percent to $46.07.

DIALYSIS DETAILS: Dialysis services company DaVita surged after California voters rejected a ballot measure that would have capped dialysis clinics' profits in an effort to improve patient care. Proposition 8 would have limited profits for dialysis clinics that provide vital treatment for people whose kidneys don't work properly. Dialysis companies contributed $111 million to oppose the bill, while proponents said it would stop companies from cutting corners to make more money and would force them to spend more of their money on caring for patients.

DaVita gained 9.9 percent to $76.08.

FRACKING FALLOUT: Oil drillers Anadarko Petroleum and Noble Energy rallied after Colorado voters rejected a measure that could have sharply reduced oil and gas drilling, including the method known as fracking, by requiring new oil and gas wells to be farther from occupied buildings than allowed under current law.

GROWTH: Big tech and retail companies made huge gains. The stocks aren't expected to benefit from any specific vote or change in policy, but with the elections over, investors were willing to take bigger risks and bet that the global economy will keep growing. Amazon jumped 6.9 percent to $1,755.49 and Microsoft climbed 3.9 percent to $111.96.

Safer, steadier stocks generally rose, but they didn't do as well as the rest of the market. Those stocks had surged in October as the rest of the market struggled, but on Wednesday, utility company AES fell 2.6 percent to $15.60. Shopping mall operator Simon Property Group rose 2 percent to $187.27, but consumer products maker Church & Dwight lost 2.6 percent to $66.11.