Equity Penetration: Graph Modeling and Ownership Calculation in Practice
Equity penetration is a core technique in investment due diligence, supplier onboarding, KYC/AML, related-party review, and state-owned asset supervision, used to trace a company's true ownership through multi-layered shareholding chains. This article explains how to build equity penetration as a stable, scalable, and auditable engineering system. It covers the difference between direct, indirect, and comprehensive ownership ratios, a six-layer architecture spanning data collection through operations, a graph data model for entities and shareholding edges, entity disambiguation and data governance, two penetration algorithms (weighted path traversal and a matrix method for structures containing cycles), actual-controller determination, query API design and performance optimization, and data security and compliance. Readers will get practical modeling principles, Cypher and Python implementations, validation rules, and evaluation criteria they can apply directly.
Equity Penetration: Graph Modeling and Ownership Calculation in Practice
1. Background: Why Equity Structures Must Be Penetrated
In scenarios such as investment due diligence, supplier onboarding, AML customer identification, related-party transaction review, and state-owned asset supervision, a business registration record is often not enough. Registration data reflects only “first-layer shareholders,” while a company’s true ownership is frequently hidden behind multi-layered shareholding chains. Common multi-layer structures include natural person → holding platform → regional subsidiary → project company, or private equity fund → limited partnership → target company.
Looking at ownership without penetration can easily lead to:
- Misjudged ownership: treating a financial investor who holds less than 5% as a bystander with no influence, when that entity may actually control multiple companies through a multi-layer structure.
- Underestimated concentration: a single entity may hold stakes across multiple paths, so its real influence is far greater than any single path suggests.
- Missed related parties: two companies that appear unrelated on the surface may share the same ultimate controller, forming related-party transactions or conflicts of interest.
What equity penetration solves is this: trace layer by layer up (or down) along shareholding relationships to reconstruct ultimate ownership, and calculate the comprehensive holding/control ratio after penetration. Its input is an “equity relationship graph”; its output is penetration reports, ultimate beneficial owner lists, and actual-controller determination results. This article discusses how to turn this process into a stable, scalable, and auditable engineering system.
2. Core Concepts and Criteria
2.1 First, distinguish three types of ratios
| Concept | Calculation | Typical Use |
|---|---|---|
| Direct holding ratio | The capital contribution ratio a shareholder holds directly | Business registration, disclosure documents |
| Indirect holding ratio | The product of the ratios at each layer along a single path | Showing penetration path details |
| Comprehensive holding / actual control ratio | The sum of contributions from the same entity across all paths | Beneficial owner identification, concentration analysis |
Example: if natural person Zhang San holds 60% of Company A, and Company A holds 50% of Company B, then Zhang San’s indirect holding in Company B is 60% × 50% = 30%. If Zhang San also directly holds 10% of Company B, his comprehensive holding in Company B is 30% + 10% = 40%.
Indirect ratios decay multiplicatively. In a structure where each of three layers holds 50%, the bottom layer retains only 12.5%. Comprehensive ratios, by contrast, add up contributions from multiple paths. The two use different criteria and must be labeled separately in reports; they cannot be mixed.
2.2 Control criteria: holding is a path, voting is a weight
The holding ratio reflects the attribution of economic interest. In corporate governance, however, voting rights can be separated from capital contribution through arrangements such as the articles of association, voting agreements, or the partnership agreement of a limited partnership. Determining the actual controller therefore answers two questions:
- Calculated by voting rights, what is the penetrated control ratio?
- Who are the “key nodes” of the control chain, such as the general partner (GP) of a limited partnership, or the party that holds a majority of voting rights?
3. Overall Architecture: A Six-Layer Design
A usable equity penetration system can be divided into six layers along the data flow:
- Data collection layer: integrates with public information sources, self-reported enterprise data, and internal business data, pulling incremental updates on a schedule by frequency.
- Data governance layer: performs code unification, name cleaning, entity disambiguation, and conflict resolution to turn multi-source data into trustworthy “entity–relationship” records.
- Storage layer: a graph database holds entities and shareholding relationships and serves as the primary store for penetration queries; object storage keeps raw files, snapshots, and batch results; a search engine supports fuzzy lookup by name; a relational database stores structured data such as tasks, audit logs, and annotations.
- Computation layer: implements penetration, cycle detection, and actual-controller determination algorithms, exposed through both batch processing and online queries.
- Service layer: provides query interfaces, such as looking up a shareholder chain by company, looking up outbound investments by natural person, batch penetration, and relationship-change subscriptions.
- Operations and security layer: a log service collects runtime logs centrally, monitoring and alerting cover task failure rate and latency, and a container platform hosts compute tasks to support elastic scaling.
These capabilities can be organized by general cloud service categories. For example, on Baidu AI Cloud, object storage can hold raw snapshots, a message queue can drive incremental update tasks, a container platform can host penetration computation, and log services with monitoring and alerting can ensure observability.
4. Graph Model Design
4.1 Modeling principles
- Unified entities: companies, natural persons, partnerships, trust plans, and employee stock ownership platforms are uniformly abstracted as “entity” nodes, with holders and held entities stored without separate tables.
- Clearly defined directed edges: the edge direction is standardized as “holder → held entity” to avoid path duplication caused by bidirectional edges.
- Redundant ratio fields: store the capital contribution ratio, subscribed capital amount, and voting rights ratio (if any) together. Ratios are parsed results of the original disclosed information, so their source and snapshot time should be retained for traceability.
- Validity fields: each edge carries an effective date and an expiry date, supporting reconstruction of the equity structure as of a historical point in time.
4.2 Schema example (illustrative)
{"nodes": [{ "id": "P_001", "type": "PERSON", "name": "Zhang San", "region": "Shanghai" },{ "id": "C_A", "type": "COMPANY", "name": "Company A", "credit_code": "91310000XXXXXXXX", "status": "active" },{ "id": "C_B", "type": "COMPANY", "name": "Company B", "credit_code": "91320000YYYYYYYY", "status": "active" }],"edges": [{ "src": "P_001", "dst": "C_A", "ratio": 0.60, "voting_ratio": 0.60,"paid_capital": 600, "as_of": "2023-01-01", "valid_from": "2020-05-01", "valid_to": null,"source": "public_registry" },{ "src": "C_A", "dst": "C_B", "ratio": 0.50, "voting_ratio": 0.50,"paid_capital": 500, "as_of": "2023-01-01", "valid_from": "2021-03-01", "valid_to": null,"source": "public_registry" }]}
For actual-controller determination, it is recommended to define a separate “voting-rights edge” (such as voting agreements or GP control relationships), stored apart from “holding edges” to avoid mixing the two semantics.
4.3 Graph query pattern example
// Accumulate penetration from the target company, capped at 6 layersMATCH p = (root:Company {credit_code: $code})<-[:HOLDS*1..6]-(holder)WITH p, holder,reduce(r = 1.0, rel IN relationships(p) | r * rel.ratio) AS cum_ratioWHERE all(rel IN relationships(p) WHERE rel.valid_to IS NULL)RETURN holder.id, holder.name, holder.type, sum(cum_ratio) AS total_ratioORDER BY total_ratio DESC
This pattern only works on acyclic subgraphs with relatively few paths. When circular shareholding exists, the same node may be counted repeatedly, so cycle-identification logic must be handled centrally in the application layer.
5. Data Governance: Making Entities Unique and Trustworthy
5.1 Entity disambiguation
Data quality problems fall into four main categories:
- Former names, abbreviations, and English names are not unified;
- Natural persons share the same name;
- Sole proprietors have no unified code;
- Data from different sources conflicts with each other.
Engineering practice recommends a “layered matching” strategy:
- Prioritize strong identifiers: when a Unified Social Credit Code is present, merge directly; for natural persons, first place an internal ID placeholder, then match by features such as name, hashed ID number, employed companies, and address.
- Candidate generation (bucketing): build candidate sets by name similarity, registered location, and other attributes to avoid pairwise full comparisons.
- Scoring decision: score based on combined features such as name similarity, overlapping legal representatives, matching addresses, and contact phone numbers; merge automatically above a threshold, and route gray-zone cases to manual review.
- Feedback loop: manual review results flow back as training samples to continuously refine the matching rules.
5.2 Validation rules
- The sum of capital contribution ratios should deviate from 1 by no more than a tolerance (for example, 0.5 percentage points); mark “data anomaly” when exceeded.
- Cross-check capital contributions against registered capital.
- Handle subscribed and paid-in capital separately; penetration uses the subscribed ratio by default, with a toggle to switch to the paid-in basis.
- For deregistered or revoked entities, truncate their shareholding relationships by validity period.
5.3 Evaluation metrics
Entity merging involves a trade-off between precision and recall: over-merging creates false associations, while under-merging breaks shareholding chains. It is recommended to sample and evaluate regularly, and to monitor the proportion of anomalous nodes and isolated nodes.
6. Penetration Algorithm Implementation
6.1 Weighted path traversal (path method)
The path method traverses upward layer by layer from the target entity. Each path yields a contribution value by “multiplying the ratios at each layer,” and contributions are then aggregated by entity. Summing contributions from multiple paths for the same entity gives the comprehensive holding ratio; encountering an already-visited node is treated as a cycle.
from collections import defaultdict, dequedef ultimate_owners(shareholders, target, max_depth=10, threshold=1e-6):"""Weighted path-traversal penetration.shareholders: {held_entity_id: [(holder_id, ratio, edge_id), ...]}Returns: {terminal_entity_id: cumulative penetration ratio}"""result = defaultdict(float)# Queue element: (current node, cumulative ratio from target, set of edge IDs on current path)queue = deque([(target, 1.0, frozenset())])while queue:node, weight, path_edges = queue.popleft()if weight < threshold: # decay pruningcontinueif len(path_edges) >= max_depth: # depth cutoffresult[node] += weightcontinueincoming = shareholders.get(node, [])if not incoming: # no upper-layer holder -> penetration endpointresult[node] += weightcontinuefor holder, ratio, edge_id in incoming:if edge_id in path_edges: # cycle detectionresult["<cycle>"] += weight * ratiocontinuequeue.append((holder, weight * ratio, path_edges | {edge_id}))return dict(result)
Implementation notes:
- Pruning: discard paths whose cumulative ratio falls below the threshold, avoiding long-tail paths that slow down queries.
- Cycles: use the set of edge IDs as the path identifier, handling both self-loops and composite cycles; contributions from nodes on a cycle are aggregated separately as a “circular shareholding” metric.
- Limits: set a maximum depth to prevent abnormal data from causing infinite traversal.
6.2 Matrix method: an exact solution for structures with cycles
When the equity graph contains cross-shareholding or circular shareholding such as A↔B or A↔B↔C, the path method truncates the ratios on the cycle. Ignoring cycles, let A be the direct holding matrix:
- a[i][j] represents the direct ratio with which entity j holds entity i;
- the diagonal a[i][i] is 0;
- external holders not modeled as holders (such as public shareholders) are grouped into a virtual node “Others.”
Then the comprehensive holding ratio of j in i is
E = A + A² + A³ + … = (I − A)⁻¹ − I
Its meaning is to convert “direct ownership” into “effective control.” The k-th order term Aᵏ represents the sum of contributions from all paths of length k. This is consistent with Leontief’s input–output analysis, where (I − A)⁻¹ converts direct consumption coefficients into total consumption coefficients.
A sufficient condition for this series to converge is that the spectral radius of A is less than 1. Real-world equity structures are usually “sub-stochastic matrices” (each row sums to no more than 1), so this condition holds as long as external holders exist. For a fully closed 100% circular structure, use the path method instead and flag it as an anomaly.
import numpy as npdef penetration_matrix(shareholders, nodes, max_iter=200, tol=1e-12):"""Matrix iterative method; result is equivalent to (I-A)^-1 - I.Returns: E[i][j] = comprehensive holding ratio of entity j in entity i"""n = len(nodes)idx = {node_id: i for i, node_id in enumerate(nodes)}A = np.zeros((n, n))for company, holders in shareholders.items():if company in idx:for holder, ratio, _ in holders:if holder in idx:A[idx[company], idx[holder]] += ratio # merge parallel edges firsttotal = np.zeros((n, n)) # sum of all path contributionsterm = A.copy() # term currently holds A^kfor _ in range(max_iter):total += termnxt = term @ Aif np.abs(nxt - term).max() < tol: # higher-order terms are negligibletotal += nxtbreakterm = nxtreturn total
Engineering recommendations:
- Sparsification: use sparse matrices, perform block operations within partitions, and partition “by entity × by date” to reuse historical results.
- Single-point queries: when only one target is needed, solve the linear system (I − Aᵀ)x = e_target to obtain a full row of comprehensive ratios for that target, rather than inverting the entire matrix.
- Cross-validation: reconcile the path method against the matrix method, and trigger a data check when sampling deviation exceeds a threshold.
6.3 Actual-controller criteria
Actual-controller determination typically proceeds in three steps:
- Compute: calculate the penetrated ratio of each entity separately by capital contribution ratio and by voting rights ratio.
- Classify: group penetration endpoints into natural persons, state-owned entities, public companies, overseas entities, funds/asset management products, and so on, and set termination levels by business rules; for example, a public company may be kept as a disclosure endpoint.
- Determine: score candidate actual controllers comprehensively. Beyond the largest shareholder and the penetrated ratio, also consider the following factors:
- the share of board seats;
- voting agreement relationships;
- contractual control arrangements;
- holding concentration (such as the Herfindahl index, the sum of the squares of each shareholder’s ratio).
When the largest shareholder’s penetrated ratio falls below a threshold and the remaining shareholders are dispersed, a candidate conclusion of “no actual controller” or “joint control” can be output for confirmation by business experts.
6.4 Special structure handling
| Structure Type | Handling Strategy |
|---|---|
| Limited partnership | Usually penetrate to the GP to judge control, and to the major LPs to judge economic interest; employee stock ownership platforms can be marked as termination nodes |
| Asset management products / trust plans | Penetrate by manager and unit holders; when information is insufficient, mark as “limited penetration” |
| Nominee shareholding | Cannot be identified from public data; risk can only be indicated through circumstantial evidence such as employment or guarantees |
| Nominal shareholders and gaps | When a node with no available upstream information appears in the chain, output the gap location rather than forcing a conclusion |
7. Engineering Implementation: Query Interfaces and Performance
7.1 Interface design (illustrative)
POST /equity/penetration{"node_id": "C_B","direction": "up","ratio_type": "paid_capital","max_depth": 10,"threshold": 0.001,"as_of": "2024-06-30","include_paths": true}
The response contains both a comprehensive ratio list and detailed paths:
{"summary": [{ "node_id": "P_001", "type": "PERSON", "total_ratio": 0.4 },{ "node_id": "F_001", "type": "FUND", "total_ratio": 0.5 }],"paths": [{ "chain": ["P_001", "C_A", "C_B"], "ratios": [0.6, 0.5], "cum_ratio": 0.3 },{ "chain": ["P_001", "C_B"], "ratios": [0.1], "cum_ratio": 0.1 }],"diagnostics": { "cycles": [], "break_points": [] }}
7.2 Query performance optimization
- Read/write separation: batch penetration runs as offline computation, while online queries read only from result tables.
- Result precomputation and caching: pre-generate penetration snapshots for high-frequency entities; when a shareholding relationship changes, recompute only the affected subgraph.
- Indexing and partitioning: build indexes by Unified Social Credit Code, name, and hashed ID number; partition data by entity and date, and retain historical snapshots to support point-in-time queries.
- Asynchrony: large-scale batch tasks are smoothed through a message queue and consumed elastically by compute tasks in the container platform; task status and progress are written to the relational database, and results to object storage.
- Batch scenarios: for entities with a very large number of holders (such as the parent company of a large group), use the matrix method instead of point-by-point traversal.
7.3 Observability and testing
Monitoring and alerting should cover at least:
- incremental task failure rate and latency;
- P95 latency of a single penetration;
- sudden spikes in the proportion of cycles and gaps;
- data source synchronization anomalies.
Test cases should cover at least:
- single-chain penetration;
- multi-path summation;
- ratio decay;
- self-loops and composite cycles;
- nodes above the threshold;
- missing shareholder data.
It is recommended to maintain a “golden dataset” and run a regression on every rule or model change, reconciling it against the matrix method’s results.
8. Data Security and Compliance
- Data sources: rely primarily on publicly disclosed or lawfully authorized data, clearly specifying source and collection time, and do not use data from illegitimate channels.
- Minimum necessary: information about natural persons follows the minimum-necessary principle; fields such as ID numbers are stored encrypted and displayed masked, with restricted purpose and access scope.
- Permissions and auditing: control access by role; retain an operation log for every query to meet auditability requirements.
- Positioning of conclusions: penetration results should be positioned as data references that aid decision-making, with major judgments reviewed by business and legal staff.
9. Summary
On the surface, equity penetration is simply “tracing shareholders upward,” but in engineering terms it must solve five problems at once:
- Data trustworthiness (entity disambiguation and multi-source conflict resolution);
- Correct semantics (distinguishing holding paths, voting-rights paths, and economic interest);
- Complete algorithms (mutual validation of the path method and matrix method, with correct cycle handling);
- Engineering control (precomputation, caching, asynchrony, and observability);
- Auditable output (retaining source, point in time, and decision basis).
Only when these layers are done well can an equity penetration system evolve from a one-off script into a general-purpose capability that sustainably supports due diligence, risk control, and compliance.
