Wednesday carried the stock market further into record territory, as investors celebrated favorable readings on U.S. gross domestic product, which rose an estimated 4.2% during the second quarter. The Nasdaq Composite led the way higher with gains of 1%, but a solid advance for the S&P 500 pointed to the broad-based nature of the late summer rally. Adding to the positive sentiment among investors was good news from several prominent companies. Square (SQ -1.97%), Glaukos (GKOS -1.82%), and Ballard Power Systems (BLDP -1.10%) were among the best performers on the day. Here's why they did so well.

Square gets another rave review

Shares of Square climbed 6% after the payment processing company got favorable comments from a prominent Wall Street analyst company. Analysts at Guggenheim said that Square is their new best idea, specifically citing it as their "highest conviction" stock in the financial technology space. Guggenheim also boosted its price target from $75 per share to $100, and with today's gain, Square is almost halfway to the new target already. Already, the company has proven that it can go beyond simple payment processing with specialized offerings like its Square for Restaurants platform and its Square Register point-of-sale device, and investors like what they've seen.

Square logo.

Image source: Square.

Glaukos get a competitive win

Glaukos stock soared more than 40% following a competitor's decision to take one of its rival products off the market. Novartis (NVS -0.55%) said that it would stop selling its CyPass Micro-Stent, which medical professionals had been using to during surgical procedures to help patients with a form of glaucoma. The problem was that the Novartis device wasn't having the results that the company had anticipated. That's bad news for Novartis, but for Glaukos, it means that more surgeons are likely to turn to its iStent Micro-Bypass product as an alternative, and investors anticipate a substantial uptick in revenue for the competing company as a result.

China wants fuel cells

Finally, shares of Ballard Power Systems finished higher by 16%. The maker of fuel-cell technology got good news from China, as it entered into a strategic collaboration with Weichai Power. Under the deal, Weichai purchased nearly a 20% stake in Ballard in exchange for a $163 million investment. In addition, Weichai will create a joint venture with Ballard to support fuel-cell vehicle development in China, as well as transferring technological intellectual property. Weichai committed to minimum manufacturing and supply figures, and previous strategic investor Broad-Ocean made a matching investment to keep its stake at just under 10%. Given Ballard's desire to enter more fully into the Chinese market, the Weichai deal marks a huge strategic advance for the fuel-cell specialist.