After a tumultuous year, the stocks of energy companies are rebounding as crude oil prices have risen amid geopolitical issues and the favorable outlook for supply and demand.

Positive signs have emerged lately.

The Energy Select Sector SPDR ETF (XLE)—the largest exchange-traded fund to track the energy sector—has been gaining steadily during the past year. In addition, analysts at Credit Suisse said energy stocks are now a good asset to add to a portfolio because of the strong earnings growth and better valuations compared to two years ago.

Credit Suisse also estimates that oil prices will remain rangebound as demand remains robust: “We forecast 2018-19 and long-term West Texas Intermediate (WTI) oil prices of $66/bbl, $65/bbl, and $60/bbl, respectively; we model a longer-term WTI-Brent differential of $5/bbl.”

“A combination of strong fundamentals and weaker stock prices makes the sector more attractive than it has been in several years,” Jonathan Golub, a Credit Suisse research analyst, wrote in a March report.

The energy sector was upgraded to market weight from underweight by Credit Suisse, which said the energy industry delivered “superior earnings growth since mid-2016 on rising oil prices and a robust economic backdrop.”

The sector had been rated underweight because of the “extremely stretched valuations and the belief that technological advancements will keep crude prices in check over the long-term,” he wrote.

The sector’s “multiples have come back down to earth on strong earnings and lagging relative performance,” but remain overvalued.

The earnings of energy companies are predicted to rise by 70% in 2018 compared to an increase of 122% the previous year. The analysts said to keep an eye out for E&Ps which have demonstrated the best growth among all the sub-sectors.

“Extended valuations had resulted in energy’s underperformance since mid-2016, despite a favorable cyclical backdrop, rising oil prices, and robust earnings growth,” Golub wrote.

Analysts from investment bank Morgan Stanley are even more bullish and rated energy as overweight, citing “better inventory data, seasonal and cyclical supply/demand imbalance, and rising geopolitical risk make us increasingly positive.”

The Federal Reserve Bank of New York reported on April 16 that lower supply and higher demand “led to an uptick in oil prices over the past week.” Prices were flat during the first quarter because of a stable supply coupled with declining demand.

While ExxonMobil Corp. (NYSE: XOM) reported missing earnings estimates for the first quarter along with generating flat underlying cash flow, the stock is an opportunity for long-term investors, said Ron McCoy, CEO of Freedom Capital Advisors in Winter Garden, Fla.

“With a 4% dividend and trading right off its 52-week low, we believe the stock represents value and opportunity,” he said. “In our LOWS strategy that we manage at Interactive Brokers Asset Management, we are short the July $70 puts and believe the stock looks attractive. It also would be a good candidate for a buy-write known as a covered call and conservative investors might look at selling at the money calls of $77.50 against their shares to enhance their return and reduce risk further.”

The majors such as ExxonMobil, Chevron Corp. (NYSE: CVX), BP Plc (NYSE: BP) and Royal Dutch Shell Plc (NYSE: RDS.A) are attractive stocks, said Patrick Morris, CEO of New York-based Hagin Investment Management.

ExxonMobil is a solidly managed company, well adapted to the current environment and is paying a healthy dividend, Morris added.

“I am not constructive on the Permian and shale plays particularly the companies constrained by the excess of natural gas in Texas,” he said. “I don’t think the economics on a field-wide basis support the costs right now.”

Instead, the integrated companies will be able to benefit more from shale acquisitions than the independents because they get the benefits of both the midstream and downstream margins. A company that can produce a barrel of shale oil, transport it, refine it and sell it through a captive distribution network will end up outperforming an independent producer, Morris said.

“Until and unless they figure out how to get rid of the high volumes of natural gas, the West Texas independents are going to struggle to raise production to offset the naturally high decline rates,” he said.

In a rising interest rate environment, energy stocks perform well and are the strongest performing stock market sector. When interest rates were rising from 1966 through 2016, the S&P 500 returned 5.8% annually while the energy sector returned 10.8%, said Robert Johnson, president of the American College of Financial Services in Bryn Mawr, Pa.

“If history is any guide, energy stock investors should be rewarded as rates rise,” he said. “Given robust economic growth expected and comments by Federal Reserve chair Jerome Powell, nearly everyone expects interest rates to rise—and perhaps, substantially, over the next year and further out in time.”

One stock to consider is oil refiner Phillips 66 (NYSE: PSX), a favorite energy stock of Warren Buffett, the chairman and CEO of Berkshire Hathaway.

“It sells at a trailing 12-month price to earnings ratio of 10.5 and has a healthy dividend yield of 2.7%, only slightly lower than the 10-year bond yield,” Powell said.

The P/E ratio is the current share price divided by annual earnings per share and a higher P/E ratio means a company and its stock are more valued. An investor who wants a low-cost diversified investment in the energy sector might consider the Vanguard Energy ETF (NYSE Arca: VDE), he said.