This repository contains the Jupyter notebook with full code for the "Python for Finance: Stock Portfolio Analyses" post, as well as an excel file which is initially read in as a sample portfolio.
- Medium: https://towardsdatascience.com/python-for-finance-stock-portfolio-analyses-6da4c3e61054
- Personal blog: https://kdboller.github.io/2018/03/04/scaling-financial-insights-with-python.html
- Clone this repository:
git clone https://github.com/kdboller/pythonsp500
; or - Hit 'Clone or download' on the main repo page in order to grab the Jupyter notebook and the sample excel file; or
- The notebook itself can be downloaded on nbviewer; link is here.
I highly recommend that you download the Anaconda distribution. You can also run the notebook without Anaconda using pip
to install the required packages, however Anaconda is the industry standard for data science.
For any packages not distributed under Anaconda, e.g., the Yahoo Finance package fix, you can do the following directly in a cell within the notebook:
!pip install [name of package]
- Add an environment.yml file in order to allow for the creation and usage of a new conda environment.