NEW YORK (AP) -- Shares of Amazon.com hit an all-time high Friday after the world's largest online retailer announced another quarterly loss, but posted higher-than-expected revenue.

The spark: The Seattle-based company's loss totaled $41 million, or $0.09 per share, for the quarter that ended in September, matching analyst expectations. Revenue jumped 24% to $17.09 billion, while analysts polled by FactSet expected $16.76 billion.

Amazon said it expects revenue for its fourth quarter to be between $23.5 billion and $26.5 billion, bracketing analysts' prediction of $25.88 billion.

The big picture: Steady profits have proven elusive for Amazon as it spends heavily on filling orders, marketing and technological improvements and innovations. But investors saw the fourth-quarter revenue forecast as a sign of confidence and optimism ahead of the key holiday shopping season.

The analysis: Benchmark analyst Daniel Kurnos backed his "Buy" rating for the stock and boosted his price target by $50 to $400, citing the better-than-expected quarterly results.

He added that he also thinks that Amazon puts out the best tablet computer for the money, which is helping speed up adoption of its Prime service, particularly as the company adds original instant video content.

Cantor Fitzgerald's Youssef Squali noted that better-than-expected sales came despite signs of a slowdown in U.S. online commerce, boosted by strong consumer demand for its products.

But he noted that the company continues to expand and innovate, which means it is spending money on investments, limiting its near-term ability to boost profitability.

The shares: Up $34.15, or 10%, to $366.36 in morning trading, after peaking at $367.67 earlier, marking an all-time high for the stock.