shareholder: the most common legal forms of corporatized SOEs are standard corporate forms such as Limited Liability, Joint Stock Company, among others. An SOE is non-corporatized if it is classified as a state company according to law, and this legal status is not a standard corporate form (i.e., no shareholder structure). A methodology was introduced to perform an analysis of the legal forms to be included in the final database (see Annex 2).

Finally, our database includes those firms that can generate profits and are engaged in market activities. The capacity to generate financial gains and profits implies that SOEs can participate in the market like any private actor that improves efficiency or adjusts prices to compete. This does not mean that only firms reporting profits are included in the Global BOS database, but rather that firms must have the capacity to generate revenues through the provision of goods and services. In this manner, a company is considered as an SOE if it provides a good or service which should be traded at economically significant prices. Based on this criterion, we exclude firms that offer goods or services which are often provided for free, such as firms in health or education services.

The second criteria of the BOS database is a novel algorithm tracing state participation in the corporate sector beyond directly owned firms. The ORBIS ownership information (known as the “links vintage files”) only provides the connection for pairs of companies. In other words, the raw ORBIS files do not directly connect firms in such a way that for company C, we can identify company A as its indirect owner and connect all relationships as in A (y%) -> B (x%) -> C.<sup>17</sup> To address this issue and the lack of an SOE identifying variable in the ORBIS database, we developed an algorithm that retrieves the ownership structure of firms linked to the state using available information on shareholders and direct shareholding percentages.<sup>18</sup> Similar to a genealogic tree, the algorithm reconstructs the linkages at different ownership layers of all firms with state participation and their subsidiaries (and subsidiaries of those subsidiaries, etc.) applying at each stage the 10 percent threshold defined above.<sup>19</sup> The use of the algorithm allows for the identification of indirect shareholding relationships. The construction of the full ownership trees raises a set of methodological issues, including how to deal with loops or circular ownership links, what the maximum depth level for the tree should be, etc. The answer to these questions determines when the algorithm will stop the search for subsidiaries. These issues are addressed in section 4.2.

The output of the algorithm lays the foundation for understanding governments’ corporate structures through ownership relationships at the national and municipal levels. This algorithm delivers the full extent of the linkages between a company and the state, which is key to understanding the real extent of fiscal risks and liabilities posed by SOEs and their subsidiaries, designing corporate governance forms, formulating transparency and accountability requirements, unveiling the risks of crowding out private investment, and addressing plausible distortions to competition (for example in the case of SOEs that are vertically integrated in upstream/downstream sectors). The algorithm captures all interrelated companies even if those are operating across borders. Figure 1 shows part of Pakistan’s SOE ‘ownership tree’ constructed with the algorithm. The tree depicts a set of firms that are owned by the Federal Government of Pakistan (node labeled as “Pakistan”) and a set of firms linked to local governments (nodes labeled as “Government of Khyber Pakhtunkhwa” and “Punjab Provincial Government”).<sup>20</sup>

> 17 There are cases in the ORBIS ‘links’ file, where the direct shareholding percentage is not reported, but a total shareholding is provided. For the latter, however, ORBIS does not report the full ownership path for obtaining the total share and therefore it cannot be used for the purpose of our methodology.

> 18 A more detailed description of how the algorithm works is included in section 4.

> 19 This involved the processing of more than 1.9 billion observations of ownership links and several terabytes of processing capacity to retrieve the trees.

> 20 The algorithm allows to identify the unique code of the companies operating across borders and the country of location. For instance, the ownership tree reveals that SONANGOL, a large oil and conglomerate group has more than 200 subsidiaries operating in countries such as Brazil,

8