Korea's two main stock markets rallied in tandem Wednesday, as renewed optimism over artificial intelligence (AI) investment lifted the KOSPI and continued retail buying fueled the Kosdaq's advance. The benchmark KOSPI closed at 6,598.26, up 3.76 percent from the previous session. The index opened 3.85 percent higher and soon triggered a buy-side sidecar, marking the 22nd such activation this year. Institutional and retail investors were net sellers of 280.2 billion won ($196.6 million) and 1.18 trillion won worth of shares, respectively. Foreign investors were net buyers of 1.45 trillion won. SK hynix rose 5.77 percent to close at 1,668,000 won, while Samsung Electronics gained 2.5 percent to finish at 246,000 won. The two market heavyweights posted strong gains as investor confidence in the semiconductor sector remained firm. Hyperscalers continued to ramp up AI spending while demonstrating tangible returns on those investments. Sentiment was further boosted by reports that the world's three major memory chipmakers have already sold out their 2027 DRAM and high-bandwidth memory producti