This Python script leverages the yfinance library to fetch and display stock data after a user types in a ticker such as AAPL or BTC-USD. It includes price movements and volume along with a buy/sell indicator.* Indicator uses key financial indicators like the RSI (Relative Strength Index) to determine signals. Designed for financial analysts and hobbyists alike, this tool provides insightful visualizations to aid in stock market analysis.
- Fetch and display closing prices.
- Calculate and visualize daily returns.
- Visualize relative Strength index.
- Based on key trading indicators: Moving Averages, MACD, RSI.
- Plot data using Matplotlib for clear, informative visualizations.
Before you begin, ensure you have the following:
- Python 3.x installed on your system.
yfinance,flask, andmatplotliblibraries installed.
Clone the repository to your local machine:
git clone https://github.com/yourusername/stock-analysis-tool.git
cd stock-analysis-toolIt's a good practice to use a virtual environment to manage dependencies:
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`pip install -r requirements.txtStart the Flask server:
python stocks.pyOpen a web browser and go to http://127.0.0.1:5000 to start using the application.
To use the application, follow these steps:
Enter a Stock Ticker: Input the symbol of the stock you want to analyze (e.g., AAPL, GOOGL, MSFT) in the text field. Submit: Click the "Show Chart" button to display the stock's price graph and RSI chart. View Results: The results will display directly on the web page with options to analyze another stock.
This Stock Analysis Tool is provided for informational and educational purposes only. It is designed for fun and to help users learn more about stock market trends through visual analysis. It is not intended for financial investment or trading purposes.
The data and information provided by this tool do not constitute financial advice, and users should not make any investment decision based solely on the output from this tool. All users should conduct their own research and consider seeking advice from independent financial advisors before making any investment decisions.
By using this tool, you acknowledge and agree that any reliance on or use of the information available through this tool is entirely at your own risk. The developer or provider of this tool shall not be liable for any losses or damages arising from the use of this tool.

