The KOSPI and Kosdaq indexes are displayed in the dealing room of Hana Bank in Seoul, Wednesday. The benchmark KOSPI closed at 6,797.70, up 0.74 percent from the previous session, while the secondary Kosdaq closed at 751.09, down 0.3 percent. Yonhap

The KOSPI failed to reclaim the 7,000 mark, Wednesday, paring most of its gains after surging more than 5 percent, as caution ahead of Alphabet's earnings and concerns over rising oil prices weighed on investor sentiment.

The benchmark closed at 6,797.70, up 0.74 percent from the previous session. It opened 4.51 percent higher and extended its gains to the 7,000 level. A buy-side sidecar was triggered at 9:06 a.m., marking the 20th such activation on Korea’s main bourse this year.

Foreign investors led the buying spree, purchasing 2.62 trillion won ($1.7 billion) worth of shares. Institutional and retail investors net sold 1.38 trillion won and 1.23 trillion won worth of shares, respectively.

The secondary Kosdaq extended its decline, falling 0.3 percent to 751.09. Despite the efforts, the index returned to the level seen before President Lee Jae Myung's inauguration.

Investor sentiment toward the semiconductor sector improved overnight after Nvidia announced that its Vera Rubin platform had entered mass production and begun shipping. Reports that TSMC had raised its chip foundry prices by 10 percent also reinforced expectations of robust semiconductor demand.

Still, concerns persisted over whether hyperscalers could sustain their large-scale spending, prompting investors to adopt a cautious stance ahead of Alphabet's earnings release on Thursday morning (local time).

U.S.-Iran tensions and tariff uncertainty weighed on markets. U.S. President Donald Trump's threats of strikes and direct action in the Red Sea pushed WTI and Brent to about $85 and $92, respectively, while looming tariff decisions — including steep duties on generic drugs — added further policy risk.

Broad gains across sectors were supported by net buying from foreign investors. However, gains in the semiconductor sector were limited. SK hynix fell 0.33 percent to 1,830,000 won, while Samsung Electronics gained 0.58 percent to 260,500 won.

Physical artificial intelligence-related stocks rose after Samsung Electronics announced plans to expand its robotics business. Hyundai Motor, Hyundai Mobis, Hyundai AutoEver and LG Electronics all went up.

Nuclear power stocks rallied on earnings expectations and momentum from government-led megaprojects, while shipbuilders also advanced on bargain hunting.

The won weakened slightly, with the won-dollar exchange rate closing at 1,480.1 won, up 6.7 won from the previous session.