This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
install.packages("quantmod")
## Installing package into '/cloud/lib/x86_64-pc-linux-gnu-library/4.5'
## (as 'lib' is unspecified)
install.packages("lubridate")
## Installing package into '/cloud/lib/x86_64-pc-linux-gnu-library/4.5'
## (as 'lib' is unspecified)
library(quantmod)
## Loading required package: xts
## Loading required package: zoo
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
## Loading required package: TTR
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
library(lubridate)
##
## Attaching package: 'lubridate'
## The following objects are masked from 'package:base':
##
## date, intersect, setdiff, union
getSymbols('AMZN', src = 'yahoo',
from = Sys.Date() - years(4), to = Sys.Date())
## [1] "AMZN"
getSymbols('TSLA', src = 'yahoo',
from = Sys.Date() - years(4), to = Sys.Date())
## [1] "TSLA"
stocks <- as.xts(data.frame(AMZN = AMZN$"AMZN.Close",
TSLA = TSLA$"TSLA.Close"))
plot(as.zoo(stocks),screens = 1,lty = c(1,3),
col = c("red","blue") ,xlab = "date",ylab = "Price")
legend("top",c("AMZN","TSLA"),
lty = c(1,3),col = c("red","blue"),cex = 0.5)
Discussion Questions
What do the plotted Google Trends data for Tesla and Amazon reveal about the relative search interest over the specified time period? Are there any significant fluctuations or patterns that stand out?
As shown in Graph 2, Amazon consistently attracts far more search interest than Tesla throughout the entire period. The Amazon line remains well above Tesla’s, frequently ranging between 55 and 90 search hits, while Tesla stays mostly in the single digits with one noticeable spike around 2025. What stands out most is the persistent gap between the two companies over time. Amazon’s elevated baseline suggests steady consumer reliance and routine engagement, whereas Tesla’s flatter pattern reflects more limited general search traffic. Overall, the data clearly indicate Amazon’s sustained dominance in public search visibility. This consistent difference highlights the contrast in everyday consumer engagement between the two brands.
Do you observe any recurring seasonal patterns in the search interest for Tesla and Amazon? Are there specific times of the year when search interest tends to peak or dip for these keywords?
Graph 2 reveals a clear rhythm in Amazon’s search activity. The repeated peaks occur at similar intervals each year, likely aligning with major retail events such as Prime Day and the holiday shopping season. These recurring surges reflect predictable consumer purchasing cycles. In contrast, Tesla does not display the same annual repetition. Its search interest remains relatively stable, with only one distinct spike rather than recurring yearly peaks. This difference suggests Amazon’s visibility is driven by structured retail seasons, while Tesla’s attention appears more influenced by isolated announcements or media-driven developments. This pattern emphasizes how business models shape the timing of public attention.
Compare the search interest trends between Tesla and Amazon. Are there any periods where one keyword significantly outperforms the other in terms of search interest? What might explain these differences?
When comparing both companies in Graph 2, Amazon significantly outperforms Tesla in search interest across the entire timeframe. The difference becomes especially noticeable during Amazon’s peak periods, where it approaches the top of the scale while Tesla remains considerably lower. At no point does Tesla surpass Amazon in this graph. This consistent gap likely reflects Amazon’s broad consumer presence and everyday purchasing relevance. Tesla’s search activity appears more concentrated around specific announcements rather than ongoing engagement. Overall, the comparison highlights Amazon’s sustained and widespread online visibility relative to Tesla. The sustained gap also suggests differences in audience size and purchasing frequency. This reinforces how consumer-driven platforms naturally generate higher recurring search traffic.
Identify any spikes or drops in search interest that coincide with notable events or news related to Tesla and Amazon. How can these events impact search behavior and potentially influence the companies’ performance?
Graph 1 shows a dramatic spike reaching 100 around 2022, suggesting a major political or national event that will sharply increase public attention. In Graph 2, Amazon’s recurring peaks likely correspond to promotional periods such as Prime Day or holiday shopping seasons. Tesla exhibits one noticeable surge around 2025, which may reflect a significant announcement or earnings release. These spikes illustrate how search behavior responds quickly to major developments. Sudden increases in public attention can impact investor sentiment, shape media narratives, and potentially contribute to short-term fluctuations in company performance.Heightened visibility can also amplify brand awareness beyond the immediate event. Over time, repeated spikes may strengthen long-term recognition and consumer engagement.
Based on the plot, can you identify the overall trend in Tesla and Amazon stock prices over the time period shown? Is it predominantly upward, downward, or sideways? What might be causing this trend?
Graph 3 demonstrates that both Amazon and Tesla follow an overall upward trajectory from 2022 to 2026. Amazon begins near $140, dips slightly in early 2023, and then steadily rises toward the mid-200 range by 2026. Tesla starts higher, experiences noticeable volatility, and then climbs sharply in 2024 and 2025, reaching near $500 before stabilizing. While both companies exhibit long-term growth, Tesla’s increase is steeper and more pronounced. The upward trend suggests sustained investor confidence and continued expansion, particularly in technology-driven sectors during the period shown. The difference in slope also reflects varying growth expectations between the two firms. Overall, Tesla’s acceleration appears more aggressive, while Amazon’s growth is steadier and more gradual.
Compare the volatility of Tesla and Amazon stocks. Do you notice any significant differences in terms of price fluctuations or volatility spikes between the two? What factors could contribute to these differences?
An examination of Graph 3 shows that tesla exhibits significantly greater volatility than Amazon throughout the timeframe. The Tesla line displays sharp rises and steep declines, especially between 2022 and 2025. In contrast, Amazon’s price movements are smoother and more gradual. Tesla’s pronounced fluctuations indicate stronger sensitivity to news, innovation cycles, and shifts in investor sentiment. Amazon’s steadier performance may reflect its diversified revenue streams and broader market stability. Overall, the graph highlights Tesla as the more volatile stock, while Amazon demonstrates comparatively moderate and controlled price behavior. Higher volatility can present greater risk but also greater potential reward for investors. This contrast shows the difference between growth-driven momentum stocks and more established, diversified companies.