If oil prices recover, these stocks may become attractive

Recent announcements by Russia and Saudi Arabia have helped oil prices to recover and several analysts have highlighted the energy sector as a potential play for investors.

The price for the commodity has been as volatile as ever, but there has seen some strong gains. A barrel of Brent crude is up about 2 percent so far this week.

Oil prices have struggled in recent years due to a global oversupply, but OPEC and non-OPEC producers have reduced their output in hopes of rebalancing the market, agreeing to cut production by 1.8 million barrels per day.

While increased U.S. oil and shale gas production have undermined the output cut, it at least seems to have helped stabilize the price of oil. The price for Brent crude has averaged $54 per barrel, according to UBS strategist Geoff Dennis.

The output cut was only meant to last six months, but major oil producers Russia and Saudi Arabia announced earlier in the week that the supply cut should be extended for another nine months, into March 2018. Members of OPEC will meet next week to discuss extending the supply cut.

Oil prices jumped about 2 percent on Monday following the announcement.

This was further supported by the International Energy Agency's latest monthly report published Tuesday, stating that the oil market has essentially reached a balance, which will accelerate in the near term.

However, the IEA report warned more needs to be done to bring stockpiles down towards the five-year average.

"If, as a scenario and not a forecast, the current (OPEC) output cuts were to be extended for the rest of 2017, oil stocks would start to fall quite sharply… but because they are falling from such a great height, they won't get down to the five-year average until much later in the year and possibly not then," Neil Atkinson, head of the oil industry and markets division at the IEA, told CNBC on Tuesday.

If OPEC succeeds in rebalancing the market and oil prices start to recover, this would present a significant upside risk for stocks in the oil & gas and energy sectors.

Tim Hayes, investment strategist at Ned Davis Research Group, suggested investors should put their money into commodity and energy stocks.

"It does look like commodities, energy, are finally bottoming. This has been the one area that has been divergent in what has essentially been a rolling correction since the beginning of the year," Hayes told CNBC's Squawk Box on Wednesday.

"We saw tech bottom first and then we saw the defensives bottom in March. Financials bottomed in April and materials and energy are the last ones that have come down and now I would say they are trying to form a bottom."

Hayes says that the resource area is looking attractive, in terms of being oversold and better valued.

Another reason to consider energy stocks is they have been one of the worst-performing this year, at least in emerging markets according to UBS strategist Geoff Dennis.

In a research note published Tuesday, he suggested using this recent underperformance to become overweight in the sector, based on rising oil prices, strong earning per share growth and cheap valuations.

"After being the best-performing EM sector in 2016 (up 32.5 percent versus up 8.5 percent for MSCI GEMs), Energy has fallen right to the bottom of the EM sector performance rankings this year, with a gain of only 4.9 percent, while MSCI GEMs is up 16.2 percent," Dennis said.

"We would not lose faith in the EM Energy sector. We stay overweight and advise investors to selectively re-build positions in the sector."

Dennis also named Petrobras and Thailand's PTT E&P as stocks which were particularly attractive for playing the energy sector, as they were highly sensitive to changes in the price of oil.