In the wake of the OPEC agreement that stunned the market on Wednesday, oil prices already have surpassed the $50 mark. Traders viewed the deal as a serious effort by OPEC to rebalance the oversupplied oil market and there are opportunities for investors, especially in the S&P 500 energy sector, Jefferies said.

"The OPEC announcement is a significant swing factor for inflation expectations and S&P 500 earnings assumptions," wrote Jefferies chief global equity strategist, Sean Darby, in a note on Thursday.

OPEC agreed on Wednesday to cut production by 1.2 million barrels a day, capping production at 32.5 million barrels a day, effective Jan. 1, 2017. This is the first limit on output in eight years as the cartel looks to rebalance the market and boost prices.

Jefferies' Darby said the energy sector provides the bulk of change in forecast earnings over the next year and "hence has some of the most positive earnings momentum."

Furthermore, the move in oil prices comes as President-elect Donald Trump prepares to take office and looks to enact his policies and fiscal stimulus plan, which Darby noted has altered inflation expectations in the U.S.

"We would not want to be short 'inflation' areas of the equity market in 2017," Darby wrote. "Pricing power trumps volume and investors should be aligned to sectors that have a high correlation to break-even inflation rates."

Analysts also believe that U.S. producers will be the winners of this OPEC deal. Darby and his team noted that U.S. energy companies have high operational and financial leverage, which means that "companies stand to benefit from a significant change both in profits and solvency (credit) scores."

Analysts at Bank of America Merrill Lynch echoed that sentiment, as they see an immediate positive impact on the outlook for U.S. onshore drilling and completion activity should oil prices move above $50 a barrel.

"We would expect completion activity to ramp up first as operators move to complete drilled but uncompleted wells as a quick way to boost production and generate cash flow in the face of rising oil prices," the analyst team at Bank of America Merrill Lynch wrote in a note Wednesday.

Bank of America Merrill Lynch raised their price targets on Schlumberger (SLB) , Halliburton (HAL) , Helmerich & Payne (HP) and Nabors Industries (NBR) . Jefferies, meanwhile, has buy ratings on Chevron (CVX) , Schlumberger, Halliburton, Anadarko Petroleum (APC) , Pioneer Natural Resources (PXD) , Valero Energy (VLO) , Devon Energy (DVN) , Marathon Petroleum (MPC) , Williams Cos. (WMB) , Noble Energy (NBL) , Marathon Oil (MRO) , Tesoro (TSO) and Range Resources (RRC) .

Schlumberger is a holding in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells SLB? Learn more now.

Even though these opportunities are the result of an OPEC deal, it is contingent on the cartel following through with their promised cuts.

"OPEC's adherence to the agreement will be critical, and although its track record is poor, for the time begin oil prices have received a huge support," Darby said.

Real Money contributor and President of MercBloc, Daniel Dicker, said hr believes the oil rally will sustain itself into the end of the year.

"I expect to end 2016 between $52 to $58 a barrel, with opportunistic buying to appear below $48 a barrel instead of below $42, before this agreement," Dicker wrote Thursday. He recommends Noble Energy and Cimarex (XEC) .

Global benchmark Brent crude for February was gaining by 4.6% to $54.22 a barrel midday Thursday, marking the highest level in more than a year. Meanwhile, West Texas Intermediate crude was up 4.1%, trading at around $51.47. WTI surged by as much as 9% on Wednesday following confirmation of the OPEC deal.

Employees of TheStreet are restricted from trading individual securities.

Action Alerts PLUS, which Cramer co-manages as a charitable trust, is longSLB stock.

If you liked this article you might like

These Are the Hottest Stories on Wall Street Tuesday

These Are the Hottest Stories on Wall Street Tuesday

How I'm Playing Infrastructure, Oil and Defense Stocks Right Now

How I'm Playing Infrastructure, Oil and Defense Stocks Right Now

Oil Giant Schlumberger's Stock Chart Looks Sloppy

Oil Giant Schlumberger's Stock Chart Looks Sloppy

What's Behind the Hound of Hades' Stock Market Rampage

What's Behind the Hound of Hades' Stock Market Rampage

Looks Like the Correction in Schlumberger Is Over - Stay Long

Looks Like the Correction in Schlumberger Is Over - Stay Long