An interactive Streamlit application that combines market-data visualization, technical indicators, and local vision-language-model analysis of stock charts.
The application retrieves daily OHLCV data from Alpha Vantage, builds an interactive Plotly candlestick chart, overlays selected indicators, renders the chart as an image, and sends it to Llama 3.2 Vision through a local Ollama instance.
- Daily stock data loaded from the Alpha Vantage API.
- Interactive candlestick charts built with Plotly.
- Optional 20-day SMA, 20-day EMA, and Bollinger Bands.
- Local chart analysis with
llama3.2-visionthrough Ollama. - A Streamlit interface for selecting a ticker, date range, and indicators.
- Local inference: chart images are processed by the locally hosted model.
flowchart LR
A[Alpha Vantage] --> B[OHLCV preprocessing]
B --> C[Plotly chart and indicators]
C --> D[Chart image]
D --> E[Ollama and Llama 3.2 Vision]
E --> F[Streamlit analysis panel]
Python, Streamlit, Plotly, Pandas, Alpha Vantage, Ollama, Llama 3.2 Vision, and Kaleido.
git clone https://github.com/Gregory-mcbit/AI-Stock-Dashboard.git
cd AI-Stock-Dashboard
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txtCreate a free API key at Alpha Vantage, then create a .env file:
API_TOKEN=your_alpha_vantage_api_keyInstall Ollama, download the model, and start the Ollama service:
ollama pull llama3.2-vision
ollama servestreamlit run main.pyEnter a ticker, select a date range, choose one or more indicators, and fetch the data. After the chart is rendered, select Run AI Analysis to send the chart image to the local vision model.
The model receives only the rendered candlestick chart and the indicators displayed on it. It is prompted to produce a buy, hold, or sell assessment followed by an explanation. The output is exploratory and is not validated against future market performance.
- The application uses daily Alpha Vantage data rather than a real-time market feed.
- The vision model analyzes the chart image; it does not receive fundamentals, news, order-book data, or portfolio context.
- LLM output can be inaccurate or inconsistent and should not be treated as a trading signal.
- Alpha Vantage rate limits depend on the selected API plan.
This project is for educational and demonstration purposes only. It does not provide financial advice.