(Photo: Reuters)

Microsoft's shares have risen sharply since last year, thanks to the early lead the company has taken in generative artificial intelligence through an investment in ChatGPT-maker OpenAI.

Microsoft's stock closed 0.5% higher, giving it a market valuation of 2.859 trillion USD. Shares of Apple closed 0.3% lower, giving the company a market capitalization of 2.886 trillion USD.

Microsoft and Apple have jostled for top spot over the years.