On Monday morning, prices of West Texas Intermediate (WTI) crude oil were up over 10% as the market rallied behind news of a coronavirus vaccine candidate and a Biden presidency.

Higher oil prices tend to benefit oil and gas stocks, but there's plenty of companies that would struggle at even higher oil prices. Here's what to avoid and what to buy on the news.

An up-trending arrow suspended over oil pumpjacks.

Image source: Getty Images.

What not to buy

The energy sector was by far the best performing sector on Monday, surging 14%.

XLE Chart

XLE data by YCharts

Drilling down more specifically, it was the oilfield services companies, the drilling contractors, and the independent upstream producers that posted the most gains. Shares of oilfield services companies like Schlumberger, drillers like Patterson-UTI, and debt-ridden oil producer Occidental Petroleum, were all up over 20% while most of the oil majors were up around 10%.

Generally speaking, the riskier the security, the more it surged. Many of the riskier companies are down for good reason, most of which have way too much debt on their balance sheets. Some oil stocks could even go bankrupt in 2020. Although higher oil prices are good for these companies, $40 oil doesn't magically solve their problems. Oil prices need to be higher and stay consistently higher for the riskier oil stocks to garner investment consideration.

The safe play

A good candidate to buy on oil optimism is Chevron (CVX 0.57%). Unlike independent firms, Chevron has a diversified business across the integrated oil and gas value chain. Although Chevron's performance is down substantially from 2019, the company had a good third quarter, narrowing its losses and rebounding from a terrible second quarter. 

CVX Net Income (Quarterly) Chart

CVX Net Income (Quarterly) data by YCharts

Chevron's two best qualities are its peer-leading balance sheet and its dividend, which combined, make it an incredibly cheap energy stock worth buying now.

Chevron has less debt and is less leveraged than its peers, allowing it to keep a healthy balance sheet during a time when few others can do the same. The balance sheet and historically strong free cash flow (FCF) support its dividend, which yields 7.2%. Chevron is also a Dividend Aristocrat, having raised its dividend for 32 consecutive years.

Chevron is a relatively conservative way to invest in rising oil prices. The company benefits from the upside of higher oil prices, while also acting as a safer investment if prices languish. Its strong dividend provides investors with income no matter what the stock price is doing.

The riskier play

Shares of one of America's largest refining and marketing companies, Phillips 66 (PSX 1.14%), popped 22% on Monday. Along with still being down 49% for the year, there are plenty of reasons why Phillips 66 is a buy.

Although cheap oil results in lower input costs for refiners, decreased demand for fuels like diesel, gasoline, and jet fuel -- as well as lower demand for petrochemicals -- have crushed Phillips 66's earnings. Its refining segment has lost billions this year, and the overall business barely turned a profit in the first nine months of 2020. 

With the company's refining margins per barrel down 80% from the 2019 average, Phillips 66 would do well to see a spike in demand for its products. It has ample room to increase refinery output if oil prices continue to rise. In the third quarter, Phillips 66 had a crude oil utilization rate of just 77% compared to a 2019 average of 94%, meaning it's generating less output relative to its total potential output. 

While higher oil prices would likely benefit Phillips 66's business, it also has the operating cash flow and reserve cash on its balance sheet to weather a prolonged downturn. The company has reaffirmed its dedication to paying the dividend, which yields a sizable 7.7% at the time of this writing. 

Upside exposure without all the risk

It may be tempting to pounce on shares of risky oil stocks, but Chevron and Phillips 66 offer a better way to expose yourself to the upside while protecting against the downside. Both are dividend stocks that offer predictable returns in good and bad markets. Instead of relying on higher oil prices to save a company, it's better to invest in oil stocks that can succeed in case prices languish for a while.