TOKYO, Dec 25 (Reuters) - Japanese shares ended mixed in holiday-thinned trade on Friday but some investors bought pro-cyclical stocks that are expected to perform well next year as the global economy recovers from the coronavirus pandemic.

The Nikkei 225 Index ended down 0.04% at 26,656.61. The broader Topix rose 0.23% to 1,778.41.

Shares in the shipping, raw materials, and real estate sectors rose, while tech firms fell as overall activity was substantially thinned by the closure of many financial markets for Christmas holidays.

Sentiment was underpinned by Britain and the European Union securing a free-trade deal, and further soothed earlier in the week by U.S. lawmakers agreeing a $900 billion economic stimulus package.

The roll out of coronavirus vaccinations and expectations that interest rates will remain low for a prolonged period have also brightened prospects for equities next year.

"For policy and financial markets, a goldilocks scenario is likely to continue next year due to a gradual economic recovery and monetary easing," Mizuho Securities said in a research memo.

The stocks that gained the most among the top 30 core Topix names were Seven & i Holdings Co Ltd up 1.89 %, followed by Mitsui & Co Ltd rising 1.84%.

The underperformers among the Topix 30 were SoftBank Group Corp down 3.15%, followed by Sony Corp losing 1.36%.

Nippon Yusen KK rose 6.5% after the marine shipping company raised its earnings forecasts, which also lifted the share prices of its rivals.

There were 161 advancers on the Nikkei index against 58 decliners.

The volume of shares traded on the Tokyo Stock Exchange's main board was 0.63 billion, compared to the average of 1.26 billion in the past 30 days. (Reporting by Stanley White Editing by Shri Navaratnam and Raju Gopalakrishnan)