A Streamlit web application that allows users to analyze stock performance by displaying OHLC (Open, High, Low, Close) data and calculating the 5-month growth rates for up to 5 stocks simultaneously.
- Real-time Stock Data: Fetches live stock data using the
yfinance
library. - Interactive UI: User-friendly interface for entering stock tickers and selecting date ranges.
- Side-by-Side Comparison: Displays data for multiple stocks in a clear, organized manner.
- Growth Rate Calculation: Calculates and displays the 5-month growth rate for each stock.
-
Clone the repository:
git clone https://github.com/yourusername/momentum_portfolio.git cd momentum_portfolio
-
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate
-
Install required packages:
pip install -r requirements.txt
-
Run the Streamlit app:
streamlit run momentum_portfolio.py
-
Open your web browser and go to
http://localhost:8501
. -
Enter up to 5 stock tickers (comma-separated).
-
Select your desired date range.
The application shows:
- Open Price
- High Price
- Low Price
- Close Price
- 5-Month Growth Rate
- Python: 3.8+
- See
requirements.txt
for package dependencies.
- Fork the repository.
- Create your feature branch:
git checkout -b feature/AmazingFeature
- Commit your changes:
git commit -m 'Add some AmazingFeature'
- Push to the branch:
git push origin feature/AmazingFeature
- Open a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Streamlit for the web framework.
- yfinance for stock data retrieval.
- Pandas for data manipulation.
- NumPy for numerical operations.
Feel free to customize the repository URL, license details, and any other sections to better fit your project. This format should make your README more engaging and informative for users and contributors!