It was one of the darkest periods of the oil market slump. The global economy was showing fresh signs of slowing, and crude prices were collapsing so steeply that virtually every well in America was unprofitable.

But when Diamondback Energy went out to raise $226 million worth of new stock that week in the middle of January, the oil and gas company found more buyers than it could accommodate. It had to nearly double the amount of shares it sold, to four million.

Since Diamondback issued equity that day, the company’s share price has increased more than 29 percent.

Across the oil industry, investors have been placing their bets that prices have hit bottom. Risk-seeking investors like hedge funds and private equity firms, which were already lending money to struggling energy companies at high interest rates and onerous terms, are among those to have smelled opportunity in a potential comeback.