Shares of computer memory and data storage giant Micron Technology (MU - Get Report) gained on Monday after the company received an upgrade from Goldman Sachs amid a more positive outlook on global demand for memory.

Micron gained more than 3.4% after Goldman Sachs analyst Mark Delaney upgraded the stock to buy from neutral and raised his one-year price target on the shares to $56 from $40. The stock ended the day Friday at $45.52.

In a note to clients Sunday, Delaney said he is now more positive on global memory stocks as he believes that the excess inventory memory companies are carrying will be whittled down faster than currently anticipated, particularly stockpiles of NAND flash, which has been impacted by Toshiba Memory's recent fab outage.

"We now believe that inventory at the memory companies... is being depleted faster than we previously expected," Delaney said in his note. "In addition, we continue to expect the underlying rate of production to fall below longer-term demand growth in 2020."

Delaney also noted that his group is generally more positive on global memory stocks, given where current valuations stand. "We believe that Micron's stock will trade more on memory pricing trends and intermediate term EPS expectations than FY20 earnings," Delaney said.

Shares of Micron were up $1.56 at $47.08 in afternoon trading on the Nasdaq Stock Market. The stock has gained some 30% since touching a 52-week low of $28.39 in December.