Skip to content

This repository, Composite Visualization of Microsoft Stock Performance (2010-2022) contains visualization of Microsoft Stock performance from 2010 to 2022. Line graph, correlation heatmap, scatter plot, and histogram were produced in this visualization project.

License

Notifications You must be signed in to change notification settings

Richiealx/Composite-Visualization-of-Microsoft-Stock-Performance-2010-2022-

Repository files navigation

Composite-Visualization-of-Microsoft-Stock-Performance-2010-2022-

Revealing Microsoft Stock Performance and Patterns

Repository Structure

-README.md: This file, containing project information and instructions.

-My Composite Visualization Report.R: The R script for analysis and visualization.

-msft.csv: The dataset used in the analysis.

-Visualization Outputs: Chosen Composite Visualization, Microsoft Stock Closing Prices(2010 to 2022), Microsoft Stock Correlation Heatmap, Scatterplot of Trading Volume vs Price Change, Histogram of Microsoft Daily Returns 2010 to 2022 Legend

Project Title: Revealing Microsoft's Stock Performance and Patterns Through Sophisticated Data Visualization Methods.

This repository contains the R code and accompanying visualization outputs for a comprehensive analysis of Microsoft's stock performance from 2010 to 2022. The project utilizes various R libraries to create a series of plots that highlight trends, distributions, and relationships within the stock data.

Research Aim

The aim of this research is to uncover hidden patterns and insights in Microsoft's stock performance over the specified period through advanced data visualization techniques. This involves examining daily returns, price changes, trading volume, and other financial metrics to understand their impact on stock behavior.

Research Question

How does Microsoft stock performance over time offer data-driven insights into investment decisions?

Dataset

The analysis is based on Microsoft's stock data from 2010 to 2022, available in the msft.csv file. This dataset includes columns for date, closing prices, and trading volume among others.

Data Preprocessing

The data is preprocessed to convert date strings into date objects, handle missing values, and filter the dataset for the years 2010 to 2022. Detailed steps include:

-Converting date formats.

-Removing rows with any missing data.

-Calculating daily returns as the percentage change in closing prices.

Instructions for Running the Code

Follow these steps to run the My Composite Visualization Report.R script and generate the visualizations for the Microsoft Stock Performance analysis:

Prerequisites

Before running the code, make sure you have R installed on your computer. You can download it from CRAN. Additionally, an IDE like RStudio, which is available at RStudio Download, is recommended for a more user-friendly experience.

Step 1: Install Required Libraries

Required R Libraries

To run the code, you will need to install the following R libraries:

  • tidyverse: For data manipulation and visualization.
  • lubridate: For handling date and time data.
  • ggplot2: For creating visualizations.
  • scales: For formatting visual elements.
  • grid, gridExtra: For arranging plots.
  • viridis: For color palettes.
  • reshape2: For reshaping data.

The script uses several R libraries. Open RStudio or your R environment and install the libraries using the following command:

install.packages(c("tidyverse", "lubridate", "scales", "grid", "gridExtra", "viridis", "reshape2"))

Step 2: Download the Data and Scripts

-Clone or download the repository to your local machine.

-Ensure that the msft.csv file and Visualization.R script are in the same directory, or adjust the script to point to the correct file paths.

Step 3: Open and Run the Script

-Open the Visualization.R script in RStudio or another R script editor.

-Set your working directory to the folder containing the script and dataset. You can set the working directory in RStudio with the setwd("path/to/your/directory")

-command, or navigate to Session > Set Working Directory > To Source File Location.

-Run the script by clicking on the 'Run' button in RStudio or by pressing Ctrl + Enter to execute the entire script or line by line.

Step 4: View the Outputs

As the script runs, it will generate plots and possibly save them to your directory, depending on how the script is configured. Make sure to check the console for any messages or errors during execution.

Visualization Outputs

The script generates several plots:

-Time series of closing prices.

-Histogram of daily returns.

-Correlation heatmap of financial metrics.

-Scatter plot of trading volume vs price change.

Step 5: Troubleshooting

-If you encounter errors related to missing packages, recheck that all packages have been installed correctly.

-For issues with data paths, ensure that the msft.csv file path matches the one specified in the script.

-Check for any updates or dependencies in the R environment that might affect package functionality.

By following these steps, you should be able to successfully run the R code and view the visualizations created to analyze Microsoft's stock performance from 2010 to 2022.

Key Findings

Key findings from the analysis include:

-Trends in closing prices indicating significant growth phases and downturns.

-Distribution characteristics of daily returns showing volatility patterns.

-Correlations between different financial metrics revealing potential influences on stock prices.

-Relationships between trading volumes and price changes illustrating market reactions.

About

This repository, Composite Visualization of Microsoft Stock Performance (2010-2022) contains visualization of Microsoft Stock performance from 2010 to 2022. Line graph, correlation heatmap, scatter plot, and histogram were produced in this visualization project.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages