Hot on Apple (AAPL) - Get Report 's heels, Amazon (AMZN) - Get Report may be next to cross the big 13-figure mark.

Trading at $1,896.20 per share on Monday, Amazon's $914 billion valuation places it within a stone's throw of the big trillion-dollar milestone. Apple crossed 1 trillion in market cap on August 2.

Amazon's stock is up more than 58% since the beginning of this year, and according to a report from DA Davidson, what's driving it to new heights is a combination of cloud computing, third-party retail sales, and another underappreciated slice of Amazon's business -- advertising.

"For Amazon, the reason the stock has done so well is that the fastest-growing business has the highest margin: AWS," says Tom Forte of DA Davidson. "Amazon's profit pools -- cloud computing, third party retailers, and advertising -- are more profitable than people used to think they were."

In a recent report, Piper Jaffray estimated that Amazon's ad business, which leverages sellers' wanting to get more eyeballs on their wares, will haul in $8 billion in revenue this year and $16 billion by 2020, potentially exceeding Amazon Web Services in sales by 2021. Last quarter, Amazon reported an operating profit for AWS of $1.64 billion. and net sales of $6.1 billion for the quarter

Third-party merchant sales, which are more profitable than Amazon's own sales, are also poised to grow: They make up 53% of unit sales on Amazon's platform, a number that's grown steadily over time and is "on its way to 75%," Forte estimated.

If momentum continues for their retail business overall -- Amazon reported its biggest Prime Day yet, at $3.5 billion in total sales -- things are looking good for Amazon's prospects in retail. Prime Day sales are a predictor of retail performance over Thanksgiving and the holidays, noted a report from Adobe Analytics: "The 2017 season found that retailers that grew 10% in the first half of the year saw revenue increases during Thanksgiving weekend 2.1x over the average retailer. This pattern will likely continue into 2018, and we expect strong performance for the 2018 holiday season from the winners of Prime Day."

With any luck for Amazon, $1 trillion milestone will soon be a distant memory -- and $2 trillion closer than some investors might expect. 

Identifying ten market opportunities worth one trillion or more, the DA Davidson report notes that Amazon is in eight of the 10 markets. (Those are: Apparel, B2B ecommerce, consumer IoT, grocery, pharmacy, professional services, restaurants and stores.)

"Gas and travel are the two they're not in,"Forte added. "As they penetrate these categories, that'll be the path [to $1 trillion] on a short term basis, and on a long term basis, potentially the $2 trillion mark." 

Amazon and Apple are holdings in Jim Cramer's Action Alerts PLUS member club. Want to be alerted before Jim Cramer buys or sells these stocks Learn more now.