Equity Penetration for Identifying Ultimate Controllers: Graph Modeling and Algorithm Implementation
This article explains how to use equity penetration to trace ownership chains up to natural persons and calculate each holder's effective stake in a target company. It covers directed graph modeling, path-based percentage aggregation, handling of circular shareholding, control determination rules, and engineering considerations such as point-in-time queries, numerical precision, and data quality.
1. Background and Problem Definition
Equity penetration means tracing ownership links between companies upward, layer by layer, until reaching natural persons or entities with no further upstream shareholders. It then calculates the effective percentage that each end holder owns in the target company through each path. This work supports many business scenarios, including beneficial owner identification for anti-money laundering (AML), identification of related parties and related-party transactions, assessment of risk concentration among counterparties in the same industry, mergers and acquisitions due diligence, and verification of disclosures by listed companies.
Equity penetration needs to answer three questions:
- Which entities ultimately hold equity in the target company.
- What percentage each end holder indirectly owns in the target company.
- Among these holders, which one can exercise control over the target company.
The first question is a graph traversal problem, the second is a ratio calculation problem, and the third is a business rule problem. Each maps to a different technical module, so they should be implemented separately.
2. Data Model for Equity Relationships
2.1 Entities and Edges
An equity network can be modeled as a directed graph. Nodes fall into two types: legal persons or other organizations, and natural persons. Each directed edge represents one shareholding relationship. It points from the shareholder to the invested company and carries the shareholding percentage.
The entity table should contain at least the following fields:
- Entity ID, unique within the system.
- Entity type, either legal person or natural person.
- Unified Social Credit Code (the national business identifier used in China) or another verifiable external identifier.
- Status, such as active, deregistered, or revoked.
The shareholding table should contain at least the following fields:
- Shareholder ID and invested company ID.
- Shareholding percentage. It is recommended to store this as an integer in basis points (units of 0.01%) to avoid floating-point errors.
- Effective date and expiry date, used for point-in-time queries.
- Data source and collection timestamp, used for traceability and reconciliation.
2.2 Point-in-Time Queries
Equity changes over time, so each penetration result must be tied to a specific point in time. A common approach is to pass a reference date with the query and include only the shareholding edges valid on that date. Without point-in-time control, historical equity and current equity mix together, and the conclusions become distorted.
2.3 Numerical Precision
Multiplying shareholding percentages along a path produces many decimal places. Using floating-point numbers directly can make the shares fail to sum to one. It is recommended to use fixed-point or high-precision decimal types for intermediate calculations, round the final output by a fixed rule, and record the error range after rounding.
3. Path Multiplication and Ratio Aggregation
3.1 Basic Principle
Suppose target company T has two shareholders: company A and natural person P. A holds 60% of T. Among A’s shareholders, natural person Q holds 50% of A. Then Q indirectly holds 60% × 50% = 30% of T.
If an end holder owns the target company through multiple paths, its total percentage equals the sum of the path percentages. In other words, the percentage for one end holder equals the sum of the products of percentages along all of its paths.
3.2 Recursive Solution for Acyclic Structures
When there is no circular shareholding, the equity graph is a directed acyclic graph (DAG). For each company, you can define a mapping from end holders to their percentages. The recursion works as follows:
- If a shareholder is a natural person, its contribution to the company is its shareholding percentage.
- If a shareholder is a company, multiply each end holder’s percentage in that shareholder’s upstream mapping by the percentage the shareholder holds in this company, then add the results for each holder.
Pseudocode:
function upstream_penetration(company c, cache):if cache contains c:return cache[c]result = empty mapfor each shareholder edge (s, r) of c:if s is a natural person:result[s] = result[s] + relse:sub_result = upstream_penetration(s, cache)for each (h, w) in sub_result:result[h] = result[h] + r × wcache[c] = resultreturn result
The cache prevents the same company from being calculated more than once. When equity structures interweave, one intermediate company can lie on many paths. Caching reduces the complexity from the number of paths to the order of the number of nodes and edges.
3.3 Result Validation
After penetration, run two types of validation.
First, check whether the sum of direct shareholders’ percentages falls within a reasonable range. In business registration records, some capital contributions may not be fully disclosed, so a sum less than one is normal. Mark these gaps as “undisclosed portion.” Do not allocate them to a single entity to bring the total to 100%.
Second, check whether the sum of end-holder percentages from the penetration matches the total from the direct shareholders. A large gap usually means the graph data has missing or duplicate edges.
4. Handling Circular Shareholding
4.1 Origin of the Problem
Circular shareholding occurs when companies form a closed loop. For example, A holds B, B holds C,
