In all respects, today was an exceptionally good day, even if the broad-based S&P 500 (^GSPC -0.88%) didn't reflect it. The reasoning is that practically all economic data should have pushed us decisively lower, yet the index and many stocks held strong.

According to the Mortgage Brokers Association, U.S. mortgage applications tumbled 23% last week as lending rates hit a two-year high. That could be particularly worrisome news for homebuilders and companies tied to the ongoing recovery in housing.

To add on, crude inventories continued their fall from their record May highs, prompting West Texas Intermediate to climb to a 14-month high. While good news for drillers, higher oil prices can translate into higher prices at the pump and a slew of other input price hikes for consumers. If oil continues to creep higher, consumer discretionary spending could begin to suffer.

The icing on the cake came from the Federal Open Market Committee's minutes, which were released midday and demonstrated concern from some members over the Federal Reserve's handling of the proposed bond-buying wind-down. Investors have been waiting on the edge of their seats for updates from the U.S. central bank, so it should be prudent with what it has to say.

Amazingly, the S&P 500 was able to digest all of this negative news and come out ahead, fractionally at least, by 0.30 points (0.02%) to close at 1,652.62, its ninth gain in the past 11 sessions. The overall day may have been close to a wash, but three companies within the index turned in some impressive gains.

We certainly saw some tailcoat-riding in the discount retail sector, with Family Dollar Stores (FDO.DL) and Dollar General (DG -0.59%) leading the way with gains of 7.1% and 5.8%, respectively. The story here relates to Family Dollar's better-than-expected third-quarter results, which delivered a 9% increase in revenue to $2.57 billion and $1.05 in EPS, $0.03 more than the Street expected. More impressively, gross margin rose 560 basis points, with its consumables segment sales up nearly 15%. Family Dollar also tightened its fourth-quarter EPS guidance a bit, to a range of $0.82-$0.87 from $0.85-$0.95, and in line with the Street's expectation of $0.85.

The reason Dollar General is higher is that investors are betting on similar strength when it reports its quarterly results in September. The thesis on dollar stores is that as consumer spending becomes challenged by higher oil prices and higher payroll taxes, those consumers will look to save money by turning to discount variety stores like Family Dollar and Dollar General. If today's action is any indication, this could make for an intriguing trade for many quarters to come.

Teradyne (TER -4.22%) was the third S&P 500 component turning in impressive gains, up 5% after announcing that China's Acetec Semiconductor had placed an order for 20 J750EX-HD systems capable of digital wafer sorting and final testing of mobile connectivity devices. Deals are always a good thing for Teradyne, but the unfortunate aspect of building more efficient control equipment is that it's driving down the cost of all manufacturing processes over time, which means innovate constantly or earn less money for Teradyne. However, with Teradyne's $2.80 in net cash per share and as it sits at just 10 times forward earnings, I'd be intrigued enough to suggest adding Teradyne to your Watchlist.