How thangvawn/agent_financial works
Risk Dashboard provides Vietnamese-market risk analysis and a React product dashboard. The documented data-to-result workflow ingests market and macro series into a panel, runs quantitative risk models, optionally adds multi-agent/LLM analysis, and serves results through FastAPI to the dashboard. Product routes also cover onboarding, financial health, goals, investing, news, learning, community, Pro Lab, and administration. Edges between sampled backend components use the excerpts or SOURCE INDEX; broader subsystem links rely on README statements, so unsampled internal calls are not inferred.
Main entry points: main.py FastAPI service · eod_pipeline.py EOD quant pipeline · services.py Guided investing · App.jsx React application
Components 32
Dashboard experience
- React application
frontend/src/App.jsx - Product routes
frontend/src/app/domainRoutes.js - FastAPI service
src/risk_dashboard/api/main.py
Market data and quant
- Data ingestion CLI
src/risk_dashboard/cli/ingest.py - Panel construction
src/risk_dashboard/data/ingest.py - Panel runtime store
src/risk_dashboard/platform/runtime/panel_store.py - Watchlist prices
src/risk_dashboard/data/watchlist_prices.py - EOD quant pipeline
src/risk_dashboard/quant/eod_pipeline.py - Risk model
src/risk_dashboard/quant/xgb_engine.py - VAR analysis
src/risk_dashboard/quant/var_engine.py - Portfolio backtests
src/risk_dashboard/quant/backtest.py - Risk snapshots
src/risk_dashboard/schemas/snapshots.py
Analysis and assistant
- Multi-agent analysis
src/risk_dashboard/agents/multi_agent.py - AI assistant
src/risk_dashboard/modules/ai_assistant/application/services.py - News intelligence
src/risk_dashboard/modules/news_intelligence/application/services.py
User products
- Guided investing
src/risk_dashboard/modules/guided_investing/application/services.py - Investing policies
src/risk_dashboard/modules/guided_investing/domain/policies.py - Financial health
src/risk_dashboard/modules/financial_health - Goals
src/risk_dashboard/modules/goals - Home and onboarding
src/risk_dashboard/modules/home_onboarding - Learning
src/risk_dashboard/modules/learning - Community
src/risk_dashboard/modules/community/application/services.py - Pro Lab
src/risk_dashboard/modules/pro_lab/application/services.py - Provider registry
src/risk_dashboard/modules/pro_lab/providers/registry.py
Administration and safety
- Content operations
src/risk_dashboard/modules/admin_cms/application/runtime_reader.py - Content repository
src/risk_dashboard/modules/admin_cms/infrastructure/repositories/sqlite.py - Trust and safety
src/risk_dashboard/modules/trust_safety/application/services.py - Trust repository
src/risk_dashboard/modules/trust_safety/infrastructure/repositories/sqlite.py - Product analytics
src/risk_dashboard/modules/analytics_monitoring/application/emitter.py - Analytics repository
src/risk_dashboard/modules/analytics_monitoring/infrastructure/repositories/sqlite.py - Application state DB
src/risk_dashboard/platform/database/app_state.py
Other components
- Dashboard user
Connections 34
- Dashboard user → React application: uses
README.md - React application → Product routes: resolves routes
frontend/src/App.jsx - React application → FastAPI service: requests data
- FastAPI service → Panel runtime store: loads panel
src/risk_dashboard/api/main.py - Data ingestion CLI → Panel construction: runs ingestion
src/risk_dashboard/cli/ingest.py - Data ingestion CLI → Panel construction: writes panel
src/risk_dashboard/data/ingest.py - Panel runtime store → EOD quant pipeline: supplies panel
- EOD quant pipeline → Risk model: trains and predicts
src/risk_dashboard/quant/eod_pipeline.py - EOD quant pipeline → VAR analysis: fits VAR
src/risk_dashboard/quant/eod_pipeline.py - EOD quant pipeline → Risk snapshots: builds output
src/risk_dashboard/quant/eod_pipeline.py - FastAPI service → Portfolio backtests: exposes backtests
src/risk_dashboard/api/main.py - FastAPI service → Watchlist prices: exposes prices
src/risk_dashboard/api/main.py - FastAPI service → Multi-agent analysis: serves analysis
- Multi-agent analysis → FastAPI service: returns analysis
README.md - AI assistant → FastAPI service: serves chat
README.md - FastAPI service → React application: serves dashboard
README.md - FastAPI service → News intelligence: serves news
README.md - FastAPI service → Guided investing: serves investing
README.md - Guided investing → Investing policies: applies policies
src/risk_dashboard/modules/guided_investing/application/services.py - FastAPI service → Financial health: serves health
README.md - FastAPI service → Goals: serves goals
README.md - FastAPI service → Home and onboarding: serves onboarding
README.md - FastAPI service → Learning: serves learning
README.md - FastAPI service → Community: serves community
README.md - FastAPI service → Pro Lab: serves Pro Lab
README.md - Pro Lab → Provider registry: selects providers
src/risk_dashboard/modules/pro_lab/application/services.py - Community → Trust and safety: uses safety
src/risk_dashboard/modules/community/application/services.py - Guided investing → Content operations: reads runtime content
src/risk_dashboard/modules/guided_investing/application/services.py - Content operations → Content repository: reads repository
src/risk_dashboard/modules/admin_cms/application/runtime_reader.py - Trust and safety → Trust repository: persists audit
src/risk_dashboard/modules/trust_safety/application/services.py - Product analytics → Analytics repository: stores events
src/risk_dashboard/modules/analytics_monitoring/application/emitter.py - Guided investing → Product analytics: emits events
src/risk_dashboard/modules/guided_investing/application/services.py - Pro Lab → Product analytics: emits events
src/risk_dashboard/modules/pro_lab/application/services.py - FastAPI service → Application state DB: uses app state