How higgsboson0906/financial-intelligence-terminal works
Financial Intelligence Terminal is an analysis-and-simulation product, not a trading system. Its main backend workflow accepts a natural-language query, orchestrates market, sentiment, macro/weather, historical-event and risk analysis, then synthesizes an answer and persists run data. The frontend presents terminal views and event intelligence; a separate historical-data pipeline acquires and prepares inputs. The README also describes predictive analytics and RAG capabilities. Some endpoints and UI modules are unsampled, so their internal links are omitted; the frontend-to-backend query connection is not asserted.
Main entry points: orchestrator.py Analysis Orchestrator · query.py Query Endpoint · historical_rag_service.py Historical Event Retrieval · App.tsx Financial Terminal
Components 29
Terminal UI
- Financial Terminal
frontend/src/App.tsx - Query Bar
frontend/src/components/layout/QueryBar.tsx - Event Impact Map
frontend/src/components/intelligence/EventImpactMap.tsx - Market View
frontend/src/components/intelligence/MarketView.tsx - Audit Drawer
frontend/src/components/terminal/AuditDrawer.tsx - Event API Client
frontend/src/services/eventApi.ts
API Layer
- FastAPI Routers
backend/app/api - Query Endpoint
backend/app/api/query.py
Analysis Workflow
- Analysis Orchestrator
backend/app/agents/orchestrator.py - Query Parser
backend/app/services/query_parser.py - Sentiment Agent
backend/app/agents/sentiment_agent.py - Weather Macro Agent
backend/app/agents/weather_macro_agent.py - Risk Agent
backend/app/agents/risk_agent.py - Scenario Agent
backend/app/agents/scenario_agent.py - Hedging Agent
backend/app/agents/hedging_agent.py - Quantitative Risk Engine
risk/engine.py - Predictive Analytics
ml - Analysis State and Evidence
backend/app/schemas/orchestration.py
Data Services
- Historical Event Retrieval
backend/app/services/historical_rag_service.py - Embedding Service
backend/app/services/embedding_service.py - Market Data Service
backend/app/services/market_service.py - Gemini Synthesis
backend/app/services/gemini_service.py - Confidence Service
backend/app/services/confidence_service.py - PostgreSQL / pgvector
- Redis Cache
Historical Data
- Acquisition Pipeline
scripts/data_acquisition/run_pipeline.py - Historical Data Sources
- Normalization and Dataset Build
scripts/data_acquisition
Other components
- Analyst
Connections 26
- Analyst → Query Bar: submits query
frontend/src/components/layout/QueryBar.tsx - Financial Terminal → Query Bar: renders
frontend/src/App.tsx - Financial Terminal → Event Impact Map: renders
frontend/src/App.tsx - Event Impact Map → Event API Client: uses
frontend/src/components/intelligence/EventImpactMap.tsx - Event Impact Map → Market View: renders
frontend/src/components/intelligence/EventImpactMap.tsx - Financial Terminal → Audit Drawer: renders
frontend/src/App.tsx - FastAPI Routers → Query Endpoint: registers
backend/app/main.py - Query Endpoint → Analysis Orchestrator: runs analysis
backend/app/api/query.py - Query Endpoint → Gemini Synthesis: synthesizes answer
backend/app/api/query.py - Query Endpoint → Confidence Service: calculates confidence
backend/app/api/query.py - Analysis Orchestrator → Query Parser: parses query
backend/app/agents/orchestrator.py - Analysis Orchestrator → Sentiment Agent: dispatches
backend/app/agents/orchestrator.py - Analysis Orchestrator → Weather Macro Agent: dispatches
backend/app/agents/orchestrator.py - Analysis Orchestrator → Historical Event Retrieval: retrieves events
backend/app/agents/orchestrator.py - Analysis Orchestrator → Market Data Service: loads market context
backend/app/agents/orchestrator.py - Analysis Orchestrator → Risk Agent: dispatches
backend/app/agents/orchestrator.py - Analysis Orchestrator → Scenario Agent: dispatches
backend/app/agents/orchestrator.py - Analysis Orchestrator → Hedging Agent: dispatches
backend/app/agents/orchestrator.py - Risk Agent → Quantitative Risk Engine: calculates risk
backend/app/agents/risk_agent.py - Analysis Orchestrator → PostgreSQL / pgvector: persists run data
backend/app/agents/orchestrator.py - Analysis Orchestrator → Analysis State and Evidence: updates state
backend/app/agents/orchestrator.py - Historical Event Retrieval → Embedding Service: embeds queries
backend/app/services/historical_rag_service.py - Historical Event Retrieval → PostgreSQL / pgvector: retrieves vectors
backend/app/services/historical_rag_service.py - Historical Event Retrieval → Redis Cache: reads cache
backend/app/services/historical_rag_service.py - Acquisition Pipeline → Historical Data Sources: downloads
scripts/data_acquisition/run_pipeline.py - Acquisition Pipeline → Normalization and Dataset Build: builds datasets
scripts/data_acquisition/run_pipeline.py