The major stock indices had notched solid gains by Monday afternoon, on pace to close out the final day of the third quarter on a high note. Comments from U.S. Treasury officials shooting down speculation that Chinese stocks could be blocked from U.S. exchanges likely played a role in Monday's rally.

Index

Change at 1:45 p.m. EDT

Dow Jones Industrial Average (^DJI 0.67%)

0.59%

S&P 500 (^GSPC 0.87%)

0.69%

Nasdaq Composite (^IXIC 1.11%)

0.82%

Data source: Yahoo! Finance.

Outperforming the market were two stocks that have been suffering from plenty of pessimism this year. Retailer Bed Bath & Beyond (BBBY) surged thanks to an analyst upgrade, and RV company Thor Industries (THO 1.93%) jumped as its margins and guidance impressed investors.

Bed Bath & Beyond snags an upgrade

It's hard to find many reasons to be optimistic about struggling retailer Bed Bath & Beyond. Sales are in decline; gross margin has been contracting since 2011 as the company became dependent on coupons to drive sales; and the bottom line has been in free fall. The company expects to produce adjusted earnings per share of around $2.11 this year, down from $5.10 per share in 2015.

These bleak trends haven't phased analysts at Wedbush. Wedbush upgraded Bed Bath & Beyond stock to outperform on Monday morning, boosting its price target from $14 to $16. Wedbush analyst Seth Basham believes that earnings could stabilize over the next couple of years, driven by the company's turnaround plan. Shares were up 6.6% at 1:45 p.m. EDT.

Bed Bath & Beyond is still looking for a permanent CEO, but the company has already laid out a plan to improve its performance. A refresh of close to 160 stores before the holiday season this year is expected to help sales in the short term, and a longer-term store renovation program is in the works. Bed Bath & Beyond is also working to cut costs. The company announced layoffs in July, and it plans to optimize its sourcing and increase its focus on private-label merchandise to boost margins.

Over the next 18 months, Bed Bath & Beyond expects to reduce its inventory by around $1 billion. It also plans to close underperforming stores as leases expire over the next two years, and it's working with advisors on options for its concepts beyond the core Bed Bath & Beyond brand.

Bed Bath & Beyond is set to report its second-quarter results on Oct. 2.

Thor Industries sees improvements

In the lead-up to an economic downturn, consumers aren't all that interested in buying recreational vehicles. While the timing of the next recession is still up in the air, Thor Industries is already feeling some pain. In the fourth quarter, North American towable RV sales tumbled 17.6%, while North American motorized RV sales dropped 8.1%.

Shares of Thor were up 15.2% at 1:45 p.m. EDT Monday despite these results, as investors focused on the company's margins and guidance instead.

An RV.

Image source: Thor Industries.

While sales were down in North America in the fourth quarter, gross margin was up thanks to product mix changes and improvements in material, labor, and warranty costs. Companywide gross margin was 14.4% in the fourth quarter, up from 13% in the prior-year period.

Thor expects revenue to grow strongly in fiscal 2020 thanks to the acquisition of EHG, a European RV company. In North America, the company expects near-term sales to be flat to modestly down as dealers continue to adjust inventory. While that outlook isn't great, it wasn't nearly as bad as it could have been, given the macroeconomic environment.

One caveat is that Thor's outlook assumes no significant macroeconomic changes. That's far from a sure thing. But for now, Thor is holding up better than expected.