The stock market is at record highs. The S&P is nearly at an eye-popping level of 2,700 — with some analysts predicting that it will hit 3,000 by Saturday.

This bull market is the second longest ever with over eight years of rising stock prices. But will the good times keep rolling in 2018?

Wall Street gurus predict yes. Bank of America Merrill Lynch recently released a report saying there is plenty of "gas in the tank." Technical analysts from BoAML compare the chart for 2018 to the one from 2014, when the market gained 11 percent.

Below are five stocks to consider buying in 2018.

These five top stocks warrant close consideration because they come from Wall Street's top stock pickers. That's according to TipRanks, a service that ranks analysts based on two factors: the average return and success rate of their buy-sell recommendations over the last year.

In other words, these five analysts have the most profitable track records out of over 4,700 tracked analysts.

1) Applied Materials (AMAT)

Recommended by Craig Ellis from B.Riley FBR

Stock price as of Tuesday's close: $51

Ellis says Applied Materials can spike 39 percent in the next 12 months. The company supplies equipment, services and software for the manufacture of semiconductor chips. In turn, these chips are used for computers, smartphones, televisions and even solar products.

"We are impressed with high quality momentum into" the first half of 2018, Ellis says. He calls the stock a "diversified grower well positioned for multi-year gains," and he ramped up his price target $8 to $71 last month. Another stellar quarterly execution performance shows Applied Materials' new product engine is firing on all cylinders, the analyst concludes.

Overall, Applied Materials has only buy ratings from the Street. Thirteen analysts have rated the stock in the last three months with an average price target of $65 (27 percent upside).

2) Alexion Pharmaceuticals (ALXN)

Recommended by Eric Schmidt from Cowen & Co.

Stock price: $119

Schmidt says it will go to $180 a share, suggesting 51 percent upside potential.

He calls Alexion a "top large-cap pick" with a $1 billion opportunity in autoimmune disorder generalized myasthenia gravis. In late October, Alexion shares rallied after the Food and Drug Administration approved its Soliris therapy. Schmidt is now expecting a "robust launch" for the costly drug, which has an annual price tag per patient of $700,000.

In total, Alexion has scored 11 buy ratings from analysts in the last three months. These analysts are predicting that Alexion will rise 40 percent to reach $166.

3) First Data Corp (FDC)

Recommended by Darrin Peller from Barclays

Stock price right now: $16.55

Peller believes First Data can soar 45 percent to hit $24 in the coming year. One of the largest payment processing companies in the world, First Data offers retailers card and mobile payment acceptance capabilities for online and point-of-sale transactions.

Peller reiterated his buy rating on the stock on Dec. 5. He says his channel checks and "deep dive" analysis reveal that First Data's risk/reward ratio is "compelling" into 2018. The analyst sees 2018 as an inflection point for the company's joint venture channel growth.

This "strong buy" stock has received nine buy ratings and two hold ratings from analysts in the last three months. The average analyst price target of $21 suggests 27 percent upside from the current share price.

4) Constellation Brands (STZ)

Recommended by Vivien Azer from Cowen & Co.

Stock price right now: $225.51

Drinks giant Constellation Brands is a best idea for 2018 for analyst Vivien Azer. She reiterated her buy rating on the stock on Dec. 13 with a $243 price target (8 percent upside potential).

"Constellation remains our overall Top Pick and the best in class growth story among all of the alcoholic beverage companies under our coverage," Azer said. "We remain optimistic around the future growth prospects for Constellation and believe the company is taking all of the necessary steps to deliver sustained [double digit] EPS growth."

Six top analysts have published buy ratings on Constellation in just three months, according to TipRanks. With an average price target of $240, top analysts are looking for 6 percent growth from the current share price.

5) Owens Corning (OC)

Recommended by Robert Wetenhall from RBC Capital

Stock price right now: $92

Wetenhall is the most bullish analyst on Owens Corning, a global company that develops and produces insulation, roofing and fiberglass composites. He says the stock will go to $112 (22 percent upside) because of recent M&A activity and strong execution.

Indeed, on Dec. 4, Wetenhall upgraded Owens Corning from outperform to "top pick." He explained: "Our expectations for double-digit EBITDA growth, robust free cash flow generation and multiple expansion inform our Top Pick rating and give us confidence that the stock will rise even after strong year-to-date performance (+70%)."

Overall, Owens Corning has a "strong buy" top analyst consensus with a $94 average price target. This breaks down into four buy ratings and one hold rating in the last three months.