Coming into today's session, it looked like the stock market would sink under the weight of some disappointing economic news on the housing front and a worse-than-expected earnings report from the market's largest fast-food company. But by the end of the day, the overall market recovered nicely, and although the Dow Jones Industrials (^DJI -0.83%) only managed to post a minimal two-point gain, the S&P 500 (^GSPC -0.32%) climbed to another all-time record high close.

Among the best performers today were two stocks that did particularly badly on Friday. Microsoft (MSFT -2.54%) finished the day up almost 2% as investors reassessed the tech giant's huge 11% drop in its previous session. Although a major inventory charge hit the company's Surface RT tablet line, the newer release of the more powerful Surface Pro has much greater potential to occupy a new niche in the tablet business, with the ability to run full-function programs. Moreover, with greater success in some of its other promising segments, including its server business, Microsoft still has growth potential that could translate to solid long-term performance.

Hewlett-Packard (HPQ 0.25%) also managed to regain some of its Friday losses, picking up 1.5%. An analyst report reminded investors that despite the much-hyped declines in PC sales overall, the PC business represents a small portion of HP's overall earnings, thanks to relatively low margins compared to some of its more lucrative segments. Even if a shift away from PCs leads to some nasty-looking numbers for HP's revenue, the company should nevertheless be able to produce earnings growth that will justify its overall restructuring strategy.

Finally, Bank of America (BAC -0.85%) gained more than 1% to reach its highest level since early 2011. With bank earnings season largely done for the quarter, B of A and its peers will now need to focus on driving business in an arguably more challenging environment. Yet with interest rates finally starting to stabilize after the big jump in May and June, B of A could see mortgage borrowers start stepping back into the market. With the bank seeking to increase its home lending business, favorable rate movements could be the catalyst to give B of A's stock its next leg upward.