Explore
Groups
No topics yet. Start the conversation.
Summary
User supplied summary for the plot
Return performance of leading AI-related stocks.
Description
The below description is supplied in free-text by the user
This plots shows the return of three AI darlings of 2025. Total return (%) since January 2025 adjusted for dividends and splits. Source: Yahoo Finance
๐ง PLTR
YTD Return: 104%
Palantir is selling AI driven software for government and defence.
๐ฆ NRG
YTD Return: 67%
NRG is providing energy solutions and has seen an AI driven demand surge.
๐ฅ STX
YTD Return: 341%
Seagate is providing data storage solutions for data hungry AI models.
Source code
import inspect
import sys
import yfinance as yf
import pandas as pd
from novem import Plot
# We show the returns of three AI Stocks that have performed strongly in 2025
AI_STOCKS = {
'PLTR': 'Palantir is selling AI driven software for government and defence. ',
'NRG': 'NRG is providing energy solutions and has seen an AI driven demand surge.',
'STX': 'Seagate is providing data storage solutions for data hungry AI models.'
}
ICONS = '๐ง๐ฆ๐ฅ'
# Function to get total return data from Yahoo Finance
def get_total_return(start_date):
data = yf.download(list(AI_STOCKS.keys()), start=start_date, end=None, auto_adjust=True)['Close']
total_return = data.divide(data.iloc[0]).multiply(100)
return total_return
total_return = get_total_return(start_date='2025-01-01')
# Code to make the novem plot
plt = Plot('ex-stock-return-ai')
plt.data = total_return-100
plt.type = 'line'
plt.name = 'Returns from AI darlings '
plt.shared = 'public'
plt.description = 'This plots shows the return of three AI darlings of 2025. Total return (%) since January 2025 adjusted for dividends and splits. Source: _Yahoo Finance_ '
for i, (ticker, story) in enumerate(AI_STOCKS.items()):
ytd = total_return[ticker].iloc[-1] - 100
plt.description += (
f"\n\n---\n\n"
f"### {ICONS[i]} {ticker}\n\n"
f"**YTD Return:** {ytd:.0f}%\n\n"
f"{story}\n"
)
plt.description += '\n\n## Source code\n\n'
plt.description += '\n\n```python' + ' ' + inspect.getsource(sys.modules[__name__]) + '```'