This project focuses on analyzing historical stock data for major technology companies including Apple, Google, Microsoft, and Amazon. The data, sourced from Yahoo Finance, covers daily stock prices, trading volumes, and adjusted close prices over the past year 2023. Using Python libraries such as Pandas, Seaborn, and Matplotlib, we extract, clean, analyze, and visualize the data to gain insights into stock performance and assess the risk based on historical data
The finance industry has increasingly embraced analytics to drive decision-making. In this project, we focus on technology stocks to understand their market behavior and inform investment strategies. Stakeholders, including individual investors and financial analysts, can benefit from insights derived from historical stock data.
The dataset used in this project is sourced from Yahoo Finance, covering daily stock prices for
- Apple (AAPL)
- Google (GOOG)
- Microsoft (MSFT)
- Amazon (AMZN)
By analyzing this data, we derive the following key insights:
- Visualizations of adjusted closing prices over time highlight trends and fluctuations in stock performance.
- Calculated moving averages (20-day, 50-day, and 100-day) provide insights into short-term and long-term trends in stock prices.
- Analysis of daily returns reveals the volatility and stability of each stock, with visualizations depicting distribution and frequency.
- Correlation analysis shows the relationships between daily returns of different stocks, indicating potential diversification opportunities for investors.
Several visualizations were created to understand stock behavior:
- Stock Price Trends: Visualized the adjusted closing prices over time for each stock.
- Trading Volume: Analyzed changes in trading volumes over time.
- Moving Averages: Calculated 20-day, 50-day, and 100-day moving averages to smooth out short-term fluctuations.
- Daily Returns: Computed daily returns to assess volatility and trends.
- Trend Analysis: Categorized daily returns into trends and visualized their frequency using a pie chart.
- Correlation Analysis: Examined the correlation between daily returns of different stocks using a heatmap.
The analysis primarily focused on visual and statistical methods to understand stock performance. Key insights include:
- Stock Price Trends: All four stocks showed distinct trends and periods of volatility.
- Trading Volume: Spikes in trading volume often corresponded with significant price movements.
- Moving Averages: Long-term moving averages provided a smoother trend line compared to short-term averages.
- Daily Returns: Both positive and negative returns were observed, with Amazon showing frequent slight changes.
- Trend Frequency: Most of the time, Amazon's stock showed slight or no change, with occasional significant movements.
- Correlation Analysis: Strong positive correlations were found between the stocks, especially between Microsoft and Apple/Google.
This analysis provides a comprehensive overview of stock performance for major technology companies. Key recommendations for stakeholders include:
- Investment Strategies: Use moving averages and trend analysis to inform buy/sell decisions.
- Risk Assessment: Consider the volatility and correlation between stocks when diversifying portfolios.
- Expectations: Expand the analysis to include more companies and longer timeframes. Implement predictive models to forecast future stock prices.