Tuesday continued the stock market's upward momentum, with major benchmarks all posting solid gains and the tech-heavy Nasdaq Composite seeing an especially substantial advance. Earnings helped to lead the indexes higher, with good reports from several sectors of the market helping to build enthusiasm among investors that 2018 could extend the current bull run to a full decade even with the recent correction. Story stocks did particularly well, and Twitter (NYSE:TWTR), Shopify (NYSE:SHOP), and Arista Networks (NYSE:ANET) were among the best performers on the day. Here's why they did so well.

Morgan Stanley likes Twitter

Shares of Twitter jumped 11% after the social media giant earned an upgrade from analysts at Morgan Stanley. The Wall Street investment bank raised its rating on Twitter from underweight to equal weight, boosting its target price on the stock by $1 per share to $29. According to analysts, Twitter has made good progress in turning its business around by looking for better ways to monetize data and content. Fears of regulation of social media appear to be fading into the background, and Twitter's user growth figures look poised to rebound more sharply in future quarters. The microblogging stock is still risky, but investors have more to like about Twitter than they have in a while.

Stylized graphic of a blue bird singing, the corporate logo for Twitter.

Image source: Twitter.

Shopify investors hope for help from the Supreme Court

Shopify stock gained 8% as speculation about the fate of internet sales taxation swirled throughout the e-commerce industry. Until now, the Supreme Court has stood by 25-year-old precedent that a business must have a sufficient nexus, such as a physical presence, within a state in order for that state's government to impose sales taxes on transactions involving online purchases by residents. A new case from South Dakota will seek to reverse that precedent, but Shopify climbed on hopes among those following the case that the Supreme Court will rule against states in favor of leaving it to Congress to formulate a federal standard. Congress has been reluctant to make such moves in the past, and that would be good news for those seeking to preserve tax benefits for online retailers.

Arista bounces back

Finally, shares of Arista Networks climbed 7%. The cloud networking company had fallen sharply late last week following an analyst downgrade from Cleveland Research, which had argued that rising competition could hurt Arista's prospects. But today, another analyst company, JMP Securities, said that it believes Arista's pullback is a good chance to buy the stock on the cheap before it reports earnings early next month. Investors seem to be concerned about growth prospects, but some indications suggest that demand remains strong. If that's the case, then Arista should have a good report that could help its stock regain all of its lost ground.

Dan Caplinger has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Arista Networks, Shopify, and Twitter. The Motley Fool has a disclosure policy.