Sentiment among the country's largest manufacturers rose to a two-year high, an advance that may be hampered by evidence the global economy is slowing.

The gain in the Bank of Japan's quarterly "tankan" index, which exceeded all 22 forecasts in a Bloomberg survey of economists, proved insufficient to stem a five-day losing streak in the Nikkei 225 stock average. Equities have slid worldwide this week amid reports showing slower Chinese growth and a drop in U.S. consumer confidence, along with concern that European policymakers are withdrawing stimulus steps.

The tankan index of sentiment climbed to plus 1 in June from minus 14 in March, the BOJ said Thursday, meaning optimists outnumber pessimists. The report was a contrast with data this week showing higher unemployment, falling household spending and a drop in paychecks.