How tharun750/stock_analysis works
This is an intraday stock-analysis application with a dashboard and API. Users select a stock and request market data or analysis; the central pipeline coordinates market, technical, news, genetic-optimization, prediction, risk, and decision agents, then exposes results for display. Separate capabilities include stock lookup, strategy optimization, historical backtesting, and persisted records. The graph follows documented imports and shown calls; several agent and route internals were not excerpted, so their detailed behavior and any unshown integrations are not inferred.
Main entry points: pipeline_service.py Analysis Pipeline · app.py Analysis Dashboard · routes.py HTTP API · db_manager.py Database Manager
Components 27
User Experience
- Analysis Dashboard
IOC/agentic-stock-ai/frontend/app.py - Charts
IOC/agentic-stock-ai/frontend/components/chart_view.py - Agent Status View
IOC/agentic-stock-ai/frontend/components/agent_status.py - Optimization View
IOC/agentic-stock-ai/frontend/components/ga_view.py - Backtest View
IOC/agentic-stock-ai/frontend/components/backtest_view.py
API and Orchestration
- HTTP API
IOC/agentic-stock-ai/backend/api/routes.py - Analysis Pipeline
IOC/agentic-stock-ai/backend/services/pipeline_service.py - Runtime Settings
IOC/agentic-stock-ai/config/settings.py
Analysis Agents
- Market Agent
IOC/agentic-stock-ai/backend/agents/market_agent.py - Technical Analysis
IOC/agentic-stock-ai/backend/agents/technical_agent.py - News Sentiment
IOC/agentic-stock-ai/backend/agents/news_agent.py - AI Prediction
IOC/agentic-stock-ai/backend/agents/prediction_agent.py - Feature Engineering
IOC/agentic-stock-ai/backend/models/feature_engineering.py - ML Model Selection
IOC/agentic-stock-ai/backend/models/ml_engine.py - Risk Management
IOC/agentic-stock-ai/backend/agents/risk_agent.py - Decision Agent
IOC/agentic-stock-ai/backend/agents/decision_agent.py
Market Data and Storage
- Stock Universe
IOC/agentic-stock-ai/backend/data/stock_universe.py - Yahoo Finance Provider
IOC/agentic-stock-ai/backend/data/yfinance_provider.py - Database Manager
IOC/agentic-stock-ai/backend/database/db_manager.py - Stored Records
IOC/agentic-stock-ai/backend/database/models.py
Strategy and Evaluation
- Genetic Optimization
IOC/agentic-stock-ai/backend/agents/genetic_agent.py - Genetic Algorithm
IOC/agentic-stock-ai/backend/genetic/ga_engine.py - Strategy Parameters
IOC/agentic-stock-ai/backend/genetic/chromosome.py - Fitness Evaluation
IOC/agentic-stock-ai/backend/genetic/fitness.py - Backtest Engine
IOC/agentic-stock-ai/backend/backtesting/backtest_engine.py - Performance Metrics
IOC/agentic-stock-ai/backend/backtesting/metrics.py
Other components
- Investor
Connections 34
- Investor → Analysis Dashboard: uses
IOC/agentic-stock-ai/frontend/app.py - Investor → HTTP API: requests
IOC/agentic-stock-ai/backend/api/routes.py - Analysis Dashboard → Analysis Pipeline: requests analysis
IOC/agentic-stock-ai/frontend/app.py - Analysis Dashboard → Stock Universe: looks up stocks
IOC/agentic-stock-ai/frontend/app.py - Analysis Dashboard → Backtest Engine: runs backtests
IOC/agentic-stock-ai/frontend/app.py - Analysis Dashboard → Charts: renders
IOC/agentic-stock-ai/frontend/app.py - Analysis Dashboard → Agent Status View: renders
IOC/agentic-stock-ai/frontend/app.py - Analysis Dashboard → Optimization View: renders
IOC/agentic-stock-ai/frontend/app.py - Analysis Dashboard → Backtest View: renders
IOC/agentic-stock-ai/frontend/app.py - HTTP API → Analysis Pipeline: runs analysis
IOC/agentic-stock-ai/backend/api/routes.py - HTTP API → Yahoo Finance Provider: fetches data
IOC/agentic-stock-ai/backend/api/routes.py - HTTP API → Stock Universe: queries stocks
IOC/agentic-stock-ai/backend/api/routes.py - HTTP API → Backtest Engine: runs backtest
IOC/agentic-stock-ai/backend/api/routes.py - HTTP API → Strategy Parameters: uses parameters
IOC/agentic-stock-ai/backend/api/routes.py - Analysis Pipeline → Market Agent: executes
IOC/agentic-stock-ai/backend/services/pipeline_service.py - Analysis Pipeline → Technical Analysis: executes
IOC/agentic-stock-ai/backend/services/pipeline_service.py - Analysis Pipeline → News Sentiment: executes
IOC/agentic-stock-ai/backend/services/pipeline_service.py - Analysis Pipeline → Genetic Optimization: executes
IOC/agentic-stock-ai/backend/services/pipeline_service.py - Analysis Pipeline → AI Prediction: executes
IOC/agentic-stock-ai/backend/services/pipeline_service.py - Analysis Pipeline → Risk Management: executes
IOC/agentic-stock-ai/backend/services/pipeline_service.py - Analysis Pipeline → Decision Agent: executes
IOC/agentic-stock-ai/backend/services/pipeline_service.py - Analysis Pipeline → Database Manager: persists results
IOC/agentic-stock-ai/backend/services/pipeline_service.py - Market Agent → Yahoo Finance Provider: requests market data
IOC/agentic-stock-ai/backend/agents/market_agent.py - Yahoo Finance Provider → Stock Universe: formats ticker
IOC/agentic-stock-ai/backend/data/yfinance_provider.py - Stock Universe → Database Manager: queries records
IOC/agentic-stock-ai/backend/data/stock_universe.py - Database Manager → Stored Records: creates and queries
IOC/agentic-stock-ai/backend/database/db_manager.py - Database Manager → Runtime Settings: reads configuration
IOC/agentic-stock-ai/backend/database/db_manager.py - AI Prediction → ML Model Selection: predicts with
IOC/agentic-stock-ai/backend/agents/prediction_agent.py - ML Model Selection → Feature Engineering: builds features
IOC/agentic-stock-ai/backend/models/ml_engine.py - Genetic Optimization → Genetic Algorithm: optimizes with
IOC/agentic-stock-ai/backend/agents/genetic_agent.py - Genetic Algorithm → Strategy Parameters: evolves parameters
IOC/agentic-stock-ai/backend/genetic/ga_engine.py - Genetic Algorithm → Fitness Evaluation: evaluates candidates
IOC/agentic-stock-ai/backend/genetic/ga_engine.py - Backtest Engine → Strategy Parameters: uses parameters
IOC/agentic-stock-ai/backend/backtesting/backtest_engine.py - Backtest Engine → Performance Metrics: calculates metrics
IOC/agentic-stock-ai/backend/backtesting/backtest_engine.py