An optimistic survey on the German economy and strong US company earnings lifted stocks on Friday at the end of a week that was overshadowed by worries over Spain’s finances. The Ifo institute business-climate index for Europe’s largest economy edged up to 109.9 points in April from 109.8 in March — the sixth straight increase. Growth in Germany could help weaker nations in the 17-country eurozone as demand for their goods increases. “This is strong empirical evidence that the recovery of the global economy continued in the last few weeks,” analysts at UniCredit wrote in a note. “More optimistic German exporters and a global economy losing momentum simply do not jibe!” The German optimism was backed up by strong retail sales in the UK, which grew 1.8 per cent in March compared with February. In the US, General Electric Co., McDonald’s Corp. and Schlumberger Ltd. all added to hopes that the world’s largest economy was in recovery. Encouraged by the good results, Britain’s FTSE 100 inched up 0.3 percent to 5,763.2. Germany’s DAX rose 0.9 percent to 6,728.2 and the CAC-40 in Paris gained 0.2 percent to 3,179.4. Wall Street also opened higher. The Dow Jones Industrial Average rose 0.6 percent to 13,035.8, while the S&P 500 gained 0.4 percent to 1,382.3. Although General Electric’s profit declined 12 percent, it nevertheless topped expectations. Earlier in the day, market sentiment had been weighed down by Thursday’s lackluster US economic data, pulling down markets in most of Asia. Tokyo’s Nikkei 225 index dropped 0.3 percent to close at 9,561.36. South Korea’s Kospi lost 1.3 percent, with the government saying that exports are likely to face headwinds in the second quarter due to Europe’s debt crisis and China’s slowdown. Benchmarks in Singapore, Taiwan, India and New Zealand also fell. Australia’s S&P/ASX 200 closed marginally higher. Shares in Hong Kong and China, meanwhile, rose amid expectations that Beijing will soon lower the ratio of deposits that banks are required to hold in reserve — a move that would boost lending. Hong Kong’s Hang Seng rose less than 0.1 percent and the Shanghai Composite Index gained 1.2 per cent. The good earnings and economic data also pushed up energy prices. Benchmark oil for May delivery jumped $1.74 to $104.47 per barrel in electronic trading on the New York Mercantile Exchange. The contract fell by 40 cents to end at $102.27 per barrel on the Nymex on Thursday. The euro rose 0.4 per cent to $1.319 from $1.3130. The dollar rose 0.11 per cent to 81.68 yen from 81.46 yen.