The Beginner’s Guide to Investing

If you invested $1,000 in Starbucks 10 years ago, here's how much you'd have now

Analysts are generally optimistic about Starbucks stock. The company recently announced an expansion of its product delivery services, which it aims to offer through nearly one-fourth of its U.S.-operated stores. And the coffee giant just reported better-than-expected sales and earnings growth.

Shares jumped 10 percent after the company's fourth-quarter earnings results in November and, although it didn't hold onto all of those gains, the stock is up nearly 8 percent since market lows in December.

If you had invested in Starbucks 10 years ago, you'd be doing nicely, too: A $1,000 investment in 2009 would be worth more than $16,000 as of Jan. 23, according to CNBC calculations.

While the company's stock has performed well over the years, though, any individual stock can over- or under-perform and past returns do not predict future results.

CNBC: Starbucks stock as of Jan. 23, 2019

Not all experts are feeling good about Starbucks.

Investment bank and financial-services company Goldman Sachs recently downgraded Starbucks stock from "buy" to "neutral" amid concerns over the ongoing U.S.-China trade war and weaknesses in China's economy. Starbucks has 3,600 stores in China.

While it isn't completely clear what effect the trade war might have on U.S. brands there, China could cut its 2019 GDP growth target from 6.5 percent to 6 percent, according to Reuters.

And some Wall Street analysts warn that companies like Starbucks and Apple — whose shares took a hit this month after warning iPhone sales could fall short — could face an "informal boycott" by some Chinese consumers.

Though Starbucks stock has wavered in recent months, shares are up nearly 38 percent from a 52-week low in June.

And the company recently announced it will expand its delivery service to include some stores in San Francisco, Boston, Chicago, Los Angeles, New York and Washington in the coming weeks. Starbucks says 95 percent of its core menu will be available through food-delivery platform Uber Eats.

Carter Worth, head of technical analysis at market-research firm Cornerstone Macro, notes the company's resilience: "What the stock has done is pivoted right back literally to the point of the beat and has started to come to life," he said on CNBC's "Options Action."

"The presumption is, on its next earnings, [Starbucks] gaps again as it did last quarter and the stock clears all of these hurdles — I'm a buyer."

If you're looking to invest in Starbucks, or in the stock market in general, expert investors such as Warren Buffett, Mark Cuban and Tony Robbins suggest you start with index funds, which hold every stock in an index, offer low turnover rates, attendant fees and tax bills. They also fluctuate with the market to eliminate the risk of picking individual stocks.

Like this story? Subscribe to CNBC Make It on YouTube!

Don't miss: My daily Starbucks habit costs me $2,300 a year—here's why I refuse to stop