The price of coffee futures has been steadily on the rise, and analysts don't see any signs of this ascent stopping in the next few years. In fact, current prices are around $1.23 per pound, and some analysts suggest that coffee could reach $3 per pound in 2018. (See also: Commodities Trading: An Overview.)

What's behind the surge in coffee? A number of things, actually. Global demand is up considerably, and that is especially the case in the North American markets. Plus, recent weather patterns have disrupted the coffee harvest in South America (including El Niño). In fact, the effect on the Arabica harvest in Brazil is going to be devastating, according to some experts. (See also: El Niño Ended Without Helping Commodities Investors.)

The news for next year isn't much better, unfortunately. Rainfall of 300 percent to 400 percent above normal in Vietnam, the world's other leading coffee producer, is wreaking havoc on biennial coffee crops there as well.

That's bad news if you can't function without your morning cup of joe, since prices are set to soar, but it's good news if you're invested in coffee stocks. And if you're not currently in the market but think you might want to jump in, here are three top coffee stocks for you to consider near the end of 2017. Note: All figures were current as of December 20, 2017.

Starbucks Corporation (SBUX)

Starbucks has a presence in 75 countries worldwide and is a global leader in coffee roasting, marketing and retailing. With over 27,000 retail outlets, it's tough to avoid the chain's commanding presence. Starbucks has a market cap of $82.138 billion and raked in annual revenue of $21.7 billion in 2016 with a net income of $2.82 billion. At current share prices of $57.73, the stock is trading at about 29 times earnings.

The median 12-month price target of $61.95 implies potential upside of over 7 percent. Starbucks also paid dividends of $1 in 2017, a jump of nearly 25 percent over 2016's $0.80 per share. The stock is a favorite with major institutional investors including Vanguard, Fidelity and BlackRock. Starbucks stock is currently rated Outperform. (See also: Rise of Hipster Coffee Shops Won't Hurt Starbucks: Bernstein.)

The J. M. Smucker Company (SJM)

Smucker's might be a name you mostly associate with jellies and jams, but it also owns major coffee brands including Folger’s, Dunkin' Donuts (under a licensing agreement through 2034), Cafe Bustelo, Kava, Medaglia D’Oro and Pilon. With a market cap of $14.02 billion and annual revenue in 2016 of $7.42 billion, Smucker's has a significant presence in the U.S. coffee market. The stock is currently trading at $123.42, down 3.6 percent year-to-date; the decline is consistent with the rest of the food sector, which has lagged the broader market. However, forecasts are for improved profitability going forward. The stock price equates to a P/E ratio of almost 25. Net income nearly doubled in 2016 to $689 million from $345 million in 2015.

Dividends were up 6 percent last year to $2.65 per share, and in 2017, they reached $2.91, a 9 percent increase. The stock is currently trading above its 12-month median price target of $121.60, but it could still rise 14% if it reaches its high-end price target of $141. Investors will have to decide if now is a good time to buy the stock or if it makes more sense to wait for a pullback first. (See also: Smucker Hikes Dividend by 4% to Boost Shareholder Value.)

Dunkin' Brands Group, Inc. (DNKN)

With over 11,000 restaurants in 36 countries, Dunkin' Donuts is a solid player in the coffee space. The company has a market cap of $5.735 billion and annual revenues of nearly $830 million. At $63.49 per share, the stock trades at nearly 28 times earnings, and it's up more than 16 percent over the past year. Although Dunkin' licenses its coffee brand to Smucker's, the company sold over 1.7 billion cups of coffee in 2016, or roughly 30 cups every second – a significant revenue driver.

In 2016, earnings per share hit $2.26, up over 15 percent from 2015. Dunkin' is also a solid dividend stock, paying $1.29 per share in 2017, up 7 percent over the prior year. Dunkin' stock is currently trading at about $63.49, above its 12-month price target of $56.21 and at the upper end of its 52-week range of $50.26 to $64.44. (See also: Starbucks vs. Dunkin' Donuts: Comparing Business Models.)

Want to learn how to invest?

Get a free 10 week email series that will teach you how to start investing.

Delivered twice a week, straight to your inbox.