It is a python program that creates a stock portfolio based on the historical data of the companies listed in the NASDAQ index.
Libraries used:
- Numpy
- Pandas
- PyPortfolioOpt
- Yahoo finance API (yfinance)
- Clone the repository in to your machine
- Install all the required dependencies in requirements.txt
- Run scrapper.py
scrapper.csv
is stored in your root directory, move it to/Stock_portfolio-Maker/
folder.- Open
scrapper.csv
and erase the first row. It says "Adj. Close". - Run main.py.
- Changing the ticker symbol used to determine the portfolio
- Open scrapper.py and change the values in
Symbols
- Open scrapper.py and change the values in
- Changing the portfolio value:
- Open main.py and change the value of
portfolio_val
. It is set at $5000 by default.
- Open main.py and change the value of
- Change the start and end date of the data scrapped:
- Open scrapper.py and chnage the values of
start
andend
. It is set for the past 5 years by default.
- Open scrapper.py and chnage the values of