The first day of October was a positive one for the stock market, as investors decided to put an optimistic spin on things. Even with a heightened level of first-time claims for unemployment benefits, market participants were pleased to see the number drop at least slightly from where it was a week earlier. Just before 11:30 a.m. EDT, the Dow Jones Industrial Average (^DJI -0.98%) was up 104 points to 27,884. The S&P 500 (^GSPC -0.46%) gained 16 points to 3,379, and the Nasdaq Composite (^IXIC -0.64%) climbed 102 points to 11,270.

Perhaps the most surprising news coming out of the market involved home goods retailer Bed Bath & Beyond (BBBY), whose stock soared after an upbeat report on business conditions. Meanwhile, energy stocks weren't nearly as lucky, as ExxonMobil (XOM 0.23%) dragged on the entire sector with a far more pessimistic assessment of its prospects.

Bed Bath goes Beyond

Shares of Bed Bath & Beyond were higher by 33% Thursday morning. The home goods retailer's fiscal second-quarter results had far more good news than most investors had expected to see.

Bed Bath & Beyond reported comparable sales growth of 6%, marking the first time that metric has been positive in three and a half years. The reason: an 89% growth rate in comparable sales from the retailer's digital channels. That was enough to offset a 7% drop in comparable-store sales in Bed Bath & Beyond's brick-and-mortar store network.

Also boosting the company's prospects was a huge gain in gross margin, which rose almost 10 full percentage points. Much of this came from one-time writedowns, but a more favorable mix of product sales and better management of sales promotions also helped boost profitability. That helped contribute to a 47% rise in earnings per share compared with year-ago levels.

Bed Bath & Beyond has benefited from consumers spending more time at home and doing more to spruce up their living spaces. The stock has climbed to levels not seen since early 2018, and if it can keep executing well, the retailer could be on a track to a longer-term recovery.

Oil refinery facility as seen from across a body of water

Image source: Getty Images.

Much less energetic

Energy stocks were lower Thursday morning, with ExxonMobil shares falling 3%. The oil giant released what it called "Q3 Earnings Considerations" in a filing with the U.S. Securities and Exchange Commission, in which it warned of some impacts it expects to show up in its quarterly results later this month.

Those watching ExxonMobil had expected that more favorable conditions would help it rebound from a massive loss in the second quarter. Yet even though the energy company believes that changes in oil prices should add $1.4 billion to $1.8 billion in incremental earnings in the third quarter compared with second-quarter levels, it foresees weakness in other areas.

Specifically, weaker natural gas prices could cost the company up to $500 million in net income. Weaker downstream refining margins could cost an extra $200 million to $600 million.

The news rippled across the industry, with refining giant Valero Energy (VLO 0.08%) falling 8% and oil-field services specialist Halliburton (HAL) seeing a 6% decline. With oil prices falling more than $2 per barrel to drop below $38, the pain for Exxon and energy stocks  more broadly could last a long time.