Japanese stocks reversed losses as gains by drugmakers and financial shares outweighed declines by energy explorers and commodity stocks.

Pharmaceutical makers Eisai Co. and Shionogi & Co. added at least 2.7 percent. Consumer lenders and real-estate developers posted the biggest advances among the Topix index’s 33 industry groups. Energy explorers Inpex Corp. and Japan Petroleum Exploration Co. fell at least 2.3 percent as crude oil prices held below $49 a barrel. Mitsubishi Materials Corp. slid 2.2 percent after copper dropped yesterday.

The Topix added 0.2 percent to 1,528.30 at the break in Tokyo, erasing a loss 0.6 percent. The Nikkei 225 Stock Average rose 0.5 percent to 18,757.55. The dollar surged to its strongest level against the euro in almost 12 years as the U.S. benchmark stock gauge slumped on Tuesday, erasing all its gains this year. The yen weakened 0.2 percent to 121.42 per dollar Wednesday.

The Topix jumped 8.4 percent this year through yesterday, compared with a 0.7 percent loss on the Standard & Poor’s 500 Index.