Stocks continued to move up on Tuesday, adding to the previous day's gains as favorable market conditions persisted. News from Hurricane Irma's aftermath was generally consistent with initial estimates, and the apparent stabilization of the geopolitical situation between the U.S. and North Korea had investors less concerned about the potential for provocation from either side. Major benchmarks were generally up between a quarter and a half percent, but some stocks benefited to an even greater extent from the favorable environment. Bed Bath & Beyond (NASDAQ:BBBY), Veritone (NASDAQ:VERI), and Southwestern Energy (NYSE:SWN) were among the best performers on the day. Below, we'll look more closely at these stocks to tell you why they did so well.

Bed Bath & Beyond gets comfortable

Shares of Bed Bath & Beyond climbed 5%, continuing their bounce from the eight-year lows they set late last month. The household goods retailer has been a victim of competition from the e-commerce arena, seeing its profits deteriorate in each of the first two quarters of the year. Traffic within its stores has been on the decline, and Bed Bath & Beyond hasn't been entirely successful in retaining customers through its own online shopping portal. Some investors nevertheless believe that the retailer is a good candidate for a takeover bid or could otherwise exceed the extremely low expectations that investors have for the company, and that seems to be motivating today's gains. Shareholders will get a better reading later this month when Bed Bath & Beyond reports its most recent quarterly financial results.

Bed Bath & Beyond storefront.

Image source: Bed Bath & Beyond.

Veritone makes a deal

Veritone stock jumped nearly 19% after the artificial intelligence and cognitive solutions company entered into an agreement with a key strategic partner. The company said that it had agreed to collaborate with Wazee Digital, a provider of cloud-based video management and licensing services. Under the deal, Wazee will offer Veritone's proprietary platform of advanced cognitive applications to Wazee's core customers. Further terms of the agreement weren't disclosed, but shareholders hope that the move will boost Veritone's exposure and lead to the companies doing more business in the future, especially as artificial intelligence becomes more important.

Southwestern climbs on energy strength

Finally, shares of Southwestern Energy picked up almost 6.5%. Crude oil prices were up modestly on the day, holding above the $48 per barrel level, but natural gas prices performed even better. Gas closed higher by about 2% for the second day in a row, approaching the $3 mark and leading some investors to expect better market conditions going forward. For Southwestern, natural gas is an important component of its overall business, and when the commodity does well, it creates an opportunity for shareholders to benefit. Much will depend on how the fall months shape up from a weather perspective, but for now, investors are more optimistic about Southwestern's immediate prospects.

Dan Caplinger has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.