library(tidyverse)
library(lubridate)
library(scales)
library(ggrepel)
library(tidyquant)
library(jsonlite)
theme_set(theme_minimal())
invisible(Sys.setlocale("LC_TIME", "en_US.UTF-8"))
Yesterday was brutal. Nvidia, the highflyer of the last years, lost 17% in a single day. The Nasdaq (QQQ) lost 3%.
The catalyst was a new LLM model (or models) called R1 that seems to exceeded the performance of OpenAI o1. It’s said to have been much more computationally efficient and to have been trained using a GPU expenditure of max 6 million USD. And it’s open source being licensed under the MIT license. This put in question the perception that the future of LLM and AI in general depends on more and more expensive hardware, on which Nvidia has been capitalizing being a quasi-monopolist.
Let’s look who got deepseeked yesterday.
profiles <- tibble()
i <- 0
while(T) {
cat(i, "\n")
url <- paste0("https://financialmodelingprep.com/stable/profile-bulk?part=", i, "&apikey=", read_lines("data/key.txt"))
temp <- read_csv(url)
if (is.null(temp)) break
if (nrow(temp) == 0) break
if (i > 10) break
profiles <- bind_rows(profiles, temp)
i <- i + 1
}
profiles |> saveRDS("data/deepseeked/profiles.RDS")
profiles <- readRDS("data/deepseeked/profiles.RDS")
nasdaq <- profiles |>
filter(exchange == "NASDAQ",
!isEtf,
!isFund,
isActivelyTrading,
marketCap > 0,
!is.na(sector)) |>
mutate(r = changePercentage/100)
nasdaq |>
group_by(sector) |>
summarise(r = weighted.mean(r, marketCap), marketCap = sum(marketCap)) |>
ggplot(aes(x = sector, y = r, size = marketCap)) +
geom_point(aes(color = sector), alpha = 0.7) +
geom_text(aes(label = percent(r, accuracy = 0.1)), size = 3, box.padding = 0.5) +
geom_hline(yintercept = 0, linetype = 2) +
scale_size_area(max_size = 10, guide = F) +
scale_y_continuous(labels = scales::percent_format(accuracy = 1)) +
labs(title = "Nasdaq stocks getting deepseeked",
subtitle = "Market cap weighted average return on Jan 27, 2025",
x = "Sector",
y = "Return",
size = "Market Cap",
color = "Sector") +
theme(axis.text.x = element_text(angle = 45, hjust = 1),
legend.position = "none")
nasdaq |>
filter(sector == "Technology") |>
group_by(industry) |>
summarise(r = weighted.mean(r, marketCap), marketCap = sum(marketCap)) |>
ggplot(aes(x = industry, y = r, size = marketCap)) +
geom_point(aes(color = industry), alpha = 0.7) +
geom_text(aes(label = percent(r, accuracy = 0.1)), size = 3, box.padding = 0.5) +
geom_hline(yintercept = 0, linetype = 2) +
scale_size_area(max_size = 10, guide = F) +
scale_y_continuous(labels = scales::percent_format(accuracy = 1)) +
labs(title = "Nasdaq Technology sector by industry",
subtitle = "Market cap weighted average return on Jan 27, 2025",
x = "Industry",
y = "Return",
size = "Market Cap",
color = "Industry") +
theme(axis.text.x = element_text(angle = 45, hjust = 1),
legend.position = "none")
Semiconductors were hit the hardest. Semiconductors is also the industry with the highest market cap in the Technology sector. Biggest names in semiconductors are:
nasdaq |>
filter(sector == "Technology", industry == "Semiconductors") |>
arrange(desc(marketCap)) |>
select(symbol, companyName, marketCap, r) |>
ggplot(aes(x = marketCap, y = r, label = symbol)) +
geom_point(aes(color = r), size = 3) +
geom_text_repel() +
scale_x_log10(labels = scales::dollar) +
scale_y_continuous(labels = scales::percent_format(accuracy = 1)) +
labs(title = "Semiconductor stocks",
subtitle = "Market cap weighted average return on Jan 27, 2025",
x = "Market Cap",
y = "Return",
color = "Return") +
theme(legend.position = "none")
# same as list this time
nasdaq |>
filter(sector == "Technology", industry == "Semiconductors") |>
arrange(desc(marketCap)) |>
select(symbol, companyName, marketCap, r) |>
mutate(marketCap = scales::dollar(marketCap/10^6),
r = scales::percent(r, accuracy = 0.1)) |>
# kable and format r as percent and marketCap as dollar
knitr::kable(format = "html")
symbol | companyName | marketCap | r |
---|---|---|---|
NVDA | NVIDIA Corporation | $2,900,106 | -17.0% |
AVGO | Broadcom Inc. | $947,456 | -17.4% |
ASML | ASML Holding N.V. | $267,549 | -5.7% |
QCOM | QUALCOMM Incorporated | $190,181 | -0.5% |
AMD | Advanced Micro Devices, Inc. | $186,639 | -6.4% |
TXN | Texas Instruments Incorporated | $170,612 | 0.8% |
ARM | Arm Holdings plc American Depositary Shares | $153,404 | -10.2% |
AMAT | Applied Materials, Inc. | $141,873 | -6.5% |
ADI | Analog Devices, Inc. | $106,871 | -0.9% |
MU | Micron Technology, Inc. | $101,512 | -11.7% |
LRCX | Lam Research Corporation | $97,312 | -5.1% |
KLAC | KLA Corporation | $93,994 | -6.3% |
INTC | Intel Corporation | $87,511 | -2.6% |
MRVL | Marvell Technology, Inc. | $86,816 | -19.1% |
NXPI | NXP Semiconductors N.V. | $54,664 | 0.8% |
MCHP | Microchip Technology Incorporated | $30,733 | 1.5% |
MPWR | Monolithic Power Systems, Inc. | $29,307 | -11.4% |
ON | ON Semiconductor Corporation | $22,967 | -1.0% |
GFS | GLOBALFOUNDRIES Inc. | $22,876 | -1.2% |
TER | Teradyne, Inc. | $19,587 | -7.4% |
ENTG | Entegris, Inc. | $14,876 | -5.4% |
IMOS | ChipMOS TECHNOLOGIES INC. | $14,523 | -2.8% |
SWKS | Skyworks Solutions, Inc. | $14,327 | -1.8% |
ALAB | Astera Labs, Inc. Common Stock | $13,190 | -28.0% |
MTSI | MACOM Technology Solutions Holdings, Inc. | $9,092 | -15.2% |
QRVO | Qorvo, Inc. | $8,283 | -1.5% |
LSCC | Lattice Semiconductor Corporation | $7,635 | -3.4% |
OLED | Universal Display Corporation | $7,132 | -0.3% |
NVMI | Nova Ltd. | $6,460 | -11.9% |
RMBS | Rambus Inc. | $6,177 | -8.0% |
AMKR | Amkor Technology, Inc. | $5,850 | -7.7% |
CRUS | Cirrus Logic, Inc. | $5,283 | -2.0% |
TSEM | Tower Semiconductor Ltd. | $5,054 | -16.9% |
SMTC | Semtech Corporation | $4,941 | -21.5% |
SITM | SiTime Corporation | $4,343 | -24.9% |
SLAB | Silicon Laboratories Inc. | $4,287 | -2.5% |
ALGM | Allegro MicroSystems, Inc. | $4,274 | -4.6% |
CAMT | Camtek Ltd. | $3,879 | -15.1% |
POWI | Power Integrations, Inc. | $3,468 | -1.5% |
SYNA | Synaptics Incorporated | $3,267 | -2.2% |
AMBA | Ambarella, Inc. | $3,061 | -8.2% |
IPGP | IPG Photonics Corporation | $3,054 | -4.6% |
FORM | FormFactor, Inc. | $2,963 | -8.2% |
DIOD | Diodes Incorporated | $2,784 | -1.0% |
KLIC | Kulicke and Soffa Industries, Inc. | $2,310 | -5.0% |
ACLS | Axcelis Technologies, Inc. | $2,258 | -1.9% |
SIMO | Silicon Motion Technology Corporation | $1,699 | -3.7% |
HIMX | Himax Technologies, Inc. | $1,621 | -27.8% |
MXL | MaxLinear, Inc. | $1,606 | -17.8% |
UCTT | Ultra Clean Holdings, Inc. | $1,513 | -9.1% |
PLAB | Photronics, Inc. | $1,433 | -2.9% |
VECO | Veeco Instruments Inc. | $1,362 | -7.4% |
AAOI | Applied Optoelectronics, Inc. | $1,176 | -20.0% |
ACMR | ACM Research, Inc. | $1,078 | -7.4% |
COHU | Cohu, Inc. | $1,046 | -6.3% |
AOSL | Alpha and Omega Semiconductor Limited | $1,022 | -13.5% |
ICHR | Ichor Holdings, Ltd. | $904 | -8.5% |
INDI | indie Semiconductor, Inc. | $769 | -2.1% |
CEVA | CEVA, Inc. | $749 | -5.6% |
NVTS | Navitas Semiconductor Corporation | $559 | -13.3% |
LASR | nLIGHT, Inc. | $545 | -5.1% |
SKYT | SkyWater Technology, Inc. | $467 | -10.8% |
AIP | Arteris, Inc. | $414 | -14.5% |
XPER | Xperi Holding Corporation | $397 | -1.0% |
LAES | SEALSQ Corp | $390 | -7.2% |
AEHR | Aehr Test Systems | $353 | -4.3% |
POET | POET Technologies Inc. | $335 | -9.7% |
NVEC | NVE Corporation | $334 | -1.9% |
ATOM | Atomera Incorporated | $251 | -21.0% |
ICG | Intchains Group Limited | $245 | -0.2% |
MRAM | Everspin Technologies, Inc. | $136 | -4.5% |
QUIK | QuickLogic Corporation | $125 | -10.2% |
NA | Nano Labs Ltd | $121 | -7.5% |
AXTI | AXT, Inc. | $97 | -6.1% |
WKEY | WISeKey International Holding AG | $94 | -5.7% |
GSIT | GSI Technology, Inc. | $73 | -10.9% |
ASYS | Amtech Systems, Inc. | $73 | -3.8% |
WISA | WiSA Technologies, Inc. | $66 | -8.1% |
PXLW | Pixelworks, Inc. | $51 | -1.7% |
MOBX | Mobix Labs, Inc. | $46 | -8.8% |
EMKR | EMCORE Corporation | $28 | 0.3% |
LEDS | SemiLEDs Corporation | $11 | -11.0% |
PRSO | Peraso Inc. | $3 | -10.2% |
MOBXW | Mobix Labs, Inc. | $3 | -21.4% |
Nvidia has a market cap of still 2.9 trillion USD. It’s 3 times the size of the second biggest semiconductor company, Broadcom. It’s these two companies that impacted the Semiconductor industry the most yesterday.
But also ARM Holdings (-10%) and AMD (-6%) were hit, yet less than the average.
Here just the 10 largest names.
nasdaq |>
filter(sector %in% c("Technology", "Communication Services"),
industry != "Semiconductors") |>
arrange(desc(marketCap)) |>
select(symbol, companyName, sector, industry, marketCap, r) |>
head(10) |>
mutate(marketCap = scales::dollar(marketCap/10^6),
r = scales::percent(r, accuracy = 0.1)) |>
knitr::kable(format = "html")
symbol | companyName | sector | industry | marketCap | r |
---|---|---|---|---|---|
AAPL | Apple Inc. | Technology | Consumer Electronics | $3,456,612 | 3.2% |
MSFT | Microsoft Corporation | Technology | Software - Infrastructure | $3,230,901 | -2.1% |
GOOG | Alphabet Inc. | Communication Services | Internet Content & Information | $2,361,060 | -4.0% |
GOOGL | Alphabet Inc. | Communication Services | Internet Content & Information | $2,356,968 | -4.2% |
META | Meta Platforms, Inc. | Communication Services | Internet Content & Information | $1,665,859 | 1.9% |
NFLX | Netflix, Inc. | Communication Services | Entertainment | $415,442 | -0.6% |
TMUS | T-Mobile US, Inc. | Communication Services | Telecommunications Services | $256,967 | 1.3% |
CSCO | Cisco Systems, Inc. | Technology | Communication Equipment | $235,301 | -5.1% |
ADBE | Adobe Inc. | Technology | Software - Infrastructure | $190,927 | 0.7% |
PLTR | Palantir Technologies Inc. | Technology | Software - Infrastructure | $171,854 | -4.5% |
Apple gained 3% seem not to be affected. One guy has even run the Deepseek model (I believe the largest version of it) on Apple consumer hardware. More efficient models may be bad for big infrastructure but could potentially be good for consumer hardware like the iPhone etc.
Microsoft lost 2% and Google 4% which is substantial for companies of this size (especially of Google).
stocks <- tq_get(c("MSFT", "NVDA", "GOOG"))
stocks |> saveRDS("data/deepseeked/stocks.RDS")
stocks <- readRDS("data/deepseeked/stocks.RDS")
# histogram of daily returns
rets <- stocks |>
group_by(symbol) |>
mutate(r = adjusted/lag(adjusted)-1) |>
drop_na()
yesterday <- rets |>
slice_max(date)
rets |>
ggplot(aes(x = r)) +
geom_histogram(binwidth = 0.01, fill = "lightblue", color = "black", alpha = 0.7) +
scale_x_continuous(labels = scales::percent_format(accuracy = 1)) +
facet_wrap(~symbol) +
geom_vline(data = yesterday, aes(xintercept = r), color = "red") +
labs(title = "Daily returns since January 2015",
subtitle = "Jan 27, 2025",
x = "Daily returns",
y = "Count") +
theme_minimal()
tre <- tq_get(c("IEF", "TLT", "SHY"))
tre |> saveRDS("data/deepseeked/tre.RDS")
tre <- readRDS("data/deepseeked/tre.RDS")
tre_rets <- tre |>
group_by(symbol) |>
mutate(r = adjusted/lag(adjusted)-1) |>
filter(date >= as.Date("2024-01-01")) |>
mutate(p = cumprod(1+r)-1)
tre_rets |>
ggplot(aes(x = date, y = p, color = symbol)) +
geom_line() +
geom_vline(xintercept = as.Date("2025-01-24"), linetype = 2) +
scale_y_continuous(labels = scales::percent_format(accuracy = 1)) +
labs(title = "Treasuries",
subtitle = "Cumulative returns since Jan 1, 2024",
x = "Date",
y = "Cumulative return",
color = "Symbol") +
theme_minimal()
20-year treasury ETF TLT gained 1.2% yesterday.
Gold lost 1%. Bitcoin lost almost 9% from its high on Friday to the low on Monday. It’s currently trading about 2% lower than on Friday.