Summary and Conclusion
This analysis examined the stock performance of eight companies; 5 from tech sector, 3 others from healthcare, entertainment, and energy sector, focusing on daily returns, volatility, and cumulative returns. The analysis employed statistical methods and machine learning models to identify patterns, predict future returns, and assess the relationships between tech and non-tech company stocks focusing on Google from the technology sector and Johnson & Johnson from the healthcare sector as the tech and non-tech as a case study.
Initial observations revealed Google (GOOGL) exhibits higher volatility with potential for significant price swings, while Johnson & Johnson (JNJ) demonstrates greater stability, reflecting typical traits of their respective industries. Comparing the 20-day and 50-day rolling volatilities for both Google and Johnson & Johnson confirmed Google's higher overall risk profile. Furthermore, cumulative return analysis highlighted Google's consistent upward trend, while Johnson & Johnson's returns remained relatively flat.
Predictive modeling was conducted using Linear Regression and Random Forest Regression. While Linear Regression moderately predicted Apple's (AAPL) daily returns from Tesla's (TSLA) daily returns, Random Forest Regression performed poorly for the same prediction. Interestingly, the engineered rolling mean feature of AAPL worsened the performance of the Linear Regression model compared to using TSLA's daily returns as a predictor, indicating the rolling mean was less informative in this context.
Finally, a Random Forest Classifier was employed to predict the direction of Apple's daily returns. The classifier achieved moderate accuracy, indicating some predictive power. Comparing the use of Apple's own rolling mean versus Tesla's daily return as predictors, there was a slight improvement in accuracy when using Apple's rolling mean. This suggests that past price trends of Apple might be more informative for predicting its future direction than the daily return of Tesla.
Overall, the analysis provides valuable insights into the stock dynamics of diverse companies, highlighting risk profiles, return patterns, and potential relationships. However, the prediction models applied have room for improvement. Further research and model refinement might yield more robust predictions and contribute to a deeper understanding of the factors influencing stock market behavior. By expanding the timeframe of the analysis and exploring alternative model configurations, one could enhance the accuracy and predictive power of the models used.