South Korea's KOSPI on Wednesday broke above the 4,620 mark for the first time during the session, then swung between gains and losses before closing slightly higher in the 4,550 range.
The KOSPI ended up 1.31 points, or 0.03 percent, at 4,552.37 from the previous session. It rose for a fifth straight session and set another record closing high, topping Tuesday's all-time high close of 4,551.06.
The index opened down 19.60 points, or 0.43 percent, at 4,531.46. It moved in a narrow range before turning higher. It briefly climbed to 4,622.32 to set an intraday record, surpassing Tuesday's previous high of 4,611.72, but gains narrowed on profit-taking.
In the main board market, retail investors were net buyers of 1.2542 trillion won, supporting the index, while foreigners and institutions posted net sales of 112.1 billion won and 1.3973 trillion won, respectively, capping the rise.
Samsung Electronics' preliminary fourth-quarter operating profit, released before the market opened, came to 20 trillion won, topping the consensus estimate of 19.6457 trillion won. It also set a record for quarterly operating profit for the first time in about seven years.
But as the market had already priced in Samsung Electronics' strong earnings, investors moved to take profits on perceptions the event had passed, and the index fell early in the session.
During the session, heavier retail buying focused on SK Hynix and biotech shares helped the index turn higher, briefly surging into the 4,620 range for the first time.
Among top market-cap stocks, SK Hynix rose 1.89 percent and briefly touched the 780,000-won level for the first time. SK Hynix has risen for 11 straight sessions from Dec. 22 through Wednesday, matching the longest winning streak on record set in September from Sept. 2 to 16.
Defence shares also rose across the board, including Hanwha Aerospace, up 7.92 percent, and Hyundai Rotem, up 4.20 percent, after U.S. President Donald Trump said he would increase next year's defence budget and also revealed ambitions to annex Greenland, an autonomous territory of Denmark.
Biotech shares also gained ahead of next week's JPMorgan Healthcare Conference, including Samsung Biologics, up 6.68 percent, and Celltrion, up 0.95 percent.
Samsung Electronics, down 1.56 percent, turned lower on profit-taking after setting an all-time high early in the session despite posting record results.
Hyundai Motor, which surged more than 13 percent on Tuesday, fell 2.85 percent. LG Energy Solution slid 1.21 percent, Doosan Enerbility fell 0.36 percent, Kia dropped 3.40 percent and KB Financial slipped 0.96 percent.
In the main board market, 730 stocks fell, about four times the number that rose at 177.
By sector, pharmaceuticals rose 3.48 percent, transport equipment gained 2.03 percent and healthcare added 1.47 percent, while financials fell 1.59 percent and textiles and apparel dropped 1.91 percent.
The Kosdaq index ended down 3.33 points, or 0.35 percent, at 944.06.
The index opened up 3.32 points, or 0.35 percent, at 950.71 and moved in a narrow range before turning lower late in the session.
In the Kosdaq market, foreigners were net sellers of 95.4 billion won, while retail investors and institutions were net buyers of 69.1 billion won and 32.3 billion won, respectively.
[Yonhap News Agency]