Engineering Equity Penetration Analysis with Large Language Models

    This article explains how to build a reliable equity penetration analysis system using large language models, covering the problem scope, graph-based data modeling, indirect ownership calculation, cycle handling, control identification, cloud architecture, and quality validation. It shows how to turn noisy business registry data into a directed graph, compute indirect holding ratios through path multiplication or matrix operations, resolve circular ownership, and output explainable control conclusions that analysts can review.

    1. Problem Background and Capability Boundaries

    In due diligence, supply chain risk review, and compliance onboarding, equity penetration is a frequent and error-prone foundational analysis. Penetration means starting from a target entity, tracing upward layer by layer along shareholding relationships until reaching a terminal node such as a natural person, a state-owned asset entity, or a publicly listed shareholder, and then calculating the indirect holding ratio and the ultimate control relationship for each path.

    The boundary must be clear first: equity penetration is not a simple graph traversal, but a composite task involving data governance, graph computation, rule evaluation, and result explanation. Raw data often comes from business registration records, public disclosures, and internal ledgers, with issues such as missing fields, inconsistent definitions, and mixed timestamps. As a result, the core engineering difficulty usually lies not in the algorithm but in data quality and rule consistency.

    2. Data Modeling: Abstracting Registration Facts into a Graph

    A directed graph is recommended: nodes represent entities and edges represent shareholding relationships. Each entity should contain at least a unified identifier, name, type (company, person, or other organization), and status. Each edge should contain at least the shareholder, the invested entity, the holding ratio, subscribed and paid-in capital information, and the registration and change dates.

    1. {
    2. "nodes": [
    3. {"id": "E1001", "name": "Company A", "type": "company"},
    4. {"id": "P2001", "name": "Zhang", "type": "person"}
    5. ],
    6. "edges": [
    7. {"from": "E1001", "to": "E1002", "ratio": 0.60, "date": "2021-03-01"},
    8. {"from": "E1002", "to": "E1003", "ratio": 0.50, "date": "2021-06-15"}
    9. ]
    10. }

    Three things must be handled during modeling: first, unify entity identifiers to avoid incorrectly merging different entities that share the same name; second, preserve the time dimension of relationships to support lookback at historical points in time; third, distinguish direct from indirect holdings to avoid duplicate calculation later.

    3. Penetration Algorithm: Ratio Multiplication and Cycle Convergence

    The most basic indirect holding calculation is path multiplication. If Company A holds 60% of Company B and Company B holds 50% of Company C, then Company A’s indirect holding in Company C is 30%. In implementation, depth-first traversal can enumerate paths, or matrix exponentiation can solve for results in batches.

    1. def penetrate(graph, start, target, ratio=1.0, visited=None):
    2. visited = visited or set()
    3. if start == target:
    4. return [ratio]
    5. visited.add(start)
    6. results = []
    7. for nxt, w in graph.get(start, []):
    8. if nxt in visited:
    9. continue
    10. results += penetrate(graph, nxt, target, ratio * w, visited.copy())
    11. return results

    Real-world graphs almost certainly contain cycles, such as cross-shareholding and nested employee ownership platforms. Two common strategies handle cycles: one is path-level cycle removal, where already-visited nodes on the current path are not explored further, guaranteeing termination; the other is to first condense strongly connected components, compressing each cycle into a super node before computing, which suits large-scale batch analysis. In engineering, combining both is recommended: online queries use path-level cycle removal to guarantee response time, while offline full computation uses condensation to improve throughput.

    4. Control Identification: From Ratio to Actual Control

    A high holding ratio does not always equal control. Multiple evaluation rules are needed: absolute control is usually bounded by holding more than half of the voting rights; relative control looks at the gap between the largest shareholder and the second largest; concerted action relationships, voting rights delegation, and board seat arrangements can all change the conclusion. Therefore, the result layer should output both the “maximum beneficial ratio” and a “control path explanation,” so analysts can review the basis rather than receiving only a number.

    5. Engineering Implementation: Combining General Cloud Components

    In a general cloud environment, object storage can hold registration snapshots and raw files, a message queue can smooth peaks and drive parsing tasks, a container platform can host graph computation and API services, and logging and monitoring with alerting can track task failure rates and latency. Data layering is recommended as raw layer, standardized layer, graph layer, and application layer, validated layer by layer so issues can be traced to a specific batch.

    6. Quality Validation and Observability

    Three types of validation are needed before launch: total volume validation, ensuring each edge ratio falls within a reasonable range; consistency validation, ensuring the same entity’s type and status do not conflict across sources; and sampled manual review, randomly selecting a proportion of paths for verification. Each computation should also record the input version and rule version to ensure results are reproducible and auditable. Only by connecting data governance, algorithms, and rule explanation can equity penetration capability truly and reliably support business decisions.