How abhishek-ms-01/stock_market_prediction-with-rag_lstm works
AlphaTrade is a stock-market intelligence product: users inspect market data and indicators, request forecasts and risk views, and can ask an AI assistant for explanations. The documented hybrid approach combines price-derived features with time-aware news retrieval and LSTM prediction; the repository also includes portfolio recommendations and live-news ingestion. The graph reflects explicit calls where sampled, while some documented or tree-visible subsystems have no confirmed wiring in the excerpts.
Main entry points: routes.py Feature routes · main.py FastAPI app · live_news_fetcher.py Live news ingestion · dashboard Dashboard pages
Components 23
Investor dashboard
- Dashboard pages
frontend/src/app/dashboard - Charts
frontend/src/components/charts/ChartPanel.tsx - Stock data hook
frontend/src/hooks/useStockData.ts - API client
frontend/src/lib/api/client.ts
API and orchestration
- FastAPI app
backend/main.py - Feature routes
backend/app/api/routes.py
Market intelligence
- Technical indicators
backend/indicators - Feature engineering
backend/feature_engineering/create_features.py - Risk analysis
backend/risk/risk_analyzer.py - Market regime
backend/market_regime/regime_detector.py - Portfolio advice
backend/portfolio/portfolio_advisor.py
News and retrieval
- Live news ingestion
backend/data_ingestion/live_news_fetcher.py - Event and sentiment NLP
backend/nlp - Time-aware retrieval
backend/rag/time_aware_rag.py - Chat retrieval
backend/chatbot/rag_engine.py - News corpus
Forecasting
- Forecast endpoint
backend/main.py - Online trainer
backend/prediction/online_trainer.py - Neural models
backend/models/neural_models.py - Chat assistant
backend/chatbot/chatbot.py
Other components
- Investor
- Market data provider
- News sources
Connections 21
- Investor → Dashboard pages: uses
- Dashboard pages → Charts: renders
- Stock data hook → FastAPI app: fetches stock data
- API client → Feature routes: sends API requests
- Feature routes → Market data provider: downloads prices
- FastAPI app → Market data provider: fetches quotes
- Feature routes → Technical indicators: calculates indicators
- Feature routes → Risk analysis: calculates risk
- Feature routes → Market regime: detects regime
- Feature routes → Portfolio advice: ranks forecasts
- Feature routes → Chat assistant: requests response
- Live news ingestion → News sources: fetches articles
- Live news ingestion → News corpus: produces corpus
- Time-aware retrieval → News corpus: indexes corpus
- Chat retrieval → News corpus: reads corpus
- Investor → API client: requests features
- FastAPI app → Online trainer: trains model
- Online trainer → Market data provider: uses market data
- Forecast endpoint → Neural models: runs inference
- FastAPI app → Forecast endpoint: serves forecast
- Event and sentiment NLP → Time-aware retrieval: enriches retrieval