Apple Inc. shares rose to an all-time high on Friday, returning to record levels as investors looked past a year marked by turmoil from the U.S.-China trade war and uncertain demand for the iPhone, a product that Apple is moving away from, but which remains central to its business.

The stock rose as much as 1.6%, touching a new intraday peak of $233.82 at 9:58 a.m. in New York, exceeding the prior high set approximately 53 weeks ago.

The record is the culmination of a pronounced rally throughout 2019, a year that started on a highly bearish note, as Apple cut its revenue outlook for the first time in nearly 20 years. That move, taken in response to a weak outlook for iPhones upgrades and China’s economy, took the stock to its lowest level since April 2017.

Since then, however, shares have been on a nearly uninterrupted march higher, with the stock higher in seven of the past nine months, not including October’s month-to-date gain of about 4%. Apple has climbed more than 60% off its January low, returning its valuation back above $1 trillion.

Just as Apple’s weakness in the fourth quarter of 2018 was largely driven by concern over iPhone demand, the 2019 recovery has come on an easing of those fears. CEO Tim Cook recently told the German newspaper Bild that he “couldn’t be happier” with the launch of Apple’s recently released iPhone 11, and it was reported in early October that Apple had told suppliers to increase production. Analysts, in turn, have been growing more positive on demand, while also anticipating that next year’s model -- expected to be the first 5G version -- will be a blockbuster.

In other respects, Apple is a different company from when it was last trading at all-time highs. The Cupertino-based firm is reinventing itself as a services-based company, with such initiatives as streaming video, video games, and a credit card. In another change, the historically high-end gadget-maker unveiled these new businesses and products at less-aggressive prices.

Despite the newfound focus on services, the iPhone continues to be Apple’s keystone product. Nearly half of its third-quarter revenue came from the product, compared with the 21.3% that was derived from services.

Apple is expected to report fourth-quarter results on Oct. 30. Analysts are looking for earnings of $2.84 a share on revenue of $62.9 billion, according to data compiled by Bloomberg. That represents a decline of 2.6% for earnings and flat sales growth.

According to a Bloomberg MODL estimate, it will ship 41.9 million iPhones in the quarter, at an average selling price of $770.35. That would represent a year-over-year drop of 14.5% for shipments, and a 3.1% decline in average price.

This article provided by Bloomberg News.