The recent pullback in oil prices leaves energy stocks trading at attractive valuations, making now a good time to buy Chevron , HSBC said Wednesday. Analyst Gordon Gray upgraded shares of the energy company to buy from hold, saying in a note to clients that Chevron is trading at one of the most attractive levels in the space. “Chevron’s stock has been one of the worst performers in the group in the past month, reversing some of its previous outperformance,” Gray said. “This has bought valuation back to levels which we think justify an upgrade.” Gray also cited the company’s buyback program among his reasons for liking the stock, noting that there’s a high chance that Chevron increases that guidance again. Meanwhile, the company’s high leverage to crude oil prices could make for strong cash flows. “Chevron is one of the most leveraged stocks in the sector to improvements in crude prices and its dividend is well supported, but we think positive news flow on share buybacks is now largely discounted in valuations,” Gray wrote. Shares of Chevron have surged more than 23% this year as the world grapples with an oil supply crunch and record-high gas prices amid the war in Ukraine. At the same time, the energy sector has risen more than 30%, although it has pulled back from its recent highs. Given the bank’s $167 price target, shares of Chevron could potentially rally another 15.5% from Tuesday’s close. — CNBC’s Michael Bloom contributed reporting