This tool fetches, analyzes, and visualizes stock data for your favorite tickers using Python, async APIs, and (probably) beautiful plots.
- Async Data Fetching: Fast, efficient download of daily stock data using Polygon.io.
- Custom Ticker Selection: Analyze only the stocks you care about.
- Powerful Visualizations: Trend lines, cumulative returns, and top performer charts.
- Easy to Use: Run everything in a Jupyter notebook.
You can learn the following topics by going throw the project and visiting the links below:
Click to expand extra learning materials
-
Clone the repository
git clone https://github.com/undeluro/uni-plotting-stocks.git cd uni-plotting-stocks -
Create a virtual environment
python -m venv .venv # On Windows: .venv\Scripts\activate # On macOS/Linux: source .venv/bin/activate
-
Install requirements
pip install -r requirements.txt
-
Get your free Polygon.io API key
- Sign up at polygon.io
- Go to your dashboard and copy your API key
-
Create a
.envfileecho API_KEY=your_api_key_here > .env
- Open
main.ipynbin VS Code or Jupyter Lab. - Set your desired date range and tickers.
- Run the notebook cells to fetch data, analyze, and visualize!
.
βββ main.ipynb # Main Jupyter notebook for analysis and visualization
βββ requirements.txt # List of Python dependencies
βββ .env # API key for Polygon.io (not included in repo)
βββ src/ # Source code directory
β βββ fetch_data.py # Functions for fetching stock data (async)
β βββ analyze_data.py # Functions for preprocessing and analyzing data
βββ README.md # Project documentation (this file)
βββ LICENSE # License file
Contributions are welcome! Feel free to submit issues or pull requests to improve the project.
This project is licensed under the MIT License. See LICENSE for details.