Shares of energy companies fell after a volatile week for energy prices.

Natural-gas futures ticked up Friday, but finished the week with a loss of close to 10%.

Oil futures rose slightly to just over $41 a barrel, bringing gains for the week to more than $3 a barrel, amid OPEC vows to comply with production cuts as long as the coronavirus affects demand.

The number of rigs drilling for oil in the U.S. fell by one in the past week to 179, as activity on shale oilfields continues to languish, according to oil-field services company Baker Hughes.

Write to Rob Curran at rob.curran@dowjones.com