How aditri-07/fo-analytics works
This is a simulated-data front-office trade analytics platform. Its main workflow generates lifecycle-event feeds, loads and validates them, promotes accepted events into trade state and an audit trail, then derives daily positions and analytics for desk users. Separate product branches provide sales/client insights, natural-language queries, a dashboard, and a C++ position/P&L engine. The graph uses documented workflow links where source wiring was not sampled; those limits are noted with evidence references or unverified dashed edges.
Main entry points: schema.sql Analytics database · dashboard.py Desk dashboard · agent.py Query agent · pipeline.py ETL promotion
Components 20
Feed and ETL
- Feed generator
fo/simulator/feed_generator.py - Simulated feeds
- DB bootstrap
fo/db/database.py - Feed loader
fo/etl/loader.py - DQ validator
fo/etl/validator.py - ETL promotion
fo/etl/pipeline.py
Trade domain
- Analytics database
fo/db/schema.sql - Trade lifecycle
fo/models/trade.py - Portfolio positions
fo/models/portfolio.py
Analytics
- Position marks
fo/analytics/marks.py - EOD snapshots
fo/analytics/snapshots.py - Portfolio analytics
fo/analytics/portfolio.py - Sales analytics
fo/analytics/sales.py
Query and dashboard
- Query agent
fo/ai/agent.py - Analytics tools
fo/ai/tools.py - Gemini service
- Desk dashboard
dashboard.py
Position engine
- Python engine
fo/engine/positions.py - C++ engine
cpp/engine.cpp
Other components
- Desk user
Connections 24
- Desk user → Feed generator: requests simulation
README.md - Feed generator → Simulated feeds: writes feeds
README.md - Simulated feeds → Feed loader: loads files
README.md - DB bootstrap → Analytics database: initializes schema
fo/db/database.py - Feed loader → Analytics database: stages feed rows
- ETL promotion → DQ validator: validates rows
fo/etl/pipeline.py - ETL promotion → Analytics database: promotes events
fo/etl/pipeline.py - ETL promotion → Trade lifecycle: updates trade state
README.md - Analytics database → Position marks: supplies trades
- Position marks → Analytics database: writes marks
- EOD snapshots → Analytics database: writes snapshots
- Analytics database → Portfolio analytics: queries positions
fo/analytics/portfolio.py - Analytics database → Sales analytics: queries trades
fo/analytics/sales.py - Desk user → Query agent: asks questions
README.md - Query agent → Gemini service: routes query
fo/ai/agent.py - Query agent → Analytics tools: dispatches calls
fo/ai/agent.py - Analytics tools → Portfolio analytics: calls functions
fo/ai/tools.py - Analytics tools → Sales analytics: calls functions
fo/ai/tools.py - Desk user → Desk dashboard: views analytics
README.md - Desk dashboard → Portfolio analytics: uses analytics
dashboard.py - Desk dashboard → Sales analytics: uses analytics
dashboard.py - Desk dashboard → Query agent: offers query tab
dashboard.py - Portfolio positions → Python engine: keeps positions
- Python engine → C++ engine: delegates computation
README.md