Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t.
The exemption of key electronic components from tariffs is likely to positively impact Apple more, which manufactures approximately 90% of its iPhones in China, compared to other tech giants like Microsoft and Nvidia.
Furthermore, the k-means clustering chart shows that Apple has diverged year to date, specifically after the April 2 tariffs.
Source code:
library(tidyverse) library(tidyquant) library(timetk) #Apple Inc. (AAPL) df_apple <- tq_get("AAPL", from = "2025-01-01") %>% tq_transmute(mutate_fun = periodReturn, period = "daily") %>% mutate(symbol = "Apple") #NVIDIA Corporation (NVDA) df_nvda <- tq_get("NVDA", from = "2025-01-01") %>% tq_transmute(mutate_fun = periodReturn, period = "daily") %>% mutate(symbol = "NVIDIA") #Microsoft Corporation (MSFT) df_msft <- tq_get("MSFT", from = "2025-01-01") %>% tq_transmute(mutate_fun = periodReturn, period = "daily") %>% mutate(symbol = "Microsoft") #Merging the datasets df_merged <- df_apple %>% rbind(df_nvda) %>% rbind(df_msft) #TS Features tsfeature_tbl <- df_merged %>% group_by(symbol) %>% tk_tsfeatures( .date_var = date, .value = daily.returns, .features = c("frequency", "stl_features", "entropy", "acf_features", "mean"), .scale = TRUE, .prefix = "ts_" ) %>% ungroup() #Clustering with K-Means set.seed(123) cluster_tbl <- tibble( cluster = tsfeature_tbl %>% select(-symbol) %>% as.matrix() %>% kmeans(centers = 2) %>% pluck("cluster") ) %>% bind_cols( tsfeature_tbl ) #Visualize the Cluster Assignments cluster_tbl %>% select(cluster, symbol) %>% right_join(df_merged, by = "symbol") %>% group_by(symbol) %>% plot_time_series( date, daily.returns, .smooth = FALSE, .line_size = 1, .color_var = cluster, .facet_ncol = 1, .interactive = FALSE, .title = "K-Means Clustering Chart" ) + labs(subtitle = "Year to Date-Daily Returns") + scale_y_continuous(labels = scales::percent) + theme_tq(base_family = "Roboto Slab", base_size = 16) + theme(plot.title = ggtext::element_markdown(face = "bold"), strip.text = element_text(face = "bold"), plot.background = element_rect(fill = "azure", color = "azure"), legend.position = "none")
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you’re looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t.
Continue reading: K-Means Clustering Analysis of Apple, Microsoft, and Nvidia
Implications of Tariff Exemptions on Key Electronic Components
According to the data presented, the exemption of key electronic components from tariffs has shown to have a potentially auspicious outcome for Apple in comparison to other technology giants. This is primarily due to Apple’s significant manufacturing presence in China, producing nearly 90% of its iPhones in the nation.
Impact on Different Players in the Tech Field
While Apple stands to gain the most from this, other tech leaders such as Microsoft and Nvidia may not see as significant of an impact. The data presented suggests that these other companies may need to devise strategies to mitigate the potential drawbacks from this development.
Divergence Indicated in K-Means Clustering Chart
The K-Means Clustering Chart highlights a noticeable divergence in Apple’s performance year to date, particularly subsequent to the implementation of the April 2 tariffs. This suggests that Apple’s market behavior is increasingly different from its peers in the tech industry, as it is more positively influenced by the tariff considerations.
Anticipated Future Developments
Given the recent trajectory of Apple in light of these tariff exemptions, the tech giant may continue to thrive in future market conditions, provided tariff exemptions remain in place. However, competitors should not be disregarded. Companies such as Microsoft and Nvidia could potentially make strategic shifts in their operations to leverage similar tariff exemptions.
Furthermore, it is equally viable that geopolitical changes or shifts in international trade policies could bring changes to China-based production practices for global companies — challenging Apple’s advantageous position.
Actionable Insights
- Adaptation: Other technological players in the market should consider strategic adaptation to leverage tariff exemptions, if possible.
- Diversify: Tech companies with significant dependence on China-based manufacturing may want to examine the benefits of diversifying their production bases.
- Monitor: Keep an eye on geopolitical and international trade policy shifts, as these hold considerable influence over cross-border manufacturing and business operations.
- Study: Further study could be conducted to decouple the effects of Apple’s strategic maneuvers from other external market forces that may have driven the divergence seen in 2022.