Introduction

Background

The technology sector has experienced remarkable growth and volatility over the past decade. This analysis examines the stock price performance of eight prominent technology companies from 2016 to 2024, a period marked by significant market events including the COVID-19 pandemic, supply chain disruptions, and the AI revolution.

Companies Analyzed

This study focuses on the following stocks:

  • AAPL (Apple Inc.) - Consumer electronics and services
  • AMD (Advanced Micro Devices) - Semiconductor manufacturing
  • MU (Micron Technology) - Memory and storage solutions
  • NIO (NIO Inc.) - Electric vehicle manufacturer
  • NVDA (NVIDIA Corporation) - Graphics processing and AI chips
  • PRPL (Purple Innovation) - Sleep technology and mattresses
  • SNAP (Snap Inc.) - Social media platform
  • TSLA (Tesla Inc.) - Electric vehicles and energy solutions

Objectives

The primary objectives of this analysis are to:

  1. Visualize the historical price trends for each stock
  2. Compare relative performance through normalized pricing
  3. Identify patterns and volatility across different technology sectors

Data Collection and Preparation

# Load required libraries
library(quantmod)
library(tidyverse)
library(knitr)
library(scales)
# Define stock symbols
stocks <- c("AAPL", "AMD", "MU", "NIO", "NVDA", "PRPL", "SNAP", "TSLA")

# Download stock data from 2016 to 2024
start_date <- "2016-01-01"
end_date <- "2024-12-31"

# Initialize empty dataframe
stock_data <- data.frame()

# Download data for each stock
for (stock in stocks) {
  tryCatch({
    data <- getSymbols(stock, src = "yahoo", from = start_date, to = end_date, auto.assign = FALSE)
    df <- data.frame(
      Date = index(data),
      Price = as.numeric(Cl(data)),
      Stock = stock
    )
    stock_data <- rbind(stock_data, df)
  }, error = function(e) {
    message(paste("Error downloading", stock))
  })
}

# Create normalized data (base = 1)
df_norm <- stock_data %>%
  group_by(Stock) %>%
  mutate(Price = Price / first(Price)) %>%
  ungroup()

Summary Statistics

The table below shows key statistics for each stock during the analysis period:

Stock Performance Summary (2016-2024)
Stock Start Date End Date Starting Price Ending Price Min Price Max Price Total Return
AAPL 2016-01-04 2024-12-30 $26.34 $252.20 $22.58 $259.02 857.6%
MU 2016-01-04 2024-12-30 $14.33 $85.31 $9.56 $153.45 495.3%
AMD 2016-01-04 2024-12-30 $2.77 $122.44 $1.80 $211.38 4 320.2%
TSLA 2016-01-04 2024-12-30 $14.89 $417.41 $9.58 $479.86 2 702.5%
NVDA 2016-01-04 2024-12-30 $0.81 $137.49 $0.63 $148.88 16 889.8%
PRPL 2016-01-04 2024-12-30 $9.66 $0.83 $0.56 $40.05 -91.4%
SNAP 2017-03-02 2024-12-30 $24.48 $10.86 $4.99 $83.11 -55.6%
NIO 2018-09-12 2024-12-30 $6.60 $4.38 $1.32 $62.84 -33.6%

Analysis and Visualization

Normalized Stock Price Comparison

By normalizing all stock prices to a base value of 1 at the start of 2016, we can directly compare the relative performance and growth rates across all companies, regardless of their actual share prices.

# Plot 2: Normalized stock prices
p1 <- ggplot(df_norm, aes(Date, Price, color = Stock)) +
  geom_line(size = 0.8) +
  labs(title = "Normalized Stock Prices (2016-2024)",
       y = "Normalized Price (Base = 1)",
       x = "Date",
       subtitle = "All stocks normalized to 1.0 at start of 2016 for performance comparison") +
  theme_minimal() +
  theme(
    plot.title = element_text(hjust = 0.5, size = 16, face = "bold"),
    plot.subtitle = element_text(hjust = 0.5, size = 11, color = "gray30", margin = margin(b = 15)),
    legend.position = "right",
    legend.title = element_text(face = "bold"),
    panel.grid.minor = element_blank()
  ) +
  scale_y_continuous(labels = comma)

# Display the plot
p1

Performance Rankings

Final Normalized Price Rankings (Higher = Better Performance)
Stock Final Normalized Price
NVDA 169.90
AMD 44.20
TSLA 28.03
AAPL 9.58
MU 5.95
NIO 0.66
SNAP 0.44
PRPL 0.09

Conclusion

Key Findings

This analysis of eight technology stocks from 2016 to 2024 reveals several important insights:

  1. NVIDIA’s Dominance: NVDA emerged as the top performer, driven by the AI boom and demand for advanced computing chips. The stock showed exponential growth, particularly after 2022.

  2. Sector Divergence: Traditional tech giants like Apple demonstrated steady, reliable growth, while newer companies in EV and social media sectors exhibited higher volatility.

  3. Market Cycles: The data captures multiple market cycles, including the COVID-19 crash and recovery, the 2021-2022 tech stock peak, and subsequent corrections.

  4. Risk vs. Return: Higher growth stocks (NVDA, TSLA) came with significantly higher volatility, while established companies (AAPL) offered more stable returns.

Investment Implications

The normalized comparison reveals that starting price is not indicative of growth potential. Companies trading at lower absolute prices can deliver substantial returns, while high-priced stocks can also multiply in value.

Diversification across different technology sub-sectors would have provided both growth opportunities and risk mitigation during this period.

Limitations

  • Analysis based solely on closing prices without considering dividends or stock splits
  • Past performance does not guarantee future results
  • External factors (regulatory changes, market sentiment) not explicitly analyzed
  • Survivorship bias: only includes companies that remained public throughout the period

Future Research

Further analysis could include:

  • Risk-adjusted returns (Sharpe ratio, beta analysis)
  • Correlation analysis between stocks
  • Impact of major market events on individual stock performance
  • Comparison with broader market indices (S&P 500, NASDAQ)