This project allows users to visualize the historical stock prices of multiple stocks interactively in real-time using Streamlit and Plotly. By inputting a list of stock tickers (e.g., PETR4.SA, VALE3.SA, ITUB4.SA), the app fetches data from Yahoo Finance and displays an interactive line chart showing the stock prices over time. The application automatically updates every 30 seconds to ensure the displayed data remains current.
-
Input multiple stock tickers and view them simultaneously.
-
Interactive graph with Plotly showing the historical closing prices.
-
Real-time updates every 30 seconds.
-
Display current stock prices in Streamlit's metric cards.
-
Option to download the data as a CSV file.
- Streamlit for building the interactive web application.
- Plotly for interactive visualizations.
- yfinance to fetch stock data from Yahoo Finance.
- Python 3.x
- Streamlit
- Plotly
- Pandas
-
Clone the repository:
git clone https://github.com/IsaacMartins12/stocks_streamlite
-
Create virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
python install -r requirements.txt
-
Run the main app:
streamlit run stream.py
We welcome contributions to improve this project. Feel free to submit pull requests or report issues on the Issues page.
- Fork the project.
- Create a branch for your feature (
git checkout -b feature/new-feature). - Commit your changes (
git commit -am 'Add new feature'). - Push to the branch (
git push origin feature/new-feature). - Create a Pull Request with a detailed description of your changes.
This project is licensed under the MIT License.
