By Jules Rimmer and William Gavin

SpaceX briefly surpassed Microsoft on an intraday basis before surrendering some gains

SpaceX's stock is on track to log its third session in a row of gains.

SpaceX went public only a few days ago, but it has already overtaken Amazon.com in the rankings of the world's largest companies.

Shares of the rocket-launch company (SPCX) were up 5% when the market closed on Tuesday, putting SpaceX's market capitalization at $2.66 trillion. That was just enough growth to surpass Amazon (AMZN) and its $2.65 trillion market cap, according to Dow Jones Market Data.