A powerful financial assistant that provides comprehensive analysis for stocks and cryptocurrencies using multiple data sources including Yahoo Finance, TradingView, and CoinMarketCap.
- Interactive chat interface with Next.js and React
- Python backend with LlamaIndex RAG agent
- Comprehensive stock analysis with fundamental and technical indicators
- Multi-source cryptocurrency analysis (Yahoo Finance, TradingView, CoinMarketCap)
- Asset comparison tool for comparing multiple stocks or cryptocurrencies
- Technical indicators and market trends analysis
- Investment recommendations with risk assessment
├── backend/ # Flask backend server
├── frontend/ # Next.js frontend application
├── agentic-rag.py # Main LlamaIndex RAG agent implementation
├── coinmarketcap_api.py # CoinMarketCap API integration
├── financial_tools.py # Financial analysis tools and utilities
├── load_env.py # Environment variables loader
├── tradingview_api.py # TradingView API integration
└── requirements.txt # Python dependencies
- Python 3.9+
- Node.js 14+
- API keys for:
- OpenAI
- CoinMarketCap (optional, but recommended)
- Llama Cloud (optional, enhances RAG capabilities)
- Alpha Vantage (required for detailed stock analysis)
- Finnhub (required for real-time stock data)
-
Create a virtual environment and activate it:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install Python dependencies:
pip install -r requirements.txt
-
Set up your API keys: Create a
.env
file in the root directory with the following content:OPENAI_API_KEY=your_openai_api_key COINMARKETCAP_API_KEY=your_coinmarketcap_api_key LLAMA_CLOUD_API_KEY=your_llama_cloud_api_key # For enhanced RAG capabilities ALPHA_VANTAGE_API_KEY=your_alpha_vantage_key # For detailed stock analysis FINNHUB_API_KEY=your_finnhub_key # For real-time stock data
-
Start the Flask backend:
cd backend python app.py
The backend server will run on http://localhost:5000
-
Navigate to the frontend directory:
cd frontend
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open http://localhost:3000 in your browser.
Run the unit tests
pytest -v backend/test_app.py -k "not integration"
Run the integration tests (require the server to be running)
pytest -v backend/test_app.py -k "integration"
- Stock Analysis: Get comprehensive analysis of stocks with technical indicators, fundamentals, and price trends
- Cryptocurrency Analysis: Analyze cryptocurrencies using data from multiple sources (Yahoo Finance, TradingView, CoinMarketCap)
- Investment Recommendations: Receive buy/sell recommendations with confidence scores based on your risk tolerance
- Asset Comparisons: Compare multiple stocks or cryptocurrencies with correlation analysis, performance metrics, and more
- Market Overview: Get market indices data, sector performance, and cryptocurrency market trends
- Stock analysis: "Analyze AAPL stock with moderate risk tolerance"
- Cryptocurrency analysis: "What's your comprehensive analysis of Bitcoin?"
- Investment advice: "Should I buy Ethereum right now?"
- Comparisons: "Compare MSFT, AAPL, and GOOGL performance"
- Crypto comparisons: "Compare BTC, ETH, and SOL with correlation analysis"
- Technical analysis: "What do the technical indicators show for Tesla stock?"
- Market overview: "What's the current crypto market overview?"


This financial analysis tool is for informational purposes only and should not be considered financial advice. Always conduct your own research and consider consulting with a financial advisor before making investment decisions. Cryptocurrency investments are especially high-risk and speculative.
MIT