TripAdvisor's (NASDAQ:TRIP) 60% stock price spike last year made it one of the best-performing stocks in the entire S&P 500. In fact, the travel booking specialist never trailed the market in 2018, and at one point was up over 90% on the year, before the broader stock sell-off dragged shares lower in December.

Let's take a look at why investors rewarded the stock last year and what that might say about the business's prospects.

Blowing past low expectations

Investors had rock-bottom expectations for the business heading into the year. TripAdvisor shares sat out the 2017 stock rally by collapsing 26% while the broader market surged 20% higher. Approaching 2018, CEO Steve Kaufer and his team had just lowered their sales outlook for the second straight quarter while predicting further weakness ahead. This contributed to a sour mood for most investors around the company's travel booking business.

A couple on vacation looking out at the sea.

Image source: Getty Images.

Operating results went on to outperform those bleak forecasts. A key turning point came early in the year when TripAdvisor shifted strategies, choosing to focus on improving profitability. This move made it harder for its core hotel-booking business to grow, but it resulted in an immediate boost in operating margin. The profit declines of the past two years were "unsatisfactory," management said, and they were determined to end the slide in 2018.

The next few earnings reports were characterized by an improving sales picture and much-better financial results. Cuts in marketing spending helped cash flow jump 37% in the second quarter, for example, as profitability continued rising. TripAdvisor's hotel segment still shrank in the third quarter, but revenue per shopper, a key growth metric, expanded for the first time in over a year. Hotel profits surged 54% for the period, and the company succeeded in capturing more market share in the emerging attractions-booking business, too.

Looking ahead

Executives' latest outlook calls for the core hotel segment to finally return to sales growth in the fiscal fourth quarter as the non-hotel business expands by about 25%. Adjusted earnings should rise at a healthy clip to outperform the break-even results that TripAdvisor initially projected for fiscal 2018. Investors will see all of these official numbers when the company posts its year-end results in mid-February.

Modest sales and earnings gains might not seem particularly impressive for a growth stock, but given the low expectations, these results constitute great news. TripAdvisor's core hotel business has stabilized, it is attacking a potentially huge new market in attractions and restaurants, and the overall enterprise is on a much stronger financial footing today than it was a year ago.

These wins give Kaufer and his team lots of flexibility heading into a new year. They have plenty of cash they can direct toward high-return initiatives such as optimizing the mobile browsing experience and developing tools to help users make the most out of their vacations while traveling. Better sales results and improving finances might even allow for stepped-up marketing investments now that the company has found more efficient avenues for driving traffic to its sites.

Ultimately, 2018's rally just put the stock about even with the market over the past two years. It's likely that trends this year will land somewhere between the returns that investors saw in 2017 and 2018. The good news for shareholders is that TripAdvisor has healthy momentum today. But there's a flip side to that: Expectations are much higher for the business at the outset of 2019, and so it won't be as easy to surprise Wall Street with positive operating metrics.

Check out the latest TripAdvisor earnings call transcript.

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.