Skip to content

undeluro/plotting-stocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Stock Market Analysis & Visualization πŸ“ˆ (Lab from uni course)

This tool fetches, analyzes, and visualizes stock data for your favorite tickers using Python, async APIs, and (probably) beautiful plots.

Features

  • 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.

Extra Materials

You can learn the following topics by going throw the project and visiting the links below:

Click to expand extra learning materials

Setup Instructions πŸ› οΈ

  1. Clone the repository

    git clone https://github.com/undeluro/uni-plotting-stocks.git
    cd uni-plotting-stocks
  2. Create a virtual environment

    python -m venv .venv
    # On Windows:
    .venv\Scripts\activate
    # On macOS/Linux:
    source .venv/bin/activate
  3. Install requirements

    pip install -r requirements.txt
  4. Get your free Polygon.io API key

    • Sign up at polygon.io
    • Go to your dashboard and copy your API key
  5. Create a .env file

    echo API_KEY=your_api_key_here > .env

How to Use

  • Open main.ipynb in VS Code or Jupyter Lab.
  • Set your desired date range and tickers.
  • Run the notebook cells to fetch data, analyze, and visualize!

Project Structure

.
β”œβ”€β”€ 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

Contributing

Contributions are welcome! Feel free to submit issues or pull requests to improve the project.

License

This project is licensed under the MIT License. See LICENSE for details.

About

University course project analyzing stock performance over a given timeframe.

Topics

Resources

Stars

Watchers

Forks