Stock markets managed to paddle aside a stream of negative news this week, riding a tidal wave of earnings to modest gains.
The Dow Jones Industrial Average finished the week up 0.4 percent to 12,822.57 points.
The week was dominated by gloomy prescriptions about the state of the US and global economy.
The IMF trimmed its global growth forecast for the rest of the year, citing “signs of further weakness.”
US Federal Reserve Chairman Ben Bernanke gave a dark assessment of the economy, but said the Fed would act if the situation gets worse, lending some support to equities.
“Despite no hint of easing, Bernanke did reiterate that the Federal Reserve was prepared to react should the economy deteriorate further,” analysts at Wells Fargo Advisors said.
The data did not help improve sentiment.
US retail sales fell by 0.5 percent last month, the US Department of Commerce reported. Most analysts estimated they climbed 0.2 percent.
US jobless claims rose almost 10 percent from the previous week, adding to fears that unemployment would remain stubbornly above 8 percent for a while longer.
The National Association of Realtors reported sales of existing, or previously occupied, homes fell 5.4 percent last month from May, instead of an expected rise.
However, company news, particularly the tech sector, provided a modest boost for markets.
Despite its first ever quarterly loss, Microsoft rose 2.5 percent after announcing it would part company with NBC News, pulling out of their joint venture MSNBC to launch its own online news service.
Yahoo was up 1.1 percent after announcing it had hired key Google executive Marissa Mayer to helm the company.
However, bank stocks were battered amid a fresh wave of scandals over unethical behavior.
JPMorgan ended the week down 6 percent, Citigroup was down almost 3 percent, Goldman Sachs was down 3.4 percent and Morgan Stanley lost more than 9 percent.
The S&P 500 ended the week up 0.4 percent, while the NASDAQ was up 0.6 percent.
The US economy probably expanded in the second quarter by the least in a year as a weaker labor market prompted Americans to cut back on their spending, economists said this week.
GDP rose at a 1.4 percent annual rate after a 1.9 percent gain in the prior quarter, according to the median forecast of 70 economists surveyed by Bloomberg News. Factory orders softened and new-home sales were little changed, other data may show.
Consumer purchases, which account for about 70 percent of the world’s largest economy, are weakening at a time Europe’s debt crisis and looming US tax-policy changes threaten to further slow corporate investment.