Project Overview

This project explores whether consumer search interest is related to stock performance for Netflix and Roku. Using weekly stock data and Google Trends from 2023 to 2026, the analysis examines whether changes in online attention correspond with movements in stock returns for these two streaming companies. The goal is to better understand how shifts in consumer interest may influence investor behavior and market outcomes.

nflx_weekly <- read.csv("nflx_weekly.csv")
roku_weekly <- read.csv("roku_weekly.csv")
nflx_weekly$Date <- as.Date(nflx_weekly$Date, format = "%m/%d/%y")
roku_weekly$Date <- as.Date(roku_weekly$Date, format = "%m/%d/%y")
nflx_weekly$Date <- as.Date(nflx_weekly$Date, format = "%m/%d/%y")
roku_weekly$Date <- as.Date(roku_weekly$Date, format = "%m/%d/%y")
nflx_weekly <- nflx_weekly[order(nflx_weekly$Date), ]
roku_weekly <- roku_weekly[order(roku_weekly$Date), ]
nflx_weekly$return <- c(NA, diff(log(nflx_weekly$Close)))
roku_weekly$return <- c(NA, diff(log(roku_weekly$Close)))
nflx_ret <- nflx_weekly[, c("Date", "return")]
colnames(nflx_ret) <- c("Date", "nflx_return")

roku_ret <- roku_weekly[, c("Date", "return")]
colnames(roku_ret) <- c("Date", "roku_return")

combined_weekly <- merge(nflx_ret, roku_ret, by = "Date")

head(combined_weekly)
##         Date nflx_return roku_return
## 1 2023-01-01          NA          NA
## 2 2023-01-08  0.06774865  0.06882906
## 3 2023-01-15  0.05328466  0.15323283
## 4 2023-01-22  0.02866985  0.03042576
## 5 2023-01-29  0.05196898  0.06734999
## 6 2023-02-05  0.01411944  0.11452609
summary(combined_weekly)
##       Date             nflx_return         roku_return       
##  Min.   :2023-01-01   Min.   :-0.114729   Min.   :-0.285597  
##  1st Qu.:2023-10-18   1st Qu.:-0.021877   1st Qu.:-0.042283  
##  Median :2024-08-04   Median : 0.003634   Median : 0.004015  
##  Mean   :2024-08-04   Mean   : 0.007274   Mean   : 0.005265  
##  3rd Qu.:2025-05-21   3rd Qu.: 0.037440   3rd Qu.: 0.046971  
##  Max.   :2026-03-08   Max.   : 0.176257   Max.   : 0.408124  
##                       NA's   :1           NA's   :1
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(ggplot2)

# Merge price data
price_combined <- merge(
  nflx_weekly[, c("Date", "Close")],
  roku_weekly[, c("Date", "Close")],
  by = "Date",
  suffixes = c("_nflx", "_roku")
)

# Normalize both to 100 at start
price_combined <- price_combined %>%
  arrange(Date) %>%
  mutate(
    nflx_index = 100 * Close_nflx / first(Close_nflx),
    roku_index = 100 * Close_roku / first(Close_roku)
  )

# Plot normalized comparison
ggplot(price_combined) +
  geom_line(aes(x = Date, y = nflx_index, color = "Netflix"), linewidth = 1) +
  geom_line(aes(x = Date, y = roku_index, color = "Roku"), linewidth = 1) +
  labs(title = "Normalized Weekly Stock Performance (Base = 100)",
       x = "Date",
       y = "Index (Base 100)",
       color = "Company") +
  theme_minimal()

Summary of Findings - Yahoo Finance

Looking at the weekly stock data from January 2023 to March 2026, Netflix clearly outperformed Roku over this period. After normalizing both stocks to start at the same base value, Netflix shows a much stronger overall upward trend, especially throughout 2024 and into 2025. While both companies experienced volatility, Roku’s price movements were more uneven, with sharper drops and slower recoveries at certain points. In contrast, Netflix displayed more sustained growth, even though it also had periods of fluctuation. These differences in performance may reflect variations in investor confidence, brand strength, or overall market perception, which can be factors that could potentially be explored further by examining consumer search interest data.

trends_data <- read.csv("trends_weekly.csv", skip = 1)

head(trends_data)
##   X1.1.23 X75 X13
## 1  2/1/23  74  12
## 2  3/1/23  66  11
## 3  4/1/23  73  10
## 4  5/1/23  64  11
## 5  6/1/23  70  12
## 6  7/1/23  74  12
# Rename columns
colnames(trends_data) <- c("Date", "Netflix_search", "Roku_search")

# Convert Date properly
trends_data$Date <- as.Date(trends_data$Date, format = "%m/%d/%y")

# Convert search columns to numeric
trends_data$Netflix_search <- as.numeric(trends_data$Netflix_search)
trends_data$Roku_search <- as.numeric(trends_data$Roku_search)

head(trends_data)
##         Date Netflix_search Roku_search
## 1 2023-02-01             74          12
## 2 2023-03-01             66          11
## 3 2023-04-01             73          10
## 4 2023-05-01             64          11
## 5 2023-06-01             70          12
## 6 2023-07-01             74          12
library(ggplot2)

ggplot(trends_data) +
  geom_line(aes(x = Date, y = Netflix_search, color = "Netflix"), linewidth = 1) +
  geom_line(aes(x = Date, y = Roku_search, color = "Roku"), linewidth = 1) +
  labs(title = "Weekly Google Search Interest (US)",
       x = "Date",
       y = "Search Interest (0-100)",
       color = "Company") +
  theme_minimal()

Summary of Findings - Google Trends

From January 2023 to March 2026, Google Trends data shows that Netflix consistently generated significantly higher search interest in the United States compared to Roku. Netflix’s search index generally ranged between 60 and 75, with occasional spikes reaching 100, indicating periods of heightened public attention. In contrast, Roku’s search interest remained relatively low and stable, typically fluctuating between 8 and 12. While both brands experienced modest variation over time, Netflix demonstrated stronger and more sustained visibility in online search behavior. This gap in consumer attention suggests that Netflix maintains a higher level of brand awareness and engagement, which may help explain its stronger relative stock performance during the same period.