Learn practical skills, build real-world projects, and advance your career

                                    US Stock Market Analysis(2005-2020)


Returns-3.gif

This data analysis project covers US Stock Market for the last 15 years. Small-cap, Mid-cap, Large-cap, Total Equity Market Index and Bond Index data selected for analysis. My goal is to find any outperformance of any particular sector and investigate the data using the concepts learned in the course Data Analysis with Python: Zero to Pandas.

I will touch a few basic statistical methods such as mean, standard deviation and concepts like kurtosis and correlations from a high level. I will be using Pandas, Matplotlib and Seaborn for calculations and visualizations.

My exploratory data analysis uses custom dataset pulled from Yahoo finance for the last 15 years for Large Cap, Mid Cap and Small Cap and Bond ETF's.I have selection most popular ETF's to cover the entire stock market based on the sectors and bond market index.

Main Assumption: Excludes dividends(for simplicity of this project)

  • VV - Vanguard Large-Cap Index Fund ETF

  • VO - Vanguard Mid-Cap Index Fund ETF

  • VB - Vanguard Small-Cap Index Fund ETF

  • VTI - Total US Stock Market Index

  • AGG - iShares Core US Aggregate Bond ETF

TODO - Write some introduction about your project here: describe the dataset, where you got it from, what you're trying to do with it, and which tools & techniques you're using. You can also mention about the course Data Analysis with Python: Zero to Pandas, and what you've learned from it.

How to run the code

This is an executable Jupyter notebook hosted on Jovian.ml, a platform for sharing data science projects. You can run and experiment with the code in a couple of ways: using free online resources (recommended) or on your own computer.

Option 1: Running using free online resources (1-click, recommended)

The easiest way to start executing this notebook is to click the "Run" button at the top of this page, and select "Run on Binder". This will run the notebook on mybinder.org, a free online service for running Jupyter notebooks. You can also select "Run on Colab" or "Run on Kaggle".

Option 2: Running on your computer locally
  1. Install Conda by following these instructions. Add Conda binaries to your system PATH, so you can use the conda command on your terminal.

  2. Create a Conda environment and install the required libraries by running these commands on the terminal:

conda create -n zerotopandas -y python=3.8 
conda activate zerotopandas
pip install jovian jupyter numpy pandas matplotlib seaborn opendatasets --upgrade
  1. Press the "Clone" button above to copy the command for downloading the notebook, and run it on the terminal. This will create a new directory and download the notebook. The command will look something like this:
jovian clone notebook-owner/notebook-id
  1. Enter the newly created directory using cd directory-name and start the Jupyter notebook.
jupyter notebook

You can now access Jupyter's web interface by clicking the link that shows up on the terminal or by visiting http://localhost:8888 on your browser. Click on the notebook file (it has a .ipynb extension) to open it.

Downloading the Dataset

Custom dataset was pulled from Yahoo finance for the last 15 years by searching for tickers VV,VO,VB, VTI and AGG at http://finance.yahoo.com. I tried using the standard datasets available at kaggle but had performance issues so I manually added 4 files as part of notebook to do the analysis.

Each dataset has about 4000 rows and roughly 20k rows for the entire dataset

project_name = "zerotopandas-Exploratory-Assignment" # change this (use lowercase letters and hyphens only)
!pip install jovian --upgrade -q