Shares of Facebook inc. (FB), Amazon.com Inc. (AMZN) and Google parent Alphabet Inc. (GOOG) have been surging all year, but that isn't preventing SunTrust Robinson Humphrey from urging investors to buy the three stocks.

Initiating coverage of the digital media and internet markets, SunTrust analyst Youssef Sqauli acknowledged that all three companies’ shares are trading at lofty valuations but argued the long-term growth prospects for the companies warrants investors increasing their positions even though the stocks could experience some short-term volatility.

“A combination of superior growth relative to other parts of the economy, improving margins, and attractive valuations (adjusted for growth/margin prospects) should support demand for higher quality names over time, in our view," wrote Sqauli in a note to clients covered by Barron’s. “We remain early in the internet-ization of the global economy, in our view, and see material investment opportunities in large industries including Advertising and Media, Commerce and Travel.” (See also: FAANG's Stock Prices Can Continue To Climb Higher.)

Assessing Online Spending

The way SunTrust sees it, the growth trends for the internet companies enable them to post strong year-on-year results that in turn provide them the ability to maintain their higher equity valuations for “several years to come.” The investment thesis is based on the idea that the internet will continue to interject convenience in the lives of consumers, lower pricing, provide people with more choices and connect users, consumers and businesses around the globe. That in turn will drive more advertisers to online platforms, which bodes well for Facebook and Google.

The SunTrust analyst expects global online spending to increase 17.5% from last year, hitting $169 billion in 2017. That jumps to close to $200 billion in 2018, a 16.6% increase. The level of spending puts online ahead of print and radio and on par with television advertising spending. Calling it an “amazing feat” the analyst said the trends point to “a continuation of the secular shift of ad dollars to digital, as consumers shift their media consumption online, and as digital formats continue to prove more effective than offline channels (for both consumers and companies).” (See also: Why Facebook Stock at $230 Is Simply Too Rich.)

As for e-commerce, where Amazon is the undisputed leader, Sqauli said he remains “very bullish” on the outlook for online retail in the U.S. with sales increasing 14% year-over-year in both 2018 and 2019. The analyst said much of the growth is thanks to consumers embracing online shopping, a rapid increase in mobile commerce, the ease of going online to make purchases and category expansions on the part of online retailers namely Amazon which has been dipping its toes into all sorts of retail including groceries. “We expect this growth to continue for some time, driven by continued shift from offline to online, and tailwinds from mobile,” wrote the analyst.

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.