Shares of Samsung Electronics, the top market cap on South Korea's stock market, closed at 49,150 won (US$41.2) on Thursday, up 3.04 percent from the previous session.

It was the highest price since June 2018 and marks a 12.1 percent jump this month, with foreign investors scooping up shares on signs of a rebound in memory chips, the main source of income for the Korean tech giant. Foreigners owned 57.4 percent of the world's largest memory chipmaker as of Wednesday.

Analysts have published a series of buy recommendations for Samsung, citing rising chip demand and declining stockpiles of DRAM and NAND flash chips, the most common chips used in computers and smartphones to process and store data.

"The firm's semiconductor business was estimated to have bottomed out in the second quarter, and will get on a path to recovery in line with falling level of chip stockpiles," Eo Gyu-jin, an analyst at DB Financial Investment, said. "Samsung's operating profit will recover in the third and fourth quarter."

The leading memory chip maker's share in the DRAM market was expected to reach 47 percent in the July-September period, up from 41 percent and 43 percent in the first and second quarters, respectively, according to the market researcher IHS Markit.

"The fall in DRAM prices will slow in the latter half of this year, and the stockpiles will decrease by 50 percent compared with the beginning of the year," Kim Dong-won, an analyst at KB Securities, said. "NAND prices are also expected to stabilize in the fourth quarter when inventory level returns to the normal level."

Market watchers also expected Samsung's smartphone sales to recover thanks to its revamped mid-range Galaxy A series, which enjoyed popularity in Southeast Asia and Europe. The positive initial response to the Galaxy Fold also boosted hopes for its expansion of the foldable smartphone lineup next year, which could improve profits in the top-end sector.

"Samsung's DRAM shipments have increased and smartphone sales are also expected to recover in line with a strong performance by the Galaxy A series," Lee Sun-hak, an analyst at Hanwha Securities, said. "Its OLED business is also entering a peak season."

Seoul-based financial market tracker FnGuide predicted Samsung's third-quarter operating profit to tumble 60.4 percent on-year to 7 trillion won due to a fall in memory chip prices and a high base effect, but the latest figure was better than an earlier market guidance.

Samsung earlier expressed expectation that prices of NAND, mostly used in mobile devices, will pick up in the third quarter, given a stabilizing inventory level and rising demand in the second quarter.

For DRAM, the firm anticipated demand recovery in the third quarter as data centers resumed purchasing server DRAM in the late second quarter, but it cautioned there would be more volatility in the market in the wake of global trade tension.

The world's largest smartphone maker has also been expanding its 5G device lineup to revitalize the flattening smartphone market, having launched four smartphones with 5G network connectivity.