The Japanese yen weakened while stocks swung between small gains and losses after the Bank of Japan on Tuesday announced an end to years of ultra-easy monetary policies, marking an historic shift from a decades-long fight against deflation.

In a widely expected decision, the central bank ended its negative interest rates policy and yield curve control (YCC), as well as dropping purchases of risky assets, including exchange-traded funds (ETFs).

Local and international media, including Reuters, had been reporting over the past week of a likely end to most or all of the BOJ's stimulus programmes at this policy meeting.

"There were no surprises so far. It's all been in line with the market consensus," said Norihiro Yamaguchi, senior economist at Oxford Economics in Tokyo.

"For the time being, I expect equity prices to increase with the uncertainty gone surrounding the meeting," he added. "Yields are likely to stay at current levels."

The Nikkei was down 0.36% at 39,598.27, after initially extending losses from morning trading and then swinging to small gains.

The dollar was last up 0.35% at 149.67 yen, as traders sold the Japanese currency having largely priced in the decision.

Ten-year June JGB futures were up 0.13 points at 145.56. Cash bonds had yet to trade following the policy decision. (Reporting by Kevin Buckland; Editing by Jacqueline Wong and Shri Navaratnam)