* TSE's first section market cap tops 600 trln yen
* Topix rises to 2-year high
* BOJ cuts inflation outlook
TOKYO, July 20 (Reuters) - Japanese stocks rose on Thursday, with the main board's market capitalization hitting nearly two-year highs as investors stayed upbeat after global stocks rallied.
The Nikkei ended 0.6 percent higher at 20,144.59 points, while the broader Topix rose 0.7 percent to 1,633.01, its highest closing level since August 2015.
Market capitalization of the Tokyo Stock Exchange's first section hit 601 trillion yen ($5.36 trillion), its highest since August 2015.
On Wednesday, the Dow Jones Industrial Average, the S&P 500 and the Nasdaq Composite indexes all set record closing highs.
MSCI's broadest index of Asia-Pacific shares outside Japan added 0.2 percent, hovering near its highest level since December 2007, and European markets were set for a positive start.
"There seems to some signs of euphoria in global stock markets, inspired by U.S. shares' strong performance lately," said Ayako Sera, senior market economist at Sumitomo Mitsui Trust in Tokyo.
On Thursday, the Bank of Japan kept monetary policy steady as expected, and pushed back again the timing for achieving its 2 percent inflation target, reinforcing expectations it will lag well behind major global central banks in dialing back its massive stimulus program.
"While the outcome did not give a major impact to the market, investors are somewhat relieved that the easy monetary policy environment will continue for a while," said Yutaka Miura, a senior technical analyst at Mizuho Securities.
Also supporting the mood was data early in the day which showed Japan's exports rose for a seventh straight month in June, led by shipments of cars and electronics.
All but one of Topix's 33 subsectors advanced.
Oil-related shares rose after crude oil futures jumped almost 2 percent to six-week highs following a U.S. report showing a bigger weekly draw than forecast in crude and gasoline stocks, along with a surprise drop in distillate inventories.
Inpex rose 1.0 percent and Japan Petroleum added 1.5 percent.
Banks underperformed, however, with Mitsubishi UFJ Financial Group adding 0.1 percent and Sumitomo Mitsui Financial Group dropping 0.8 percent. ($1 = 112.0800 yen) (Reporting by Ayai Tomisawa and Lisa Twaronite; Editing by Richard Borsuk)