U.S. stocks closed mixed Tuesday, as investors focused on earnings reports from several major retailers. In corporate news, J.C. Penney posted a big loss that was even worse than forecasts. Despite that, the struggling retailer noted that its same store sales, a key measure for retailers, were slightly better than they were during the first quarter of 2013. Shares retreated a bit from their highs of the day but were still up 6 percent at the close. Best Buy has also struggled recently, but appears to be a step ahead of J.C. Penney in the turnaround process. The electronics retailer reported a surge in profit, which chief executive Hubert Joly attributed to aggressive cost-cutting. The stock has now gained 185 percent so far this year. Retailers Urban Outfitters and TJX were also top performers in the S&P 500 after releasing solid earnings reports. Home Depot announced a gain in quarterly net profit and raised its guidance for 2013. Struggling bookseller Barnes & Noble recorded a loss and said revenue from its Nook tablet business was down more than 20 percent from the same quarter last year. The stock plunged and at least one trader on StockTwits had little hope for a rebound. The dollar lost ground to the euro, the pound, and the yen. Light sweet crude oil for September delivery dropped $2.14 to $104.96 a barrel on the New York Mercantile Exchange. Gold futures gained $6.90 to $1,372.60 an ounce. The Dow Jones industrial average lost 7.75, or 0.05 percent, to 15,002.99. The broader Standard & Poor's 500 index moved up 6.29, or 0.38 percent, to 1,652.35. The technology-heavy Nasdaq composite index rose 24.5, or 0.68 percent, to 3,613.59.