(Bloomberg) -- Apple Inc. closed lower Monday, reversing gains that sent shares to an all-time high earlier in the day, after investors balked at the steep price of its newly-launched Vision Pro mixed-reality headset. 

Shares of the iPhone maker slipped 0.8% to close at $179.58 per share on Monday. The stock had risen as much as 2.2% to a record high at the kickoff to its annual Worldwide Developers Conference. But that rally proved short-lived, with the shares gradually paring gains into the afternoon session before abruptly turning lower, falling to session lows after Apple announced the headset would come early next year, carrying a $3,499 price tag.

Read more: Apple Debuts $3,499 Headset in Test of Its Marketing Might

Apple is still up 38% year to date as a beneficiary of the rotation back into technology stocks, a remarkable turnaround for a stock that sank to a 19-month low in the first trading days of the year.

The stock has risen consistently throughout 2023, with investors viewing it as a safe haven in periods of economic risk or uncertainty given the strength of its balance sheet, its capital-return program, and its durable revenue streams. In addition, its recent results topped expectations, thanks to a rebound in its iPhone and growth in its Services business.

“Even with how much it has risen, it still feels like a quality company, with a lot of cash, continued innovation, a fortress balance sheet, and a large customer base upgrading their products,” said Devon Drew, chief executive officer of DFD Partners. “It should continue to grow, but it can also weather any storm. That means it works in both risk-on and risk-off environments, and that makes me very excited to own it.” 

Apple’s ascent follows Nvidia Corp. soaring in 2023 on optimism surrounding artificial intelligence, briefly driving the chipmaker above the $1 trillion market value level. 

Read more: Apple’s Relentless Rally Puts $3 Trillion in View: Tech Watch

--With assistance from Farah Elbahrawy, Taryana Odayar and Carmen Reinicke.

(Updates stock moves throughout and adds comments.)

©2023 Bloomberg L.P.