Stocks began August on a optimistic note, with the Dow Jones Industrial Average (DJINDICES: ^DJI) finishing at a record high and the S&P 500 (SNPINDEX: ^GSPC) closing up, but just short of a record. Today's stock market Index Percentage Change Point Change Dow 0.33% 72.80 S&P 500 0.24% 6.05 Data source: Yahoo! Finance. Financial stocks and utilities were strong today. The Financial Select Sector SPDR ETF (NYSEMKT: XLF) rose 0.7% and the Utilities Select SPDR ETF (NYSEMKT: XLU) gained 0.6%. Two individual stocks saw big price movements after their companies reported earnings: shares of Cognex Corporation (NASDAQ: CGNX) rose sharply and Under Armour (NYSE: UA) (NYSE: UAA) slumped. Image source: Getty Images. Cognex turns in another strong quarter Machine vision supplier Cognex reported sharply higher sales and profit for its second quarter last night, and the stock soared almost 11%. Revenue was $173 million, up 17% from the period a year before, and earnings per share jumped 26% to $0.63. Analysts were expecting the company to earn $0.54 per share on sales of $170 million. Sales were particularly strong into the logistics market, where the company says it has a 15% to 20% market share and expects sales to grow at a 50% annual growth rate for the foreseeable future. Looking forward, Cognex projected Q3 sales between $250 million and $260 million, driven by a large ramp-up of production in the consumer electronics industry. Analysts had been expecting sales of $188 million. "Activity at Cognex is at a higher level now than ever before," said CEO Robert J. Willett in the press release. "We are seeing strong demand across a broad range of geographies and markets. It is very gratifying to see that our investments in engineering and sales continue to pay off." Cognex is reaping the benefits of increasing automation in some of the most rapidly growing segments in industry. In the earnings call, Willett said that the largest segment of its logistics sales is e-commerce fulfillment, as online shopping is driving the need for more and more highly automated warehouses. He also commented that upcoming products using OLED displays are big growth drivers for Cognex's consumer electronics businesses, since OLED display manufacturing requires a high degree of automation due to the need for precise alignment of fragile layers. Investors are clearly seeing the potential for continued high growth as Cognex rides some powerful trends. Under Armour gets marked down on disappointing growth Under Armour reported second-quarter results that beat analyst expectations, but the company also lowered its outlook for the rest of the year and announced a restructuring program. Investors didn't look kindly on the guidance from the struggling sportswear specialist: Class A shares fell 8.6%, while Class C shares lost 10.4%. Revenue was $1.1 billion, up 9% over last year and matching Wall Street expectations. The company lost $0.03 per share, less than the $0.06 loss analysts were expecting. Guidance for full-year revenue growth was given as 9% to 11%, revised downward from 11% to 12%. The growth slowdown was focused in North America, by far the company's biggest market. Sales growth there was a paltry 0.3%, but international revenue grew a strong 57% and now comprises 22% of the total. Apparel revenue was up 11% and accessory revenue increased 22%, but footwear continues to be a challenge, with sales declining 2%. The direct-to-consumer channel was a bright spot, with sales up 20%. "As we stand up our category management structure within a consumer-led approach, we intend to meaningfully increase our go-to-market speed and amplify our digital capabilities," founder and CEO Kevin Planck said, addressing the restructuring. "We've identified a number of areas to enhance our operational capabilities, drive process improvement, and gain greater efficiencies." Under Armour expects to take $110 million to $130 million of restructuring charges in 2017 as it reorganizes to emphasize category management, take out costs, and focus on growth areas like international and digital sales. The market, meanwhile, continues to be skeptical until it sees a revival of the company's sales growth. Offer from The Motley Fool: The 10 best stocks to buy nowMotley Fool co-founders Tom and David Gardner have spent more than a decade beating the market. In fact, the newsletter they run, Motley Fool Stock Advisor, has tripled the S&P 500!* Tom and David just revealed their ten top stock picks for investors to buy right now. Click here to get access to the full list! *Stock Advisor returns as of August 1, 2017.Jim Crumly owns shares of Under Armour (C Shares). The Motley Fool owns shares of and recommends Cognex, Under Armour (A Shares), and Under Armour (C Shares). The Motley Fool has a disclosure policy.