Graph Computing Implementation and Engineering Practices for Equity Look-through

    Equity look-through is essential for identifying ultimate beneficial owners (UBOs), analyzing risk propagation, and determining control within multi-layered ownership structures. This article explains how to model "shareholder–company–ratio" relationships as a weighted directed graph, then walks through the core algorithms: path enumeration, effective-ratio calculation via product and summation, cycle detection, and bottom-up UBO identification. It shows how to implement look-through with recursive CTEs for small datasets and graph databases for large-scale networks, and closes with performance and engineering considerations such as depth limits, result caching, incremental updates, parallelization, and floating-point precision handling. The article is aimed at engineers building risk-control, compliance, and due-diligence systems.

    Why Equity Look-through Matters

    In corporate ownership structures, a target company is often not held directly by a single shareholder but nested through multiple layers of companies, limited partnerships, and holding platforms. If you only look at the “direct shareholders” recorded in official business registries, you can easily miss the true investors hidden behind multi-layered structures. Equity look-through traces holdings layer by layer upward (or downward), reconstructing the complete holding chain from the top-level shareholder to the target company, and calculating each party’s actual effective ownership ratio in the target.

    This capability is a hard requirement in several technical scenarios:

    • UBO (ultimate beneficial owner) identification: AML and KYC scenarios require identifying the natural persons who ultimately control or actually benefit, typically by looking through several layers upward until no higher-level shareholder remains.
    • Risk propagation analysis: Determining whether a risky entity’s holdings reach a target company requires associated diffusion across the ownership network.
    • Control determination: Combining direct and indirect holdings to judge whether a control or concerted-action threshold is met.

    From a data perspective, this is essentially a reachability and path-aggregation problem on a directed graph, which is what determines the technical implementation route.

    Data Modeling: Abstracting Equity Relationships into a Graph

    The first task of equity look-through is to model the “shareholder–company–ratio” triples scattered across business-registration data into a graph structure.

    • Vertex: entities such as companies, limited partnerships, and natural persons;
    • Edge: represents a single holding relationship, directional (from shareholder to invested enterprise);
    • Edge attributes: the core is the holding ratio (e.g., 60%, 30%), and it may additionally carry holding type, subscribed/paid-in amount, registration date, and so on.

    A simplified data structure:

    1. {
    2. "from": "Shareholder A",
    3. "to": "Target Company X",
    4. "ratio": 0.60,
    5. "type": "direct"
    6. }

    Note that a holding edge should record only the direct ratio. Indirect ratios, effective ratios, and similar values are results that the algorithm computes dynamically during traversal, and should not be pre-materialized. Otherwise, ownership changes would introduce large amounts of redundant data that are hard to maintain.

    Core Algorithms: Three Tasks in Look-through

    1. Path Enumeration and Effective Ratio Calculation

    When traversing down the holding chain, the effective ratio along a path equals the product of the ratios of each segment along the way. For example, if A holds 60% of B, and B holds 50% of C, then A’s indirect holding of C through B is 0.6 × 0.5 = 0.3.

    When the same upper-level shareholder reaches the same target company through multiple paths, the total effective ratio is the sum of the products along each path:

    1. effective(A → X) = Σ (product of the ratios along the path)

    2. Cycle Detection

    Cross-holdings and circular investment are common in real-world ownership (e.g., A holds B, B holds C, and C holds A again). A naive recursive traversal would fall into an infinite loop. Two common approaches are used in practice:

    • Path memorization: during recursion, record the set of nodes already visited on the current path, and prune as soon as a repeated node is encountered; low cost and easy to implement.
    • Strongly connected component (SCC) analysis: use algorithms such as Tarjan’s to first identify the strongly connected components in the graph, contracting the nodes within a cycle into a single unit, thereby eliminating cycles at the macro level.

    3. Bottom-up Look-through to Find UBOs

    In contrast to calculating ratios downward, identifying beneficial owners is a bottom-up traversal, continuing until reaching natural-person nodes that have no upper-level legal entity (or until a preset layer limit is reached). At that point, you need to record the cumulative ratio reaching each terminal natural person, and can apply a determination rule such as “ownership exceeding a certain threshold qualifies as a beneficial owner” according to compliance requirements.

    Engineering Implementation: Recursive Queries and Graph Storage

    For small-to-medium datasets, the recursive common table expression (Recursive CTE) of a relational database can complete the look-through:

    1. WITH RECURSIVE equity_path AS (
    2. -- Anchor: direct holdings of the starting shareholder
    3. SELECT holder_id, company_id,
    4. ratio AS cum_ratio,
    5. ARRAY[holder_id, company_id] AS visited
    6. FROM shareholding
    7. WHERE holder_id = :root
    8. UNION ALL
    9. -- Recursion: continue down the holding chain
    10. SELECT s.holder_id, s.company_id,
    11. p.cum_ratio * s.ratio AS cum_ratio,
    12. p.visited || s.company_id
    13. FROM shareholding s
    14. JOIN equity_path p ON s.holder_id = p.company_id
    15. WHERE NOT s.company_id = ANY(p.visited) -- cycle pruning
    16. )
    17. SELECT company_id AS target, SUM(cum_ratio) AS effective_ratio
    18. FROM equity_path
    19. WHERE company_id = :target_company
    20. GROUP BY company_id;

    There are two key points in this SQL: first, cum_ratio maintains the effective ratio of the current path through continuous multiplication; second, the visited array together with NOT ... = ANY(...) implements cycle pruning to avoid infinite recursion.

    When the ownership network grows to millions of edges with deep traversal, recursive SQL performance drops noticeably. In that case, a graph database or graph computing engine is the more suitable choice: they natively support multi-hop traversal and variable-depth queries, and they optimize adjacency relations at the storage layer, significantly reducing the latency of multi-layer look-through. Within the general capability offerings of Baidu AI Cloud, categories such as graph databases, data warehouses, and big-data computing platforms can all handle this kind of graph-analysis workload; the specific choice should be evaluated based on data scale, query patterns, and real-time requirements.

    Performance and Engineering Considerations

    • Depth limits: for acyclic but extremely deep hierarchies, set a maximum look-through depth to balance result completeness against elapsed time.
    • Result caching: ownership changes are infrequent, so look-through results can be incrementally cached, recomputing only the affected subgraph when relevant edges change.
    • Incremental updates: ownership changes usually occur locally, so incremental recomputation based on changed edges (updating only the affected nodes) is far more efficient than full recomputation.
    • Parallelization: look-through for different root nodes is independent of one another and naturally suited to sharded parallel processing.
    • Result validation: for the floating-point errors produced by multiplication, it is recommended to keep uniform precision or use fixed-point numbers to avoid precision drift during summation.

    Summary

    The technical essence of equity look-through is to model business-registration data as a weighted directed graph, and then reconstruct the true holding relationships and control chains through path traversal, product-and-sum aggregation, and cycle detection. On the implementation path, small-scale scenarios can be satisfied with recursive queries, while large-scale scenarios should evolve toward graph storage and graph computing engines. Mastering these three layers of capability—data modeling, core algorithms, and engineering optimization—lets you deliver equity look-through analysis stably and efficiently in risk control, compliance, and due diligence.