AMAZON.com’s days as the most expensive stock in the Standard & Poor’s 500 index are numbered, as CEO Jeff Bezos reaps profit from an $18.5bn spending spree designed to spur growth.

Amazon, whose stock has almost doubled in three years, trades at more than 700 times earnings, the highest ratio of any company in the S&P 500 — a ranking it has held for nine months.

As investments in digital content and cloud computing begin to pay off, that multiple is predicted to fall to 48 next year, making Amazon the 10th-most costly in the benchmark index, according to data.

Investors are betting on higher earnings as Amazon sells more movies, music and books for the Kindle Fire tablet and gets additional outside businesses to sell items from its storefront.

Operating margin is projected to widen this year after contracting for two straight years as the company funnelled money into warehouses and improved its ability to deliver computing services over the internet.

"Investors have shown a willingness to accept a rich valuation for a company that’s executing at a very high level and investing," says Tom Forte, an analyst at Telsey Advisory Group. "There’s a belief that at some point, you’ll have a margin recovery."

Seattle-based Amazon, founded by Mr Bezos in 1994, has evolved from an online bookseller into a peddler of everything from designer clothing to toy drones, tablet computers and digital downloads of books, movies and music.

After going public in 1997 and surviving the deflation of the dot-com bubble, Amazon has long enjoyed the patience of investors, who have accepted its push for future growth at the expense of more immediate profit.

That has led to a rising share price even as earnings have tumbled, resulting in a lofty price-to-earnings ratio. eBay, operator of the largest online marketplace, trades at 28 times earnings, while Apple, the world’s most valuable company, trades at a multiple of 10.

Amazon shares have soared 98% since the end of 2009, even as the company swung to a loss of $39m last year from $1.15bn in profit in 2010. Revenue surged 27% to $61.1bn last year and may gain another 24% this year, according to the average of analyst estimates. All this has made Mr Bezos the world’s 19th-richest person, with a fortune of $24.9bn, according to the Bloomberg Billionaires index.

Shareholders have given Amazon the benefit of the doubt, speculating that margin pressure is a result of strategic investments that will make Amazon more competitive down the road, said Mark Mahaney, an analyst at RBC Capital Markets.

"The market essentially normalised the company’s earnings and said, ‘I know margins are down from 6%, but there’s nothing structurally that’s caused the margins to go down,’" says Mr Mahaney. "The market has said, ‘I’m going to buy the stock before the margins come back up because I’m confident they will.’"

One of the biggest areas of investment is warehouses. Amazon is using these facilities to transform itself into a marketplace where other merchants can use its platform to sell their own products. Spending on warehous ing grew 58% in 2011, accelerating for a second straight year.

Amazon takes a commission — which is almost entirely profit — for each item sold and collects additional fees when the smaller retailers use its network of fulfillment centres to ship goods, Mr Mahaney says. The model is partially an emulation of eBay, which had 21% operating margins last year, and does not own any inventory sold on its site.

There is a risk that Amazon’s profit will fail to rebound as quickly as predicted. That may result in a decline in the stock price, something that could also reduce the company’s price-to-earnings ratio. Not all analysts agree that third-party sales will boost margins so soon. Doug Anmuth, an analyst at JPMorgan Chase, downgraded Amazon to a neutral rating on March 14, predicting Amazon’s gross profit growth will decelerate this year as sales by outside merchants slow.

A declining growth rate matters because that business segment, as well as the extra fees Amazon collects when the company handles shipping, accounted for 45% of gross profit last year, Mr Anmuth said.

On January 25, the online retailer traded at a record 788.86 times earnings, four days before reporting fourth-quarter revenue that missed analysts’ estimates. Amazon traded at 740 times trailing 12-month earnings at the close on March 28, and has held the highest multiple in the S&P 500 index since June 30, when it overtook Equity Residential.

Mr Bezos took a similar path eight years ago, when he ramped up investments in the company’s cloud-computing platform, which now dominates the market with an estimated 35% share, according to Barclays.

Technology and content expenses, which include cloud services, soared 59% to $451m in 2005, compared with a 10% rise the year before. In 2006, that number rose by 47%, more than any other expense line item — narrowing Amazon’s operating margin by more than 2 percentage points in two years to 3.63%. The shares fell 11% from the end of 2004 to the end of 2006.

In the four years that followed, the rate of spending on technology and content fell, and operating margin widened, remaining between 4% and 5% — something investors cite as proof that Amazon can be profitable when it is not investing in new ventures. The company’s stock recovered, more than quadrupling to $180 on December 31 2010.

"There’s a precedent for this, where Amazon went through a phase of hyperinvestment and then scaled back — and the stock performed incredibly well," Mr Forte says.

This time, the company is seeking to create greater efficiency by spending money to build warehouses closer to customers, which also help s to recruit smaller retailers to use its services. Amazon’s fulfillment costs are its largest, totalling about $14bn over the past three years. The retailer added 20 warehouses last year.

There are signs that profitability is already rebounding. In the fourth quarter, Amazon’s operating margin in North America, where it generates 57% of revenue, expanded to 5% from 2.9% a year earlier, buoying the stock.

Margin growth across the company may follow as early as the second quarter, data show.

Analysts on average estimate that operating margin will rise to 1.8%, compared with 0.83% in the same period last year and a projected 1.4% in the first quarter. The number could go as high as 2.8%, according to Mr Mahaney. Operating margin for the year is estimated to widen to 2.1% from 1.1% last year.

While Amazon sacrifices profit upfront to build its infrastructure, investors are predicting that the proximity to customers will temper shipping costs in the future. It is cheaper to send a product to New York, for example, from a warehouse in New Jersey than from a centre in Arizona.

Still, that extra spending money will not come soon. Amazon has to grapple with annual increases in shipping costs, even with its discounted rates for volume, Mr Forte says.

Amazon has also made deals with Sony, Time Warner’s Turner Broadcasting and Warner units, Walt Disney and other providers of movies and TV shows, ramping up competition with Netflix.

Although Amazon pays for the licensing agreements, the online retailer logs subsequent sales of the content as pure profit, similar to how it deals with books and music. Amazon is banking on that high-margin revenue to make its Kindle Fire tablet, which Mr Bezos has said he sells at cost, a success. Last week the company also announced the acquisition of book-recommendation site Goodreads, part of a push to get people to buy more titles on the Kindle e-reader.

Those efforts are projected to continue bolstering the company’s profit beyond this year, with analysts on average predicting an operating margin of 3.1% for next year.