System Context Diagram - sgajbi/portfolio-analytics-system GitHub Wiki

System Context Diagram

This diagram illustrates how the Portfolio Analytics System fits into a typical wealth management firm's technology landscape. It is not a standalone application, but rather a central engine that integrates with a client's existing data sources and applications.

graph TD
    subgraph "External Data Sources"
        MarketDataProvider["Market Data Provider (e.g., Refinitiv, Bloomberg)"]
        Custodian["Custodian Bank Feeds"]
        OMS["Order Management System (OMS)"]
    end

    subgraph "Client's Cloud or On-Premise Environment"
        direction LR

        subgraph "Client Integration Layer"
            IntegrationLayer["Client's Integration Layer (Developed by Client)"]
        end

        subgraph "Portfolio Analytics System"
            IngestionAPI["Write-Only Ingestion API (POST /ingest/...)"]
            Pipeline["Core Processing Pipeline:\n- Cost Basis\n- Position History\n- Valuation"]
            QueryAPI["Read-Only Query API (GET /portfolios/...)"]
            IngestionAPI --> Pipeline --> QueryAPI
        end

        subgraph "Client Applications"
            AdvisorWorkstation["Advisor Workstation"]
            ClientPortal["Client Portal and Mobile App"]
            Reporting["Reporting and BI Tools (e.g., Tableau)"]
            Compliance["Compliance and Risk Systems"]
        end
    end

    MarketDataProvider --> IntegrationLayer
    Custodian --> IntegrationLayer
    OMS --> IntegrationLayer

    IntegrationLayer --> IngestionAPI

    QueryAPI --> AdvisorWorkstation
    QueryAPI --> ClientPortal
    QueryAPI --> Reporting
    QueryAPI --> Compliance


How It Works

  1. Data Ingestion: The client develops an Integration Layer (e.g., a set of scripts or a dedicated service). This layer is responsible for fetching data from the firm's primary sources (like an OMS or custodian feeds) and transforming it into the format required by our Ingestion API.

  2. Core Processing: Once data is ingested, the Portfolio Analytics System takes over. It validates, persists, and enriches the data, performing all the complex calculations for cost basis, position keeping, and valuation in near real-time.

  3. Data Consumption: The client's existing applications (or new ones they build) are then modified to call our Query API. This allows them to pull accurate, on-demand analytical data to power their advisor dashboards, client portals, and reporting tools without having to build or maintain the complex calculation logic themselves.