Raymond James is getting more optimistic on Bed Bath & Beyond shares due to the improving economy.

The firm raised its rating to market perform from underperform for Bed Bath & Beyond shares, predicting the retailer will report sales above expectations in its fiscal second quarter.

We are "expecting above-consensus same-store sales [for Bed Bath & Beyond] … Our rating upgrade simply underscores our view that sales results for F2Q18 now seem more likely to reflect a better consumer sales environment than previously expected," analyst Budd Bugatch said in a note to clients Monday. "If that happens as we hypothesize, we think BBBY is likely to trade higher in reaction to its F2Q18 report, even in the face of down y/y earnings. We, therefore, see this as a near-term 'trading opportunity.'"

Bed Bath & Beyond shares rose 6 percent Monday after the report.

The analyst noted Census Bureau monthly sales reports for the retail industry have surged to more than 6 percent growth in July and August versus 3 percent to 4 percent range last year for the two months.

"To wit, in recent reporting, investors have seen a series of positive sales reports from a wide number of retailers, specialty and mass," he said.

The company's stock is underperforming the market this year. Its shares are down 17.8 percent this year through Friday versus the S&P 500's 8.7 percent gain.

Bugatch does not have a price target for the retailer's shares.

Bed Bath & Beyond is slated to report its fiscal second-quarter earnings on Wednesday, Sept. 26.