The S&P 500 is coming off a strong month of July, where the index rose by 5.5% as the markets continue to recover from the terrible March crash that sent many investors into a panic. Some stocks are doing much better than others because their companies are proving to be resilient during the coronavirus pandemic.

Below are three of this year's hottest stocks on the U.S. markets, with the laggard of the three being up a paltry 87% year to date. But considering how much progress the markets have made over the summer, investors may be wondering if the upward trajectory may be heading for a plateau and if it's time to take profits. Let's take a look at why these stocks did so well last month and whether they're still good buys right now.

1. Livongo

Livongo Health (NASDAQ:LVGO) is up more than 382% since the start of the year, leaving the S&P 500's nearly 4% return in the dust. The company's digital health technology helps people with chronic conditions like diabetes to stay connected to their doctors while keeping track of health information like blood glucose levels. Livongo has enterprise clients like employers and insurance companies that provide the health tools to their employees or insured people respectively for free because the service results in better health outcomes and lower healthcare spending.

Green arrows pointing up.

Image source: Getty Images.

Shares of Livongo took off in July after the company released its preliminary results for the second quarter. The Mountain View, California-based company told investors that its sales numbers would come in as high as $87 million for Q2, up from its previous forecast, which projected the top line to be within a range of $73 million to $75 million.

But even those numbers turned out to be too modest. When Livongo reported its Q2 results on Aug. 5, sales were $91.9 million, up 125% from the prior-year period. That's more than half of the $170.2 million that Livongo generated in all of 2019, and already more than double the $68.4 million in revenue it generated in the previous year. The one knock on Livongo is that it continues to be unprofitable, incurring a loss of $1.6 million in Q2; it's incurred a loss in each of the last four quarters.

The company has made recent headlines due to its Aug. 5 announcement of a merger with telehealth provider Teladoc Health. The companies expect the deal to close by the fourth quarter of this year, subject to shareholder approval. Investors seemed unhappy with the timing and terms of the deal, which would have Teladoc pay 0.592 shares of its stock for each share of Livongo, plus $11.33 in cash. So if you buy Livongo now, you could become a Teladoc shareowner later if the merger is successful.

Regardless of whether the deal will go through or not, the incredible growth Livongo has achieved suggests there's plenty of upside left for the stock, making it a great buy today.

2. Pinterest

Pinterest (NYSE:PINS) stock is up 87% year to date, as new users flocked to the social media platform and existing users spent more time on it during the coronavirus pandemic. Pinterest shares shot up in July after releasing its second-quarter results of fiscal 2020. On July 31, shares of the popular tech stock soared more than 36% just on earnings day. Although advertisers scaled back spending during the quarter to help keep costs down amid lockdowns, the San Francisco-based company still generated positive year-over-year sales growth of 4%.

What's even more impressive is that Pinterest's number of monthly active users reached 416 million, representing a 39% increase from the prior-year period. As people are staying home and looking for things to do, an app like Pinterest, which allows people to "pin" things that interest them to virtual boards and share and discover ideas online, has been one way to cure boredom.

The company also said that new users who began using the service amid lockdowns continued using it even after states eased restrictions. Although Pinterest's stock is trading at all-time highs, the company is still expecting lots of growth ahead. The company is forecasting that in the third quarter, sales will be up more than 30% from last year. 

3. Boston Beer

The Boston Beer Company (NYSE:SAM) up 118% year to date, also got a summer boost when it released its second-quarter results on July 23. The brewer has benefited from strong demand during the pandemic. Sales of $452.1 million during the quarter were up 42% year over year while net income rose by 116%.

That's astronomical growth given that in four years, from 2015 to 2019, the Massachusetts-based company's sales rose by just over 30% while its bottom line climbed by only 12%.

The company says there's been a shift as people are buying more hard seltzers, which Boston Beer is well-positioned to take advantage of with its popular Truly brand. The brewer has also noticed another trend: consumers moving toward popular brands. Boston Beer has benefited with double-digit sales growth of its popular Samuel Adams and Angry Orchard Crisp Apple brands in recent months.

Which stock should you buy today?

Here's a quick look at just how well all three stocks did in July:

LVGO Chart

LVGO data by YCharts

The thesis I'm least bullish on is that beer sales will continue to be strong amid the pandemic. As the recession drags on and people's budgets get tighter in the coming months, I wouldn't be surprised to see that trend slow down. For that reason, I wouldn't buy shares of Boston Beer now.

But beyond that, both Livongo and Pinterest look to be great buys today. If you're interested in long-term stability, then go with the healthcare stock. And if you need a tech stock to balance your portfolio, I'd give the edge to Pinterest. Either way, both of these stocks should produce some solid returns over both the long and short term.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.