UBS raised its rating of AT&T to buy from neutral, citing "an overly negative outlook" and saying it expects a turnaround in operating performance.

"We believe the stock is trading near all-time low valuations (and the widest gap to Verizon)," UBS analyst John Hodulik said in a note Thursday.

A 6 percent decline in earnings before interest, taxes, depreciation and amortization (EBITDA) during the first half of 2018 is going to turn around, according to UBS. The firm now sees "2 percent EBITDA growth in 2019."

"Our work suggests the company will return to EBITDA growth ... given growth in Wireless & WarnerMedia and slower declines in Entertainment," UBS said. "We believe this inflection will provide upside to shares."

UBS also bumped up its price target on the stock, to $38 a share from $33 a share.

Shares of AT&T rose 1.9 percent Friday, a day after closing at $33.44 a share.