A lot of ink has been spilled about the market cap "race to $1 trillion."

Apple claimed the title yesterday, becoming the first U.S. publicly traded company to hit the 12-zero mark. 

However, you might be surprised to find that Apple is not the first company to achieve this distinction. Even more surprising: You've probably never heard of the company that beat it, PetroChina (PTR)

A man in a tie intently watching stock ticker numbers and graphs.

Image source: Getty Images.

Petro-who?

PetroChina is a state-controlled company in China, and when it went public, it was the country's top oil and gas producer. The company debuted on the Shanghai Stock Exchange on Nov. 5, 2007, and became the first company to top $1 trillion in valuation on its very first day of trading. This lofty achievement was fueled in part by the fact that the price of the stock nearly tripled on its inaugural day on the market. 

At the end of its first day of trading on the Shanghai exchange, PetroChina was valued at 54 times its estimated earnings per share, about triple the average valuation of 18 times among its oil company peers. 

The good times for PetroChina didn't last, however. A look today reveals a company that's a shadow of its former self, with a market cap of roughly $200 billion. What led to the spectacular rise and fall of this stock -- and are there any parallels that Apple investors should worry about?

Macroeconomic factors were at play

A number of issues contributed to the company's unprecedented ascent. PetroChina's shares were already traded in Hong Kong and New York, but had been unavailable to small investors in mainland China. It's telling that on the day shares gained as much as 191% on the Shanghai exchange, they fell about 6.6% on the Hong Kong exchange. So what led to the disparity?  

At the time, China was experiencing its fifth consecutive year of double-digit economic growth. During 2007, the country's economy expanded at 11.4%, on top of the 11.1% growth produced the year before. Additionally, between 2005 and 2008, China's middle class grew by 22%, adding 14.5 million net new members. At the same time, disposable income was rising, having skyrocketed 50% over the previous half-decade. 

Consumers in China had to contend with the low interest rates paid by state-owned banks as the sole outlet for their newfound wealth. China's stock market had soared since late 2006, drawing in many unseasoned investors. It's also important to remember that at the time of PetroChina's Shanghai debut, crude oil was nearing $100 per barrel. This combination of factors led to a surge in speculative investing that fed off the growing euphoria, leading to a classic bubble -- and PetroChina was in the right place at the right time.  

PetroChina's rise to dizzying heights was short-lived, as the company was soon hit with a double whammy: the stock market bubble that led to 500% market gains over two years was on the verge of an epic collapse that would wipe out 45% of its value in a matter of months, and the price of oil began its precipitous fall to below $34 per barrel.  

An iPhone, Apple Watch, and AirPods laying on a charging pad.

Trillion-dollar products? Image source: Apple.

No parallels here

It should be apparent by now that Apple's path to $1 trillion has been very different. While the U.S. equity market has been hot over the past decade, Apple doesn't trade anywhere near the frothy valuation PetroChina commanded at its peaks. Even after its historic rise, the tech company's shares can be scooped up at just 18 times trailing earnings and 17 times forward estimates. 

And the underlying businesses couldn't be more different. For 2007, PetroChina's revenue grew 21% year over year, but its profits grew by only 3.9%. 

Apple just reported results for its third quarter, which were impressive for a company of its size. Revenue grew 17% year over year to $53 billion, producing net income of $11.5 billion, up 32% compared to the prior-year quarter.  

While sales of iPhones were essentially flat compared to the year-ago quarter, Apple's pricing power shined through. The average selling price of the devices rose 19% year over year to $724, as consumers opted for the iPhone 8 and iPhone X, the company's higher-priced models. The company's services segment accounted for 18% of Apple's revenue in the third quarter, as the company moves to become less reliant on its flagship device. Apple doesn't operate in commodities -- it has a cash cow consumer hardware business and strong ecosystem that keeps customers coming back. 

Put simply, Apple is in far better shape than its trillion-dollar predecessor.