Energy stocks significantly underperformed broader markets in 2020. Not just small names, but leading oil and gas stocks also got crushed during the year. A steep fall in the demand for oil products due to the coronavirus pandemic disrupted oil prices as well as the performance of oil companies. With 2020 ending, what lies ahead for energy stocks? Let's discuss the factors at play which will decide the fate of energy companies in 2021.

Oil prices and stocks in 2020: a recap

Top integrated oil stocks, including Chevron (CVX 0.21%), ExxonMobil (XOM 0.19%), Royal Dutch Shell (RDS.A) (RDS.B), and BP (BP 1.20%), got pummeled in 2020. While BP fell more than 40%, Chevron is down more than 25% year to date. With its massive capital plans, ExxonMobil had a particularly rough year. Royal Dutch Shell's dividend cut, for the first time in 75 years, speaks volumes about how bad things were for energy companies. Energy sector stocks substantially underperformed the S&P 500 Index, which is up more than 14% year to date.

XLE Chart

XLE data by YCharts

Crude oil prices -- which hovered around an average of $57 per barrel in 2019 -- tumbled in March, even entering negative territory temporarily. West Texas Intermediate prices averaged around $39 per barrel in 2020.

Indeed, oil companies found it difficult to make profits at those price levels. As with any commodity, the demand-supply dynamics largely dictate the trends in oil prices.

Lower demand, curtailed production

In response to the throttled demand due to the pandemic, oil and gas producers curtailed their outputs. Weekly U.S. crude oil production fell to a low of 9.7 million barrels per day in August -- a level it hasn't seen since January 2018 -- before rising to 11.1 million bpd in December. The production is still notably lower than around 13.1 million bpd in March. On average, 2020 U.S. crude oil production was 6% lower than in 2019.

Globally, OPEC and its partner countries largely kept the agreement of a 7.7 million bpd collective cut in the output. A resurgence in coronavirus cases, mainly in Europe and the U.S., has led to sustained weakness in oil demand. As a result, OPEC and its partners plan to increase oil output by just 0.5 million bpd in January, against an earlier plan of raising output by 2 million bpd. The oil cartel will hopefully manage to keep the needed production cuts in place in 2021, but that's far from a certainty. Member countries have failed to agree on cuts, or have been noncompliant on the agreed cuts, several times in the past.

Gasoline demand bounced back in the summer driving season. However, it was short-lived, as the rising coronavirus cases once again pushed demand down. In comparison, demand for distillate fuel, comprising of diesel and other heavier fuels, seem to be holding better.

US Finished Motor Gasoline Product Supplied Chart

US Finished Motor Gasoline Product Supplied data by YCharts

Will 2021 be better?

The International Energy Agency expects global oil demand to rise by 5.8 million bpd in 2021. The Agency expects a vaccine could help boost demand only by the second half of 2021.

In the U.S., the Energy Information Administration expects oil production to gradually get back to pre-pandemic levels in 2021. Still, the average production is expected to be 11.1 million bpd, down from 11.3 million bpd in 2020 and 12.2 million bpd in 2019. The Agency expects gasoline consumption in the U.S. to rise from 8.09 million bpd in 2020 to 8.76 million bpd. Notably, that's still lower than the average consumption of 9.31 million bpd in 2019. Finally, the EIA expects WTI prices to average $45.8 per barrel in 2021, up from an average of around $39 per barrel in 2020.

Prices of gasoline and various commodities on the stock market.

Image source: Getty Images.

Though EIA's estimates haven't been the most reliable ones recently, the expected modest improvements in demand and prices seem realistic. The pace of global recovery has been uneven so far. Though demand bounced back quickly from the lows of April, the recovery has been far slower after that.

I expect a slow yet steady recovery in oil products demand and prices in 2021, though not to pre-pandemic levels. Rising coronavirus cases may keep a lid on demand in the first half, until an effective vaccine reaches to the bulk of global population. That should support energy stock prices, though I don't expect them to climb sharply. Finally, as always, OPEC is a wild card that may make oil prices and stocks volatile.

Among energy stocks, Chevron looks promising due to its strong balance sheet and low-cost production. In the refining segment, Valero Energy's (VLO 0.73%) lower operating expenses position it well for the challenging market. It could be a great addition to any value investor's portfolio.