What happened

Shares of ExxonMobil (XOM -0.05%) rallied as much as 5% on Wednesday. The oil giant unveiled its preliminary third-quarter results, which helped drive up shares. In addition, OPEC agreed to a deeper-than-expected production cut, pushing up crude prices. 

So what

Exxon provided investors with an initial look at its upcoming third-quarter report. The oil giant said it could earn $11 billion in the period before any asset impairments. While that's down from $17.9 billion in the second quarter, it's well above the $6.8 billion Exxon earned in the year-ago period. 

Oil prices cooled off in the period, falling from an average of $109 a barrel in the third quarter to $98 in the second. That, along with other issues, will cut Exxon's earnings from liquids and refining. However, the company partially offset that with a boost from higher natural gas prices. 

Meanwhile, oil prices rebounded to their highest level in three weeks today. Brent, the global oil benchmark price, rallied 1.7% to close at $93.37 per barrel after OPEC agreed to slash its output by 2 million barrels a day. In addition, oil inventory levels declined for a second straight week, according to a government report. These catalysts could push crude prices higher in the future, enabling Exxon to potentially keep producing strong profits. 

Now what

Exxon expects to post strong results in the third quarter as it benefits from its integrated oil and gas operations. Meanwhile, oil prices could rebound following OPEC's move to reduce its output. Those catalysts could give Exxon's stock the fuel to keep rallying, making it a potentially attractive way to gain upside exposure to the oil market.