Seoul stocks closed at a fresh peak on Wednesday, just an inch away from the 6,700 mark, as investors bet chip demand will remain solid amid woes over the artificial intelligence (AI) boom.

The benchmark Korea Composite Stock Price Index (KOSPI) added 49.88 points, or 0.75 percent, to a fresh record high of 6,690.90 after rising as high as to 6,716.20, extending its gains to a third consecutive day.

Trade volume was heavy at 712.3 million shares worth 31 trillion won (US$21 billion), with winners outnumbering losers 478 to 362. Foreigners net sold 606.9 billion won worth of local shares, but retail investors and institutions scooped up 167.4 billion won and 477.7 billion won, respectively.

The KOSPI had opened lower tracking overnight losses on Wall Street, sparked by a slump in tech heavyweights on a report that an executive from OpenAI, the founder of ChatGPT, raised concerns over its revenue and user targets.

But the KOSPI turned higher in the afternoon as the Financial Times reported that investors are betting on a prolonged boom for memory chipmakers amid continued AI demand.