How deepmehta06/investiq works
Portfolio Optimization Engine is a React dashboard for configuring and comparing historical, ML-enhanced, and Black-Litterman portfolio strategies. The user selects assets, dates, an objective, and optional Black-Litterman views, then runs an optimization request and reviews portfolio metrics; efficient-frontier and allocation charts are documented as planned. The README documents the backend architecture, but the backend directories contain no sampled implementation, so those relationships reflect README claims rather than inspected code. The frontend-to-backend workflow is supported by the sampled frontend source and README.
Main entry points: ConfigPanel.tsx Config Panel · usePortfolioStore.ts Portfolio State · optimization Optimization Core · AppShell.tsx App Shell
Components 22
Dashboard
- Application
frontend/src/App.tsx - App Shell
frontend/src/components/AppShell/AppShell.tsx - Health Indicator
frontend/src/components/TopBar/TopBar.tsx - Results Area
frontend/src/components/ResultsArea/ResultsArea.tsx - Risk Metrics
frontend/src/components/MetricsRow/MetricsRow.tsx - Metric Card
frontend/src/components/MetricsRow/MetricCard.tsx
Configuration
- Config Panel
frontend/src/components/ConfigPanel/ConfigPanel.tsx - Asset Selector
frontend/src/components/ConfigPanel/AssetSelector.tsx - Strategy Selector
frontend/src/components/ConfigPanel/StrategyToggle.tsx - Objective Selector
frontend/src/components/ConfigPanel/ObjectiveSelector.tsx - BL Views
frontend/src/components/ConfigPanel/BLViewsTable.tsx
Request and State
- Portfolio State
frontend/src/store/usePortfolioStore.ts - API and Domain Types
frontend/src/types/index.ts - Optimization Flow
frontend/src/hooks/useOptimize.ts - API Client
frontend/src/services/apiService.ts
Optimization Backend
- FastAPI
backend/api - Optimization Core
backend/optimization - ML Covariance
backend/core - Black-Litterman
backend/optimization - Market Data
backend/data - Risk Metrics Engine
backend/risk
Other components
- Analyst
Connections 28
- Analyst → Config Panel: configures
frontend/src/components/ConfigPanel/ConfigPanel.tsx - Application → App Shell: renders
frontend/src/App.tsx - App Shell → Health Indicator: renders
frontend/src/components/AppShell/AppShell.tsx - App Shell → Config Panel: renders
frontend/src/components/AppShell/AppShell.tsx - App Shell → Results Area: renders
frontend/src/components/AppShell/AppShell.tsx - Config Panel → Asset Selector: renders
frontend/src/components/ConfigPanel/ConfigPanel.tsx - Config Panel → Strategy Selector: renders
frontend/src/components/ConfigPanel/ConfigPanel.tsx - Config Panel → Objective Selector: renders
frontend/src/components/ConfigPanel/ConfigPanel.tsx - Config Panel → BL Views: renders conditionally
frontend/src/components/ConfigPanel/ConfigPanel.tsx - Asset Selector → Portfolio State: updates
frontend/src/components/ConfigPanel/AssetSelector.tsx - Strategy Selector → Portfolio State: updates
frontend/src/components/ConfigPanel/StrategyToggle.tsx - Objective Selector → Portfolio State: updates
frontend/src/components/ConfigPanel/ObjectiveSelector.tsx - BL Views → Portfolio State: updates
frontend/src/components/ConfigPanel/BLViewsTable.tsx - Config Panel → Optimization Flow: runs
frontend/src/components/ConfigPanel/ConfigPanel.tsx - Optimization Flow → Portfolio State: reads and updates
frontend/src/hooks/useOptimize.ts - Optimization Flow → API Client: submits request
frontend/src/hooks/useOptimize.ts - API Client → FastAPI: sends HTTP request
README.md - FastAPI → Optimization Core: dispatches optimization
README.md - Optimization Core → ML Covariance: uses covariance estimator
README.md - Optimization Core → Black-Litterman: uses strategy
README.md - Optimization Core → Market Data: retrieves market data
README.md - FastAPI → API Client: returns result
frontend/src/services/apiService.ts - Results Area → Portfolio State: reads result state
frontend/src/components/ResultsArea/ResultsArea.tsx - Results Area → Risk Metrics: renders
frontend/src/components/ResultsArea/ResultsArea.tsx - Risk Metrics → Portfolio State: reads metrics
frontend/src/components/MetricsRow/MetricsRow.tsx - Risk Metrics → Metric Card: renders
frontend/src/components/MetricsRow/MetricsRow.tsx - Health Indicator → API Client: checks health
frontend/src/components/TopBar/TopBar.tsx - Optimization Core → Risk Metrics Engine: computes risk metrics