A monitor displays Procter & Gamble Co. signage on the floor of the New York Stock Exchange (NYSE) in New York, U.S., on Monday, May 15, 2017.

Procter & Gamble was upgraded by Bank of America Merrill Lynch on Thursday to buy from neutral.

Shares of the big consumer staple, which have outperformed the S&P 500 this quarter amid market turmoil, should return 18 percent including dividends over the next 12 months, the firm predicts.

We have "increased confidence that early momentum in FQ119 can be sustained, returning PG to consistent sales and earnings beats," analyst Olivia Tong said in a note. "We see opportunity for EPS and valuation expansion, particularly as investors seek stability and defensiveness."

P&G rose 2.6 percent Thursday morning after the upgrade, to $96.49 a share. The firm's "price objective" is $108. Before the opening bell, shares were up 13 percent this quarter versus a 9 percent drop in the S&P 500 due to concerns about a slowing economy, rate hikes from the Federal Reserve and an ongoing trade battle with China.

"PG shares on average outperformed SPX by 25pts over the past four recessions," wrote Tong. "We are not calling for a recession in FY19, nor is that the BofAML house view. However, clearly PG results are showing momentum, which we expect to continue, while the defensive qualities of the name should resonate, particularly with active fund mgrs underweight."

WATCH: Why you shouldn't panic when stocks are getting slammed