Dollar General (DG) was sure walloped by a range of factors during a surprisingly bad third quarter. 

The dollar store reported Thursday that earnings came in at 84 cents a share, falling well short of Wall Street forecasts for 93 cents a share. Net sales rose 5% from the prior year to $5.32 billion, missing analysts estimates for $5.37 billion. The sour news didn't stop there, however.

Dollar General's same-store sales, a key retail measure that reflects sales at stores open more than a year, dropped 0.1%. Wall Street was looking for an 0.8% increase. Rival Dollar Tree (DLTR) said last week that third-quarter same-store sales rose 1.7%, ahead of estimates for a 1% gain. Meanwhile, Dollar General reduced its profit outlook for the year, saying earnings will come in below its long-term goal of 10% to 15% growth. 

For Dollar General the stunning sales and profit misses could be boiled down to several things.

First, the company began to lower prices on 10% of its top 250 selling items in the second quarter in an effort to compete with new price cuts -- mostly in food -- by behemoth Walmart (WMT) . As a result of the response to its arch nemesis, Dollar General's already razor thin profit margins took a hit in the third quarter -- gross profit margins fell 49 basis points from a year ago to 29.8%. 

"There is evidence Walmart has lowered food prices in certain categories, which likely pressured Dollar General -- we note that Dollar Tree is impacted less by this as it has a more discretionary product mix," points out Barclay's analyst Karen Short. "We believe Dollar General's initial price reductions were likely introduced more broadly in the third quarter, potentially pressuring results in the near-term," Short added.

Also not helping Dollar General is the continued financial challenges of its low income customer base in the wake of food stamp cuts. 

In May, 43.5 million Americans were receiving food stamps, down 9% from the 2012 peak. Food stamp enrollment is on the wane as several states have ended benefits earlier than they were required. Seven states -- all Republican-led -- opted to end waivers for some enrollees that were created in the 2009 government stimulus package, despite the benefits being federally funded.

With less money in their pockets, Dollar General's customers are focusing on buying food as opposed to a new shirt that they probably don't need. It noted that while sales of consumable goods such as frozen food and candy sold well, sales were soft in non-essential seasonal products, apparel and home goods. 

Said Dollar General CEO Todd Vasos: "The challenging retail environment that we experienced in the 2016 second quarter continued into the third quarter, contributing to weakness in our same-store sales and our financial performance."

In light of its weak results and tepid outlook, which suggest a challenging holiday season is forthcoming, investors may question why they jumped aboard Dollar General's stock of late. The company's stock had gained about 4.3% since Dollar Tree reported better than expected earnings on Nov. 22, as many viewed Dollar General as also likely turning the corner after a soft first half of the year. So much for that logic.   

If you liked this article you might like

Cramer: 10 Stock Surprises

Cramer: 10 Stock Surprises

Cramer: The Window of Opportunity Shuts Fast

Cramer: The Window of Opportunity Shuts Fast

What's Coming Out of Washington: Cramer's 'Mad Money' Recap (Wednesday 1/17/18)

What's Coming Out of Washington: Cramer's 'Mad Money' Recap (Wednesday 1/17/18)

Cramer: Consumer Health Is Unappreciated

Cramer: Consumer Health Is Unappreciated

Novice Trade: Dollar General

Novice Trade: Dollar General