It was yet another one of those head-scratching up days where the economic data pointed one way, but earnings optimism was enough to push the broad-based S&P 500 (SNPINDEX:^GSPC) to another record closing high.

The culprit that certainly had all the potential to drag us lower was U.S. home sales data from the National Association of Realtors. Their report showed that U.S. home sales fell 1.2% in June to an annualized rate of 5.08 million homes – well below estimates that had called for an annualized rate of 5.25 million homes. I don't think there's any way to dance around how spoiled consumers have become with historically low lending rates, such that when we see a 100 basis point bump higher, mortgage applications dry up at an incredibly fast clip.

The one bright spot here was home prices, which soared 13.5% from the year-ago period. Homebuilders are being smart about their inventory and understand that low inventory levels are their only bargaining chip at the moment to keep prices up.

Despite the disappointing housing sector news, the S&P 500 used last week's earnings optimism to trudge higher by 3.44 points (0.20%) and close at 1,695.53, another all-time record.

Leading the pack today -- and we certainly haven't seen this name often in the gainers column this year -- is gold miner Newmont Mining (NYSE:NEM), which tacked on 5.8% following gold's biggest advance of the year, up $40 an ounce. Gold tends to be an inflationary hedge against downside risk in the market, so with the markets generally moving upward in a straight line, gold has taken a beating. However, weakness today in the U.S. dollar, coupled with the fact that Newmont ties its dividend to the price of gold, was enough to send shares markedly higher. As long as Newmont stays prudent with how much it's spending on new projects, it could represent quite a bargain here, even with gold only marginally above $1,300 an ounce.

Shares of medical-device maker Boston Scientific (NYSE:BSX) jumped 3.6% after the company announced on Friday that it had launched a clinical trial to evaluate if occipital nerve stimulation using its Precision System can safely treat chronic migraine when used with existing anti-migraine medications. Migraines are still a largely misunderstood disease, and the current medication available could definitely get better, leaving the door wide open for Boston Scientific should this trial prove fruitful. With Boston Scientific shares cresting $10 for the first time in three years shareholders are certainly pumped, but I'd reserve that optimism until its bottom line profits catch-up with its now loftier valuation.

Finally, software and hardware solutions developer for the logistics industry Pitney Bowes (NYSE:PBI) advanced 3.9% despite no company-specific news. The story here could be more related to short-sellers than anything else. Pitney Bowes is consistently among the S&P 500's most short-sold companies, meaning any slight rally can be exacerbated by short-sellers covering their positions. While today's move certainly gave optimists the upper hand, it does nothing to change the long-term investing thesis that Pitney Bowes' revenue is shrinking, and it's already had to slice its dividend in half to conserve its free cash flow. In my book it's still a stock to steer clear of.

Fool contributor Sean Williams has no material interest in any companies mentioned in this article. You can follow him on CAPS under the screen name TMFUltraLong, track every pick he makes under the screen name TrackUltraLong, and check him out on Twitter, where he goes by the handle @TMFUltraLong.

The Motley Fool has no position in any of the stocks mentioned. Try any of our Foolish newsletter services free for 30 days. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.