Introduction

This is an R Markdown Notebook demonstrating some of fundManageR’s ADV data acquisition functions.

Setup

packages <-
  c('fundManageR', 'tidyverse','formattable', 'stringr')
lapply(packages, library, character.only = T)

Explore Most Recent ADV Filing Summary

Lets start this tutorial exploring some big picture information, specifically summary data filed with the SEC as of October 1st, 2016. To acquire the data run the get_data_adv_managers_current_period_summary function.

most_recent_data <-
  get_data_adv_managers_current_period_summary(file_directory = NULL)
The working directory was changed to /Users/alexbresler inside a notebook chunk. The working directory will be reset when the chunk is finished running. Use the knitr root.dir option in the setup chunk to change the the working directory for notebook chunks.

The data should be loaded in to your environment allowing us to commence our analysis. To get started lets find the country’s 15 largest investment managers by Total AUM and explore the distribution of managed capital by state.

Top 15 Asset Managers by AUM

most_recent_data %>% 
  dplyr::select(nameEntityManager, locationOfficePrimary, amountAUMTotal, countEmployeesTotal) %>% 
  head(15) %>% 
  formattable()

Distribution of Assets Under Management, Employees and Managers by State

most_recent_data %>%
  group_by(stateOfficePrimary) %>%
  summarise(
  amountAUMTotal = sum(amountAUMTotal, na.rm = T) %>% currency(digits = 0),
  countEmployeesTotal = sum(countEmployeesTotal, na.rm = T) %>% comma(digits = 0),
  countCompanies = n() %>% comma(digits = 0)
  ) %>% 
  ungroup %>% 
  arrange(desc(amountAUMTotal)) %>% 
  formattable()

There is so much more we can do exploring the summary data, a subject I will explore in another tutorial or blog post in the near future but now let’s move on into a deeper dive of one of the world’s most prominent investment managers.

Sleuthing Blackstone

The Blackstone Group is one of the most powerful and important players in global finance. Despite being a public company, much of the company’s inner workings are difficult are to come by, something fundManageR will help us with. We will leverage the package’s manager adv functions combined with some specific author human intelligence including known affiliates, i.e. Blackstone owns GSO Capital, to achieving the following goals:

Blackstone Affilliates.

Here were are going to take the master list of all filing managers and eliminate everything but possible Blackstone entities. To help do this we will leverage knowing that Blackstone’s primary office is at 345 Park Avenue in Manhattan, that they are affiliated with GSO Capital, the company sometimes uses a BREP pseudonym for Blackstone Real Estate Partners and that their website is blackstone.com

possible_bx_companies <- 
  most_recent_data %>%
  dplyr::filter(
    nameEntityManager %>% str_detect("BLACKSTONE REAL|BREP|GSO") |
      locationOfficePrimary %>% str_detect("^345 PARK AVENUE") |
      urlManager %>% str_detect('blackstone.com')
  ) %>%
  dplyr::select(
    idCRD,
    nameEntityManager,
    urlManager,
    locationOfficePrimary,
    urlManager,
    countEmployeesTotal,
    amountAUMTotal
  )
possible_bx_companies %>% 
  formattable()

Possible Blackstone Entities to Resolve

Blackstone may have up to 34 SEC registered entities. Let’s try to whittle this list down and find only entities we can be sure are related to Blackstone. We can make a best guess human judgment and exclude any entity on a completely different floor and with a unique website that doesn’t refer to Blackstone or its known {by me, Alx Bresler} affiliates. Using this logic we eliminate, DBX/Deutsche, and Wafra. Finally, I want to exclude any entity, even if it is part of Blackstone, that had no reported capital.

possible_bx_companies <-
  possible_bx_companies %>%
  dplyr::filter(
    !nameEntityManager %>% str_detect('LADDER CAPITAL ASSET MANAGEMENT LLC|DEUTSCHE|DBX|WAFRA|DB ') # exclude known non rlations
  ) %>%
  dplyr::filter(amountAUMTotal > 0) # exclude managers with no AUM

Blackstone Entities to Resolve

possible_bx_companies %>% 
  formattable()

Excellent, we now have a list of 28 managers that we either know, or have a good degree of certainty may be a part of Blackstone. Lets see what fundmanageR will help us discover. To make things easier lets store the list of Blackstone CRDs into a vector that we can use to iterate throughfundManageR.

blackstone_crds <- 
  possible_bx_companies$idCRD

Resolve Unknown Possible Blackstone Entities and Explore Manager Brochure PDF Filings

The package allows users to explore any manager’s most recent Part 2 brochure filings. The functions allow you to explore a PDF’s metadata and it’s underlying text. This function can be useful for tasks including: text extraction, sentiment analysis, and entity resolution. Let’s demonstrate

Read in Brochure Data

blackstone_brochure_data <-
  get_data_adv_managers_brochures(search_names = NULL,
                                  crd_ids = blackstone_crds, 
                                  split_pages = T)
idCRD: 136979 - Manager Brochure
idCRD: 107580 - Manager Brochure
idCRD: 142979 - Manager Brochure
idCRD: 137519 - Manager Brochure
idCRD: 144537 - Manager Brochure
idCRD: 146043 - Manager Brochure
idCRD: 134009 - Manager Brochure
idCRD: 135952 - Manager Brochure
idCRD: 160157 - Manager Brochure
idCRD: 226598 - Manager Brochure
idCRD: 165782 - Manager Brochure
idCRD: 158784 - Manager Brochure
idCRD: 138208 - Manager Brochure
idCRD: 172235 - Manager Brochure
idCRD: 152294 - Manager Brochure
idCRD: 165796 - Manager Brochure
idCRD: 171640 - Manager Brochure
idCRD: 142922 - Manager Brochure
idCRD: 114716 - Manager Brochure
idCRD: 120934 - Manager Brochure
idCRD: 120936 - Manager Brochure
idCRD: 170801 - Manager Brochure
idCRD: 160080 - Manager Brochure
idCRD: 167263 - Manager Brochure
idCRD: 109106 - Manager Brochure
idCRD: 109099 - Manager Brochure
idCRD: 148943 - Manager Brochure
idCRD: 111871 - Manager Brochure

Entity Resolution

One name, CT INVESTMENT MANAGEMENT CO., LLC sticks out from our prior analysis. It is unclear if this entity is related to Blackstone, none of the prior validation assumptions apply but we also are unable to eliminate it from our list.

One important thing to remember is that there is no one specific way to perform entity resolution, in fact there are countless possibly methods, the key is to be confident that which ever methods you use provides you with results you feel comfortable with. One great feature of fundManageR ADV functions is they provide many possible ways to perform entity resolution. In this example we are going to explore using PDF file metadata in attempt to resolve the unknown entity.

A fantastic feature of the pdftools package is it’s metadata extraction capabilities, something fundManageR utilizes. When a PDF file is processed we unearth a host of fields describing who, what, when, where and how a PDF file was created. One powerful item that may be disclosed is the PDF author field. It is safe to say if we find the person who created CT INVESTMENT MANAGEMENT’s filed brochure and their name appears in the metadata of a brochure we know to be a Blackstone related entity that CT is related to Blackstone.

Lets do it.

ct_author <- 
  blackstone_brochure_data %>% 
  dplyr::filter(nameEntityManager == 'CT INVESTMENT MANAGEMENT CO., LLC') %>% 
  dplyr::select(nameAuthor) %>% 
  distinct %>% 
  .$nameAuthor
ct_validation_test <- 
  blackstone_brochure_data %>% 
  dplyr::select(idCRD, nameEntityManager, nameAuthor) %>% 
  distinct() %>% 
  dplyr::filter(nameAuthor %>% str_detect(ct_author))
ct_validation_test

It looks like buergerm has authored some PDFs are known Blackstone affiliates giving conclusive evidence that CT INVESTMENT MANAGEMENT is a Blackstone affiliated manager and one we can keep in our list as we continue to explore the company.

Text Analysis – Unearthing Management Fees and Tiered Fee Structures

One of the most nontransparent aspects of the investment management industry is the lack of information around fee structures. Unlike say sports, there is no stat line OR clearinghouse for this data. The data itself isn’t standardized, meaning the way it is described, even if it refers to the same thing, varies, a good analogy is imagine if the game of Basketball had 50 different ways to describe what a 3 point shot is. One sad side effect of this paradigm is that it is common practice for investors in the same fund to not know the exact terms fellow investors were given by the fund manager.

A feature of fundManageR that I am extremely proud of is is that it gives us a tool try to discover this deep data. We can parse our OCR’d brochure text and use the tidytext package developed by Julia Silge and David Robinson to slice and dice the text data to zero in on fee structure that a fund’s investors may not even know!

In order to do this we must tokenize the paragraph text into sentences. We then want to try to determine if a sentence has a possible fee reference. To do that we will stringr and it’s str_detect function with a list of management fee hit words, the most important of which being a % sign. Once completed we will take those sentence, tokenize them again into words and look for a number less than or equal to 5 knowing management fees are generally between 1% and 5%.

This workflow is by no means a magic bullet to discover all disclosed management fees but it puts into code enough domain knowledge driven information to hopefully extract out some of the juicy data hidden in the thousands of pages of PDF documents we just scraped and should give us a good understanding of the various fee structures Blackstone charges its investors.

library(tidytext) ## devtools::install_github(juliasilge/tidytext)
sentence_data <-
  blackstone_brochure_data %>%
  dplyr::select(idCRD, nameEntityManager, textBrochure) %>%
  unnest_tokens(sentence, textBrochure, token = "sentences") %>% # tokenize to sentences
  mutate(idSentence = 1:n()) %>% # create sentence IDs to check accuracy later
  mutate(
    hasMGMTFeeReference = sentence %>% str_detect('[1-99]%')  # add column for possible fee reference
  )
possible_fees <- 
  sentence_data %>% 
  dplyr::filter(hasMGMTFeeReference == T) %>%  # filter down to possible sentences
  dplyr::select(idCRD, nameEntityManager, sentence, idSentence) %>% 
  unnest_tokens(word, sentence, token = 'words') %>%  # tokenize to words
  dplyr::filter(word %>% str_detect("^[1-9]")) %>%  # look for numbers 1-9
  mutate(word = word %>% as.numeric) %>%  # convert number to numeric
  dplyr::filter(word <= 5) # look for numbers <=

Potential Management Fee References

possible_fees

Looks good but we invest some time reading the context of each sentence to see if our hacked up algorithm produced results that make sense. We can use the fantastic purrr package’s map function to iterate through the sentences, show us the sentence text and we can then use our own common sense to judge the results.

possible_fees$idSentence %>%
  unique() %>%
  map_chr(function(x) {
    setence_df <- 
      sentence_data %>%
      dplyr::filter(idSentence == x) 
    fee_text <-
      setence_df %>%
      .$sentence %>% paste0('\n', ., '\n')
    setence_df$nameEntityManager %>% paste0('Manager: ',., '\n', fee_text) 
  }) %>% 
  paste0(collapse = '\n') %>% 
  message
Manager: BLACKSTONE ALTERNATIVE ASSET MANAGEMENT LP

item 5 - fees and compensation item 5 - fees and compensation asset-based advisory fees in general, baam charges an asset-based advisory fee of up to 2% of assets under management.

Manager: BLACKSTONE MEZZANINE ADVISORS LP

item 5: fees and compensation for its investment advisory services provided to funds, bx mezzanine or an affiliated entity may receive a management fee at an annual rate of up to 2% of either the net assets or invested capital, which may include capital borrowed from leverage providers, pursuant to the offering and/or governing documents, which are provided to prospective investors.

Manager: BLACKSTONE DEBT ADVISORS L.P.

item 5: fees and compensation for its investment advisory services provided to funds, bda or an affiliated entity may receive a management fee at an annual rate of up to 2% of either the net assets or invested capital, which may include capital borrowed from leverage providers, pursuant to the offering and/or governing documents, which are provided to prospective investors.

Manager: STRATEGIC PARTNERS FUND SOLUTIONS ADVISORS L.P.

management fees for its investment advisory services with respect to the funds, the registrant or an affiliated entity generally receives a management fee at an annual rate of up to 1.5% of the capital commitments or invested capital, as the case may be.

Manager: STRATEGIC PARTNERS FUND SOLUTIONS ADVISORS L.P.

performance-based allocations in addition to the management fees and other fees described in item 5 above, the registrant or one of the general partners generally receives a performance-based allocation of up to 12.5% (or up to 15% for investors that commit to a fund through a feeder vehicle established by a private bank to invest in the fund (a "private bank feeder fund")) of each fund's cumulative net profits, subject to a preferred return and customary clawback provisions.

Manager: BLACKSTONE REAL ESTATE ADVISORS EUROPE L.P.

dollars ("dollar partner"), and (b) 1.25% per annum if such investor has aggregate capital commitments equal to or greater than €100 million, in the case of a euro partner, and $100 million in the case of a dollar partner.

Manager: BLACKSTONE REAL ESTATE ADVISORS EUROPE L.P.

the management fee payable by a brep europe iii investor is: (a) 1.50% per annum if such investor has aggregate capital commitments of less than €200 million, in the case of a euro partner, and $200 million in the case of a dollar partner, (b) 1.25% per annum if such investor has aggregate capital commitments equal to or greater than €200 million, in the case of a euro partner, and $200 million in the case of a dollar partner, and (c) 1.25% per annum for investors with capital commitments to brep europe iii and blackstone real estate partners vi l.p. in excess of $950 million.

Manager: BLACKSTONE REAL ESTATE ADVISORS EUROPE L.P.

the management fee payable by a brep europe iv investor is: (a) 1.5% per annum if such investor has aggregate capital commitments of less than €200 million, in the case of a euro partner, and $250 million in the case of a dollar partner, (b) 1.25% per annum if such investor has aggregate capital commitments equal to or greater than €200 million, in the case of a euro partner, and $250 million in the case of a dollar partner and (c) 1.1% per annum if such investor has aggregate capital commitments equal to or greater than the euro equivalent of $500 million (as converted at the prevailing rate of exchange as of the date prior to such investor's admission date or as otherwise agreed to between such investor and the general partner), in the case of a euro partner, and $500 million in the case of a dollar partner.

Manager: BLACKSTONE REAL ESTATE ADVISORS EUROPE L.P.

irrespective of the capital commitment of such investor, the management fee with respect to a brep europe iv investor that is itself an investment vehicle formed for the purpose of aggregating unaffiliated investors for purposes of investing in brep europe iv is 1.5% per annum.

Manager: GSO CAPITAL PARTNERS LP

item 5: fees and compensation for its investment advisory services provided to funds, gso or an affiliated entity may receive a management fee at an annual rate of up to 2% of either the net assets or invested capital, which may include capital borrowed from leverage providers, pursuant to the offering and/or governing documents, which are provided to prospective investors.

Manager: BLACKSTONE REAL ESTATE ADVISORS V L.P.

in no event, however, will the management fee exceed 1.5% of such capital commitments or 1.5% of invested capital, as the case may be, of the fund.

Manager: BLACKSTONE STRATEGIC ALLIANCE ADVISORS L.L.C.

item 5 - fees and compensation item 5 - fees and compensation asset-based advisory fees in general, bsaa charges an asset-based advisory fee to the bsaa funds of up to 1% of assets under management, which fees scale-down to as low as 0.8% of assets under management based on the amount of capital committed to the bsaa funds by an investor.

Manager: BLACKSTONE STRATEGIC ALLIANCE ADVISORS L.L.C.

item 6 - performance-based fees item 6 - performance-based fees in addition to the asset-based advisory fees disclosed in item 5 - fees and compensation above, bsaa funds also pay (a) a performance fee up to 10% of the increase in net asset value of the investment in underlying managers and co-investments, subject to a loss carryforward provision (which fee may scale-down to as low as 8% based on the amount of capital committed to the bsaa funds by an underlying investor) and (b) up to 20% of the proceeds with respect to manager profit interests and manager buyout interests (which fee may scale- down to as low as 16% based on the amount of capital committed to the bsaa funds by an underlying investor, subject to a high water mark.

Manager: BLACKSTONE REAL ESTATE ADVISORS L.P.

the management fee payable by a brep vi investor is: (a) 1.50% per annum if such investor has aggregate capital commitments of less than $300 million and (b) 1.25% per annum if such investor has aggregate capital commitments equal to or greater than $300 million.

Manager: BLACKSTONE REAL ESTATE ADVISORS L.P.

the management fee payable by a brep vii investor is: (a) 1.50% per annum if such investor has aggregate capital commitments of less than $300 million, (b) 1.25% per annum if such investor has aggregate capital commitments equal to or greater than $300 million but less than $500 million, (c) 1.15% per annum if such investor has aggregate capital commitments equal to or greater than $500 million but less than $800 million and (d) 1.10% per annum if such investor has aggregate capital commitments equal to or greater than $800 million.

Manager: BLACKSTONE REAL ESTATE ADVISORS L.P.

the management fee payable by a brep viii investor is: (a) 1.50% per annum if such investor has aggregate capital commitments of less than $300 million, (b) 1.25% per annum if such investor has aggregate capital commitments equal to or greater than $300 million but less than $500 million and (c) 1.15% per annum if such investor has aggregate capital commitments equal to or greater than $500 million.

Manager: BLACKSTONE REAL ESTATE ADVISORS L.P.

the management fee payable by a brep asia investor is: (a) 1.50% per annum if such investor has aggregate capital commitments of less than $200 million, (b) 1.25% per annum if such investor has aggregate capital commitments equal to or greater than $200 million but less than $500 million and (c) 1.00% per annum if such investor has aggregate capital commitments equal to or greater than $500 million.

Manager: BLACKSTONE REAL ESTATE ADVISORS L.P.

the management fee payable by a brep europe v investor is: (a) 1.5% per annum if such investor has aggregate capital commitments of less than €280 million (or $300 million in the case of an investor making its capital commitment in u.s. dollars), and (b) 1.25% per annum if such investor has aggregate capital commitments equal to or greater than €280 million (or $300 million in the case of an investor making its capital commitment in u.s. dollars).

Manager: GSO / BLACKSTONE DEBT FUNDS MANAGEMENT LLC

item 5: fees and compensation for its investment advisory services provided to funds, dfm or an affiliated entity may receive a management fee at an annual rate of up to 2% of either the net assets or invested capital, which may include capital borrowed from leverage providers, pursuant to the offering and/or governing documents, which are provided to prospective investors.

Manager: BLACKSTONE REAL ESTATE SPECIAL SITUATIONS ADVISORS L.L.C.

item 5: fees and compensation management fees and performance fees pursuant to bressa's advisory agreements with each of the funds, bressa is entitled to compensation for its services in the form of an annual management fee (the "bressa management fee"), payable quarterly at a rate up to 1.5% per annum (varying between funds) of the fund's (i) net asset value, in the case of the funds that are structured as "hedge funds", or (ii) total invested capital, in the case of the funds that are structured as "private equity funds", determined and payable as of the first business day of each calendar quarter for the funds paying in advance.

Manager: BLACKSTONE CLEAN TECHNOLOGY ADVISORS L.L.C.

in no event, however, will the management fee exceed 1.75% per annum of such capital commitments or 1.75% per annum of invested capital, as the case may be, of the fund.

Manager: BLACKSTONE CLEAN TECHNOLOGY ADVISORS L.L.C.

bcta will credit against future management fees 66 2/3% of the management fees charged to date and only charge management fees on invested capital going forward.

Manager: GSO CAPITAL ADVISORS LLC

item 5: fees and compensation for its investment advisory services provided to funds, capital advisors or an affiliated entity may receive a management fee at an annual rate of up to 2% of either the net assets or invested capital, which may include capital borrowed from leverage providers, pursuant to the offering and/or governing documents, which are provided to prospective investors.

Manager: BLACKSTONE ALTERNATIVE SOLUTIONS L.L.C.

item 5 - fees and compensation item 5 - fees and compensation asset-based advisory fees in general, bas charges an asset-based advisory fee of up to 1.5% of assets under management.

Manager: BLACKSTONE ALTERNATIVE SOLUTIONS L.L.C.

item 6 - performance-based fees item 6 - performance-based fees in addition to the asset-based advisory fees disclosed in item 5 - fees and compensation above, bas funds generally will be charged a performance-based fee generally equal to 25% of net profits, inclusive of the underlying manager fee, subject to loss carryforward provisions bas's fees will be reduced by the full amount of any fees paid to bas underlying managers.

Manager: BLACKSTONE ALTERNATIVE INVESTMENT ADVISORS LLC

blackstone alternative investment advisors llc item 5 - fees and compensation item 5 -fees and compensation asset-based advisory fees in general, baia charges an asset-based advisory fee of up to 2% of assets under management.

Manager: BLACKSTONE ALTERNATIVE INVESTMENT ADVISORS LLC

blackstone alternative investment advisors llc item 6 - performance-based fees tem 6 - performance-based fees in addition to the asset-based advisory fees disclosed in item 5 - fees and compensation above, certain baia funds charge a performance-based fee of up to 15% of the positive performance of such baia funds, subject to a loss carryforward provision.

Manager: BLACKSTONE STRATEGIC CAPITAL ADVISORS, L.LC.

item 6 - performance-based fees item 6 - performance-based fees in addition to the asset-based advisory fees disclosed in item 5 - fees and compensation above, the general partner receives a carried interest distribution of up to 20% of the profits realized in respect of each bsca manager interest (or other permitted investment), after the bsca fund first makes distributions to investors in an amount equal to the investors' capital contributions in respect of each bsca manager interest together with an 8% preferred return on such amounts.

Manager: BLACKSTONE MULTI-ASSET ADVISORS L.L.C.

with respect to harrington reinsurance, pursuant to the harrington constituent documents, bmaa is entitled to compensation for its services to harrington partners in the form of an annual management fee, calculated and payable quarterly in arrears as of the last business day of each fiscal quarter, at a rate equal to 1.5% per annum of the net asset value of harrington partners.

Manager: BLACKSTONE SENFINA ADVISORS L.L.C.

item 5 - fees and compensation item 5 - fees and compensation asset-based advisory fees in general, bsa charges an asset-based advisory fee up to 2% per annum based on average assets under management.

Manager: BLACKSTONE PROPERTY ADVISORS L.P.

the bpa management fee payable by a bpp investor (a) with an aggregate capital commitment of less than $300 million, is 1.0% per annum of such investor's proportionate share of the net asset value of bpp, or (b) with an aggregate capital commitment equal to at least $300 million, is 0.85% per annum of such investor's proportionate share of the net asset value of bpp.

Manager: BLACKSTONE PROPERTY ADVISORS L.P.

the bpa management fee payable by a bapp investor is (a) 1.0% per annum of such investor's invested capital and (b) 0.5% per annum of such investor's unpaid capital commitments.

Manager: BLACKSTONE PROPERTY ADVISORS L.P.

the bpa management fee payable by a bppi investor (a) with an aggregate capital commitment of less than $500 million, is 1.0% per annum of such investor's proportionate share of the net asset value of bppi, or (b) with an aggregate capital commitment equal to at least $500 million, is 0.85% per annum of such investor's proportionate share of the net asset value of bppi.

Manager: BLACKSTONE PROPERTY ADVISORS L.P.

however, bpa management fees paid by an investor in the other core+ vehicles are generally determined based on a percentage ranging from 0.5% to 1% per annum of either an investor's invested capital or share of the net asset value of the relevant other core+ vehicle.

Manager: BLACKSTONE PROPERTY ADVISORS L.P.

management fees and performance fees payable to bx reit advisors pursuant to the breit advisory agreement, bx reit advisors is entitled to compensation for its services in the form of a management fee (the "breit management fee" and, together with the bpa management fee, the "management fee") of 1.25% of breit's net asset value per annum payable monthly.

Manager: BLACKSTONE PROPERTY ADVISORS L.P.

in addition to the breit management fees and other fees described in item 5 that are received by bx reit advisors, so long as the breit advisory agreement has not been terminated (including by means of non-renewal), the breit special limited partner will receive performance-based compensation equal to 12.5% of breit's total return (which for any period shall equal the sum of (i) all distributions accrued or paid (without duplication) on the breit operating partnership units outstanding at the end of the period since the beginning of the then- current calendar year plus (ii) the change in aggregate net asset value of such units since the beginning of the then-current calendar year, before giving effect to (x) changes resulting solely from the proceeds of issuances of breit operating partnership units, (y) any allocation/accrual to the performance participation interest and (z) applicable stockholder servicing fee expenses), subject to (a) a hurdle amount of 5% annualized internal rate of return on the net asset value of the breit operating partnership units, and (b) a "high water mark" so that the recoupment of past annual total return losses will offset the positive annual total return for purposes of the calculation of the breit special limited partner's performance participation.

We Did It

While we may have missed some fee disclosures that used strange syntax, anything with basic language around management fees we EASILY discovered! We could take this workflow and apply this to any asset manager to discover management fees or modify it a bit and look for promote structures. Information that VERY few people have and generally is extremely difficult to find we can empower ourselves with in only a few lines of cde.

Part 2 - Deep Diving All Disclosed Manager Information

The most difficult feature to build was fundManageR’s ability to parse the SEC’s absolutely HORRENDUS online ADV forms, here is an example for the brave.

Fortunately this task, though extremely difficult, was doable but parsing an ADV form, especially if you select a manager significant assets under management can be a time consuming process given the size of the webpages being ingested so please, be patient.

Also, instead of selecting all possible sections, the function default, you can specify the specific sections [via the nameSectionActual column] you want the function to pull in, to see your options you can call the get_data_sec_adv_manager_sitemap function. The Private Fund Reporting and Other Manager Information sections tend to be by far the largest pages but they also generally contain the most powerful and useful information.

get_data_sec_adv_manager_sitemap() %>% 
  formattable()

What Can We Learn About Blackstone’s Registered Fund Managers??

The get_data_adv_managers_filings returns a list of nested data frames by entity and section; to make the data easier to explore upon scraping, the default action is to save each section into the user’s environment and we combine the brochure sections with a unique list of values describing the manager into a single data frame assigned to the environment as managerDescription, you can override this by setting flatten_tables to FALSE, in which case you will see each underlying ADV section in its own data frame.

The majority our 28 Blackstone related entities have billions of dollars in assets under management so acquiring data for every section and entity will a while, you can follow the functions progress in the messages but if you recreate this code, sit back, relax, and just please be patient.

blackstone_entity_df <- 
  get_data_adv_managers_filings( 
    search_names = NULL,
    crd_ids = blackstone_crds, ## BE PATIENT !!!
    all_sections = T,
    assign_to_enviornment = T
  )
idCRD: 136979 - Registration
idCRD: 136979 - DRPs
idCRD: 136979 - Identifying Information
idCRD: 136979 - SEC Reporting
idCRD: 136979 - Organization
idCRD: 136979 - Successions
idCRD: 136979 - Advisory Business Information
idCRD: 136979 - Other Business Activities
idCRD: 136979 - Financial Industry Affiliations
idCRD: 136979 - Private Fund Reporting
Parsed BLACKSTONE MANAGEMENT PARTNERS L.L.C. they have 10 fund vehicles and $56,528,584,012.00 in private fund AUM
idCRD: 136979 - Participation or Interest in Client Transactions
idCRD: 136979 - Custody
idCRD: 136979 - Control Persons
idCRD: 136979 - Disclosure Information
idCRD: 136979 - Direct Manager Owners
idCRD: 136979 - Indirect Manager Owners
idCRD: 136979 - Other Manager Information
idCRD: 136979 - Manager Signatories
Parsed BLACKSTONE MANAGEMENT PARTNERS L.L.C.
They have $62,950,761,426 in Total Assets Under Management
idCRD: 107580 - Registration
idCRD: 107580 - DRPs
idCRD: 107580 - Identifying Information
idCRD: 107580 - SEC Reporting
idCRD: 107580 - Organization
idCRD: 107580 - Successions
idCRD: 107580 - Advisory Business Information
idCRD: 107580 - Other Business Activities
idCRD: 107580 - Financial Industry Affiliations
idCRD: 107580 - Private Fund Reporting
Parsed BLACKSTONE ALTERNATIVE ASSET MANAGEMENT LP they have 141 fund vehicles and $53,007,930,592.00 in private fund AUM
idCRD: 107580 - Participation or Interest in Client Transactions
idCRD: 107580 - Custody
idCRD: 107580 - Control Persons
idCRD: 107580 - Disclosure Information
idCRD: 107580 - Direct Manager Owners
idCRD: 107580 - Indirect Manager Owners
idCRD: 107580 - Other Manager Information
idCRD: 107580 - Manager Signatories
Parsed BLACKSTONE ALTERNATIVE ASSET MANAGEMENT LP
They have $59,349,863,824 in Total Assets Under Management
idCRD: 142979 - Registration
idCRD: 142979 - DRPs
idCRD: 142979 - Identifying Information
idCRD: 142979 - SEC Reporting
idCRD: 142979 - Organization
idCRD: 142979 - Successions
idCRD: 142979 - Advisory Business Information
idCRD: 142979 - Other Business Activities
idCRD: 142979 - Financial Industry Affiliations
idCRD: 142979 - Private Fund Reporting
Parsed BLACKSTONE REAL ESTATE ADVISORS L.P. they have 33 fund vehicles and $15,746,255,200.00 in private fund AUM
idCRD: 142979 - Participation or Interest in Client Transactions
idCRD: 142979 - Custody
idCRD: 142979 - Control Persons
idCRD: 142979 - Disclosure Information
idCRD: 142979 - Direct Manager Owners
idCRD: 142979 - Indirect Manager Owners
idCRD: 142979 - Other Manager Information
idCRD: 142979 - Manager Signatories
Parsed BLACKSTONE REAL ESTATE ADVISORS L.P.
They have $56,404,540,029 in Total Assets Under Management
idCRD: 137519 - Registration
idCRD: 137519 - DRPs
idCRD: 137519 - Identifying Information
idCRD: 137519 - SEC Reporting
idCRD: 137519 - Organization
idCRD: 137519 - Successions
idCRD: 137519 - Advisory Business Information
idCRD: 137519 - Other Business Activities
idCRD: 137519 - Financial Industry Affiliations
idCRD: 137519 - Private Fund Reporting
Parsed GSO CAPITAL PARTNERS LP they have 46 fund vehicles and $33,210,412,218.00 in private fund AUM
idCRD: 137519 - Participation or Interest in Client Transactions
idCRD: 137519 - Custody
idCRD: 137519 - Control Persons
idCRD: 137519 - Disclosure Information
idCRD: 137519 - Direct Manager Owners
idCRD: 137519 - Indirect Manager Owners
idCRD: 137519 - Other Manager Information
idCRD: 137519 - Manager Signatories
Parsed GSO CAPITAL PARTNERS LP
They have $38,332,219,304 in Total Assets Under Management
idCRD: 144537 - Registration
idCRD: 144537 - DRPs
idCRD: 144537 - Identifying Information
idCRD: 144537 - SEC Reporting
idCRD: 144537 - Organization
idCRD: 144537 - Successions
idCRD: 144537 - Advisory Business Information
idCRD: 144537 - Other Business Activities
idCRD: 144537 - Financial Industry Affiliations
idCRD: 144537 - Private Fund Reporting
Parsed GSO / BLACKSTONE DEBT FUNDS MANAGEMENT LLC they have 66 fund vehicles and $23,178,956,912.00 in private fund AUM
idCRD: 144537 - Participation or Interest in Client Transactions
idCRD: 144537 - Custody
idCRD: 144537 - Control Persons
idCRD: 144537 - Disclosure Information
idCRD: 144537 - Direct Manager Owners
idCRD: 144537 - Indirect Manager Owners
idCRD: 144537 - Other Manager Information
idCRD: 144537 - Manager Signatories
Parsed GSO / BLACKSTONE DEBT FUNDS MANAGEMENT LLC
They have $36,725,241,327 in Total Assets Under Management
idCRD: 146043 - Registration
idCRD: 146043 - DRPs
idCRD: 146043 - Identifying Information
idCRD: 146043 - SEC Reporting
idCRD: 146043 - Organization
idCRD: 146043 - Successions
idCRD: 146043 - Advisory Business Information
idCRD: 146043 - Other Business Activities
idCRD: 146043 - Financial Industry Affiliations
idCRD: 146043 - Private Fund Reporting
Parsed BLACKSTONE REAL ESTATE SPECIAL SITUATIONS ADVISORS L.L.C. they have 17 fund vehicles and $13,244,837,851.00 in private fund AUM
idCRD: 146043 - Participation or Interest in Client Transactions
idCRD: 146043 - Custody
idCRD: 146043 - Control Persons
idCRD: 146043 - Disclosure Information
idCRD: 146043 - Direct Manager Owners
idCRD: 146043 - Indirect Manager Owners
idCRD: 146043 - Other Manager Information
idCRD: 146043 - Manager Signatories
Parsed BLACKSTONE REAL ESTATE SPECIAL SITUATIONS ADVISORS L.L.C.
They have $21,645,229,587 in Total Assets Under Management
idCRD: 134009 - Registration
idCRD: 134009 - DRPs
idCRD: 134009 - Identifying Information
idCRD: 134009 - SEC Reporting
idCRD: 134009 - Organization
idCRD: 134009 - Successions
idCRD: 134009 - Advisory Business Information
idCRD: 134009 - Other Business Activities
idCRD: 134009 - Financial Industry Affiliations
idCRD: 134009 - Private Fund Reporting
Parsed STRATEGIC PARTNERS FUND SOLUTIONS ADVISORS L.P. they have 29 fund vehicles and $16,646,409,498.00 in private fund AUM
idCRD: 134009 - Participation or Interest in Client Transactions
idCRD: 134009 - Custody
idCRD: 134009 - Control Persons
idCRD: 134009 - Disclosure Information
idCRD: 134009 - Direct Manager Owners
idCRD: 134009 - Indirect Manager Owners
idCRD: 134009 - Other Manager Information
idCRD: 134009 - Manager Signatories
Parsed STRATEGIC PARTNERS FUND SOLUTIONS ADVISORS L.P.
They have $17,475,790,634 in Total Assets Under Management
idCRD: 135952 - Registration
idCRD: 135952 - DRPs
idCRD: 135952 - Identifying Information
idCRD: 135952 - SEC Reporting
idCRD: 135952 - Organization
idCRD: 135952 - Successions
idCRD: 135952 - Advisory Business Information
idCRD: 135952 - Other Business Activities
idCRD: 135952 - Financial Industry Affiliations
idCRD: 135952 - Private Fund Reporting
Parsed BLACKSTONE REAL ESTATE ADVISORS EUROPE L.P. they have 5 fund vehicles and $6,054,414,912.00 in private fund AUM
idCRD: 135952 - Participation or Interest in Client Transactions
idCRD: 135952 - Custody
idCRD: 135952 - Control Persons
idCRD: 135952 - Disclosure Information
idCRD: 135952 - Direct Manager Owners
idCRD: 135952 - Indirect Manager Owners
idCRD: 135952 - Other Manager Information
idCRD: 135952 - Manager Signatories
Parsed BLACKSTONE REAL ESTATE ADVISORS EUROPE L.P.
They have $15,337,276,092 in Total Assets Under Management
idCRD: 160157 - Registration
idCRD: 160157 - DRPs
idCRD: 160157 - Identifying Information
idCRD: 160157 - SEC Reporting
idCRD: 160157 - Organization
idCRD: 160157 - Successions
idCRD: 160157 - Advisory Business Information
idCRD: 160157 - Other Business Activities
idCRD: 160157 - Financial Industry Affiliations
idCRD: 160157 - Private Fund Reporting
Parsed BLACKSTONE TACTICAL OPPORTUNITIES ADVISORS L.L.C. they have 36 fund vehicles and $14,977,484,710.00 in private fund AUM
idCRD: 160157 - Participation or Interest in Client Transactions
idCRD: 160157 - Custody
idCRD: 160157 - Control Persons
idCRD: 160157 - Disclosure Information
idCRD: 160157 - Direct Manager Owners
idCRD: 160157 - Indirect Manager Owners
idCRD: 160157 - Other Manager Information
idCRD: 160157 - Manager Signatories
Parsed BLACKSTONE TACTICAL OPPORTUNITIES ADVISORS L.L.C.
They have $14,852,852,383 in Total Assets Under Management
idCRD: 226598 - Registration
idCRD: 226598 - DRPs
idCRD: 226598 - Identifying Information
idCRD: 226598 - SEC Reporting
idCRD: 226598 - Organization
idCRD: 226598 - Successions
idCRD: 226598 - Advisory Business Information
idCRD: 226598 - Other Business Activities
idCRD: 226598 - Financial Industry Affiliations
idCRD: 226598 - Private Fund Reporting
Parsed BLACKSTONE PROPERTY ADVISORS L.P. they have 19 fund vehicles and $10,429,608,296.00 in private fund AUM
idCRD: 226598 - Participation or Interest in Client Transactions
idCRD: 226598 - Custody
idCRD: 226598 - Control Persons
idCRD: 226598 - Disclosure Information
idCRD: 226598 - Direct Manager Owners
idCRD: 226598 - Indirect Manager Owners
idCRD: 226598 - Other Manager Information
idCRD: 226598 - Manager Signatories
Parsed BLACKSTONE PROPERTY ADVISORS L.P.
They have $10,429,608,297 in Total Assets Under Management
idCRD: 165782 - Registration
idCRD: 165782 - DRPs
idCRD: 165782 - Identifying Information
idCRD: 165782 - SEC Reporting
idCRD: 165782 - Organization
idCRD: 165782 - Successions
idCRD: 165782 - Advisory Business Information
idCRD: 165782 - Other Business Activities
idCRD: 165782 - Financial Industry Affiliations
idCRD: 165782 - Private Fund Reporting
Parsed BLACKSTONE ALTERNATIVE INVESTMENT ADVISORS LLC they have 6 fund vehicles and $3,738,632,001.00 in private fund AUM
idCRD: 165782 - Participation or Interest in Client Transactions
idCRD: 165782 - Custody
idCRD: 165782 - Control Persons
idCRD: 165782 - Disclosure Information
idCRD: 165782 - Direct Manager Owners
idCRD: 165782 - Indirect Manager Owners
idCRD: 165782 - Other Manager Information
idCRD: 165782 - Manager Signatories
Parsed BLACKSTONE ALTERNATIVE INVESTMENT ADVISORS LLC
They have $9,314,851,205 in Total Assets Under Management
idCRD: 158784 - Registration
idCRD: 158784 - DRPs
idCRD: 158784 - Identifying Information
idCRD: 158784 - SEC Reporting
idCRD: 158784 - Organization
idCRD: 158784 - Successions
idCRD: 158784 - Advisory Business Information
idCRD: 158784 - Other Business Activities
idCRD: 158784 - Financial Industry Affiliations
idCRD: 158784 - Private Fund Reporting
Parsed BLACKSTONE ALTERNATIVE SOLUTIONS L.L.C. they have 20 fund vehicles and $20,252,898,548.00 in private fund AUM
idCRD: 158784 - Participation or Interest in Client Transactions
idCRD: 158784 - Custody
idCRD: 158784 - Control Persons
idCRD: 158784 - Disclosure Information
idCRD: 158784 - Direct Manager Owners
idCRD: 158784 - Indirect Manager Owners
idCRD: 158784 - Other Manager Information
idCRD: 158784 - Manager Signatories
Parsed BLACKSTONE ALTERNATIVE SOLUTIONS L.L.C.
They have $8,846,297,940 in Total Assets Under Management
idCRD: 138208 - Registration
idCRD: 138208 - DRPs
idCRD: 138208 - Identifying Information
idCRD: 138208 - SEC Reporting
idCRD: 138208 - Organization
idCRD: 138208 - Successions
idCRD: 138208 - Advisory Business Information
idCRD: 138208 - Other Business Activities
idCRD: 138208 - Financial Industry Affiliations
idCRD: 138208 - Private Fund Reporting
Parsed BLACKSTONE REAL ESTATE ADVISORS V L.P. they have 4 fund vehicles and $4,507,690,385.00 in private fund AUM
idCRD: 138208 - Participation or Interest in Client Transactions
idCRD: 138208 - Custody
idCRD: 138208 - Control Persons
idCRD: 138208 - Disclosure Information
idCRD: 138208 - Direct Manager Owners
idCRD: 138208 - Indirect Manager Owners
idCRD: 138208 - Other Manager Information
idCRD: 138208 - Manager Signatories
Parsed BLACKSTONE REAL ESTATE ADVISORS V L.P.
They have $4,794,287,474 in Total Assets Under Management
idCRD: 172235 - Registration
idCRD: 172235 - DRPs
idCRD: 172235 - Identifying Information
idCRD: 172235 - SEC Reporting
idCRD: 172235 - Organization
idCRD: 172235 - Successions
idCRD: 172235 - Advisory Business Information
idCRD: 172235 - Other Business Activities
idCRD: 172235 - Financial Industry Affiliations
idCRD: 172235 - Private Fund Reporting
Parsed BLACKSTONE SENFINA ADVISORS L.L.C. they have 4 fund vehicles and $6,819,855,125.00 in private fund AUM
idCRD: 172235 - Participation or Interest in Client Transactions
idCRD: 172235 - Custody
idCRD: 172235 - Control Persons
idCRD: 172235 - Disclosure Information
idCRD: 172235 - Direct Manager Owners
idCRD: 172235 - Indirect Manager Owners
idCRD: 172235 - Other Manager Information
idCRD: 172235 - Manager Signatories
Parsed BLACKSTONE SENFINA ADVISORS L.L.C.
They have $4,494,890,251 in Total Assets Under Management
idCRD: 152294 - Registration
idCRD: 152294 - DRPs
idCRD: 152294 - Identifying Information
idCRD: 152294 - SEC Reporting
idCRD: 152294 - Organization
idCRD: 152294 - Successions
idCRD: 152294 - Advisory Business Information
idCRD: 152294 - Other Business Activities
idCRD: 152294 - Financial Industry Affiliations
idCRD: 152294 - Private Fund Reporting
Parsed GSO CAPITAL ADVISORS LLC they have 3 fund vehicles and $36,351,564.00 in private fund AUM
idCRD: 152294 - Participation or Interest in Client Transactions
idCRD: 152294 - Custody
idCRD: 152294 - Control Persons
idCRD: 152294 - Disclosure Information
idCRD: 152294 - Direct Manager Owners
idCRD: 152294 - Indirect Manager Owners
idCRD: 152294 - Other Manager Information
idCRD: 152294 - Manager Signatories
Parsed GSO CAPITAL ADVISORS LLC
They have $4,316,722,757 in Total Assets Under Management
idCRD: 165796 - Registration
idCRD: 165796 - DRPs
idCRD: 165796 - Identifying Information
idCRD: 165796 - SEC Reporting
idCRD: 165796 - Organization
idCRD: 165796 - Successions
idCRD: 165796 - Advisory Business Information
idCRD: 165796 - Other Business Activities
idCRD: 165796 - Financial Industry Affiliations
idCRD: 165796 - Private Fund Reporting
Parsed BLACKSTONE STRATEGIC CAPITAL ADVISORS, L.LC. they have 24 fund vehicles and $6,048,893,434.00 in private fund AUM
idCRD: 165796 - Participation or Interest in Client Transactions
idCRD: 165796 - Custody
idCRD: 165796 - Control Persons
idCRD: 165796 - Disclosure Information
idCRD: 165796 - Direct Manager Owners
idCRD: 165796 - Indirect Manager Owners
idCRD: 165796 - Other Manager Information
idCRD: 165796 - Manager Signatories
Parsed BLACKSTONE STRATEGIC CAPITAL ADVISORS, L.LC.
They have $3,741,384,720 in Total Assets Under Management
idCRD: 171640 - Registration
idCRD: 171640 - DRPs
idCRD: 171640 - Identifying Information
idCRD: 171640 - SEC Reporting
idCRD: 171640 - Organization
idCRD: 171640 - Successions
idCRD: 171640 - Advisory Business Information
idCRD: 171640 - Other Business Activities
idCRD: 171640 - Financial Industry Affiliations
idCRD: 171640 - Private Fund Reporting
Parsed BLACKSTONE MULTI-ASSET ADVISORS L.L.C. they have 6 fund vehicles and $3,098,161,706.00 in private fund AUM
idCRD: 171640 - Participation or Interest in Client Transactions
idCRD: 171640 - Custody
idCRD: 171640 - Control Persons
idCRD: 171640 - Disclosure Information
idCRD: 171640 - Direct Manager Owners
idCRD: 171640 - Indirect Manager Owners
idCRD: 171640 - Other Manager Information
idCRD: 171640 - Manager Signatories
Parsed BLACKSTONE MULTI-ASSET ADVISORS L.L.C.
They have $3,098,161,706 in Total Assets Under Management
idCRD: 142922 - Registration
idCRD: 142922 - DRPs
idCRD: 142922 - Identifying Information
idCRD: 142922 - SEC Reporting
idCRD: 142922 - Organization
idCRD: 142922 - Successions
idCRD: 142922 - Advisory Business Information
idCRD: 142922 - Other Business Activities
idCRD: 142922 - Financial Industry Affiliations
idCRD: 142922 - Private Fund Reporting
Parsed BLACKSTONE STRATEGIC ALLIANCE ADVISORS L.L.C. they have 29 fund vehicles and $6,653,714,345.00 in private fund AUM
idCRD: 142922 - Participation or Interest in Client Transactions
idCRD: 142922 - Custody
idCRD: 142922 - Control Persons
idCRD: 142922 - Disclosure Information
idCRD: 142922 - Direct Manager Owners
idCRD: 142922 - Indirect Manager Owners
idCRD: 142922 - Other Manager Information
idCRD: 142922 - Manager Signatories
Parsed BLACKSTONE STRATEGIC ALLIANCE ADVISORS L.L.C.
They have $3,095,960,087 in Total Assets Under Management
idCRD: 114716 - Registration
idCRD: 114716 - DRPs
idCRD: 114716 - Identifying Information
idCRD: 114716 - SEC Reporting
idCRD: 114716 - Organization
idCRD: 114716 - Successions
idCRD: 114716 - Advisory Business Information
idCRD: 114716 - Other Business Activities
idCRD: 114716 - Financial Industry Affiliations
idCRD: 114716 - Private Fund Reporting
Parsed BLACKSTONE MANAGEMENT PARTNERS IV L.L.C. they have 2 fund vehicles and $1,940,033,302.00 in private fund AUM
idCRD: 114716 - Participation or Interest in Client Transactions
idCRD: 114716 - Custody
idCRD: 114716 - Control Persons
idCRD: 114716 - Disclosure Information
idCRD: 114716 - Direct Manager Owners
idCRD: 114716 - Indirect Manager Owners
idCRD: 114716 - Other Manager Information
idCRD: 114716 - Manager Signatories
Parsed BLACKSTONE MANAGEMENT PARTNERS IV L.L.C.
They have $2,032,413,676 in Total Assets Under Management
idCRD: 120934 - Registration
idCRD: 120934 - DRPs
idCRD: 120934 - Identifying Information
idCRD: 120934 - SEC Reporting
idCRD: 120934 - Organization
idCRD: 120934 - Successions
idCRD: 120934 - Advisory Business Information
idCRD: 120934 - Other Business Activities
idCRD: 120934 - Financial Industry Affiliations
idCRD: 120934 - Private Fund Reporting
Parsed BLACKSTONE DEBT ADVISORS L.P. they have 8 fund vehicles and $1,408,968,306.00 in private fund AUM
idCRD: 120934 - Participation or Interest in Client Transactions
idCRD: 120934 - Custody
idCRD: 120934 - Control Persons
idCRD: 120934 - Disclosure Information
idCRD: 120934 - Direct Manager Owners
idCRD: 120934 - Indirect Manager Owners
idCRD: 120934 - Other Manager Information
idCRD: 120934 - Manager Signatories
Parsed BLACKSTONE DEBT ADVISORS L.P.
They have $1,408,968,306 in Total Assets Under Management
idCRD: 120936 - Registration
idCRD: 120936 - DRPs
idCRD: 120936 - Identifying Information
idCRD: 120936 - SEC Reporting
idCRD: 120936 - Organization
idCRD: 120936 - Successions
idCRD: 120936 - Advisory Business Information
idCRD: 120936 - Other Business Activities
idCRD: 120936 - Financial Industry Affiliations
idCRD: 120936 - Private Fund Reporting
Parsed BLACKSTONE REAL ESTATE ADVISORS IV L.L.C. they have 5 fund vehicles and $533,933,531.00 in private fund AUM
idCRD: 120936 - Participation or Interest in Client Transactions
idCRD: 120936 - Custody
idCRD: 120936 - Control Persons
idCRD: 120936 - Disclosure Information
idCRD: 120936 - Direct Manager Owners
idCRD: 120936 - Indirect Manager Owners
idCRD: 120936 - Other Manager Information
idCRD: 120936 - Manager Signatories
Parsed BLACKSTONE REAL ESTATE ADVISORS IV L.L.C.
They have $936,135,069 in Total Assets Under Management
idCRD: 170801 - Registration
idCRD: 170801 - DRPs
idCRD: 170801 - Identifying Information
idCRD: 170801 - SEC Reporting
idCRD: 170801 - Organization
idCRD: 170801 - Successions
idCRD: 170801 - Advisory Business Information
idCRD: 170801 - Other Business Activities
idCRD: 170801 - Financial Industry Affiliations
idCRD: 170801 - Private Fund Reporting
idCRD: 170801 - Participation or Interest in Client Transactions
idCRD: 170801 - Custody
idCRD: 170801 - Control Persons
idCRD: 170801 - Disclosure Information
idCRD: 170801 - Direct Manager Owners
idCRD: 170801 - Indirect Manager Owners
idCRD: 170801 - Other Manager Information
idCRD: 170801 - Manager Signatories
Parsed BLACKSTONE REAL ESTATE INCOME ADVISORS L.L.C.
They have $819,766,129 in Total Assets Under Management
idCRD: 160080 - Registration
idCRD: 160080 - DRPs
idCRD: 160080 - Identifying Information
idCRD: 160080 - SEC Reporting
idCRD: 160080 - Organization
idCRD: 160080 - Successions
idCRD: 160080 - Advisory Business Information
idCRD: 160080 - Other Business Activities
idCRD: 160080 - Financial Industry Affiliations
idCRD: 160080 - Private Fund Reporting
Parsed CT INVESTMENT MANAGEMENT CO., LLC they have 7 fund vehicles and $686,266,571.00 in private fund AUM
idCRD: 160080 - Participation or Interest in Client Transactions
idCRD: 160080 - Custody
idCRD: 160080 - Control Persons
idCRD: 160080 - Disclosure Information
idCRD: 160080 - Direct Manager Owners
idCRD: 160080 - Indirect Manager Owners
idCRD: 160080 - Other Manager Information
idCRD: 160080 - Manager Signatories
Parsed CT INVESTMENT MANAGEMENT CO., LLC
They have $686,266,571 in Total Assets Under Management
idCRD: 167263 - Registration
idCRD: 167263 - DRPs
idCRD: 167263 - Identifying Information
idCRD: 167263 - SEC Reporting
idCRD: 167263 - Organization
idCRD: 167263 - Successions
idCRD: 167263 - Advisory Business Information
idCRD: 167263 - Other Business Activities
idCRD: 167263 - Financial Industry Affiliations
idCRD: 167263 - Private Fund Reporting
Parsed BLACKSTONE TREASURY SOLUTIONS ADVISORS L.L.C. they have 11 fund vehicles and $600,008,160.00 in private fund AUM
idCRD: 167263 - Participation or Interest in Client Transactions
idCRD: 167263 - Custody
idCRD: 167263 - Control Persons
idCRD: 167263 - Disclosure Information
idCRD: 167263 - Direct Manager Owners
idCRD: 167263 - Indirect Manager Owners
idCRD: 167263 - Other Manager Information
idCRD: 167263 - Manager Signatories
Parsed BLACKSTONE TREASURY SOLUTIONS ADVISORS L.L.C.
They have $427,450,230 in Total Assets Under Management
idCRD: 109106 - Registration
idCRD: 109106 - DRPs
idCRD: 109106 - Identifying Information
idCRD: 109106 - SEC Reporting
idCRD: 109106 - Organization
idCRD: 109106 - Successions
idCRD: 109106 - Advisory Business Information
idCRD: 109106 - Other Business Activities
idCRD: 109106 - Financial Industry Affiliations
idCRD: 109106 - Private Fund Reporting
Parsed BLACKSTONE COMMUNICATIONS ADVISORS I LLC they have 1 fund vehicles and $324,501,834.00 in private fund AUM
idCRD: 109106 - Participation or Interest in Client Transactions
idCRD: 109106 - Custody
idCRD: 109106 - Control Persons
idCRD: 109106 - Disclosure Information
idCRD: 109106 - Direct Manager Owners
idCRD: 109106 - Indirect Manager Owners
idCRD: 109106 - Other Manager Information
idCRD: 109106 - Manager Signatories
Parsed BLACKSTONE COMMUNICATIONS ADVISORS I LLC
They have $338,809,207 in Total Assets Under Management
idCRD: 109099 - Registration
idCRD: 109099 - DRPs
idCRD: 109099 - Identifying Information
idCRD: 109099 - SEC Reporting
idCRD: 109099 - Organization
idCRD: 109099 - Successions
idCRD: 109099 - Advisory Business Information
idCRD: 109099 - Other Business Activities
idCRD: 109099 - Financial Industry Affiliations
idCRD: 109099 - Private Fund Reporting
Parsed BLACKSTONE MEZZANINE ADVISORS LP they have 2 fund vehicles and $155,880,928.00 in private fund AUM
idCRD: 109099 - Participation or Interest in Client Transactions
idCRD: 109099 - Custody
idCRD: 109099 - Control Persons
idCRD: 109099 - Disclosure Information
idCRD: 109099 - Direct Manager Owners
idCRD: 109099 - Indirect Manager Owners
idCRD: 109099 - Other Manager Information
idCRD: 109099 - Manager Signatories
Parsed BLACKSTONE MEZZANINE ADVISORS LP
They have $155,880,948 in Total Assets Under Management
idCRD: 148943 - Registration
idCRD: 148943 - DRPs
idCRD: 148943 - Identifying Information
idCRD: 148943 - SEC Reporting
idCRD: 148943 - Organization
idCRD: 148943 - Successions
idCRD: 148943 - Advisory Business Information
idCRD: 148943 - Other Business Activities
idCRD: 148943 - Financial Industry Affiliations
idCRD: 148943 - Private Fund Reporting
Parsed BLACKSTONE CLEAN TECHNOLOGY ADVISORS L.L.C. they have 1 fund vehicles and $18,172,392.00 in private fund AUM
idCRD: 148943 - Participation or Interest in Client Transactions
idCRD: 148943 - Custody
idCRD: 148943 - Control Persons
idCRD: 148943 - Disclosure Information
idCRD: 148943 - Direct Manager Owners
idCRD: 148943 - Indirect Manager Owners
idCRD: 148943 - Other Manager Information
idCRD: 148943 - Manager Signatories
Parsed BLACKSTONE CLEAN TECHNOLOGY ADVISORS L.L.C.
They have $20,149,516 in Total Assets Under Management
idCRD: 111871 - Registration
idCRD: 111871 - DRPs
idCRD: 111871 - Identifying Information
idCRD: 111871 - SEC Reporting
idCRD: 111871 - Organization
idCRD: 111871 - Successions
idCRD: 111871 - Advisory Business Information
idCRD: 111871 - Other Business Activities
idCRD: 111871 - Financial Industry Affiliations
idCRD: 111871 - Private Fund Reporting
Parsed BLACKSTONE REAL ESTATE ADVISORS INTERNATIONAL L.L.C. they have 3 fund vehicles and $12,503,542.00 in private fund AUM
idCRD: 111871 - Participation or Interest in Client Transactions
idCRD: 111871 - Custody
idCRD: 111871 - Control Persons
idCRD: 111871 - Disclosure Information
idCRD: 111871 - Direct Manager Owners
idCRD: 111871 - Indirect Manager Owners
idCRD: 111871 - Other Manager Information
idCRD: 111871 - Manager Signatories
Parsed BLACKSTONE REAL ESTATE ADVISORS INTERNATIONAL L.L.C.
They have $13,424,739 in Total Assets Under Management
managerDescription
managerRegulatoryCRD
section7BPrivateFundReporting
sectionScheduleA
sectionScheduleB
managerOtherOfficeLocations
managerRelatedAdvisers
managerWebsite
managerControlPersons
managerControlPublicEntities
managerOtherDisclosures
managerRecordLocations

Explore the Tables

Visualize the Resulting Data

blackstone_entity_df %>% 
  visualize_data_frame(edit = F)

Manager Description

This table contains general information about the manager from all sections with distinct data. Information may include information on the number of employees, total amount of money managed, ranged estimates of investor types an.d much, much more

managerDescription 

DRPs and Regulatory CRD Infractions

This table contains information about any violations by the manager or it’s employees. These includes any violation levied by a government or self-policing regulatory body. This data is extremely difficult to parse and may not be fully complete for a manager with a laundry list of infractions like say Goldman Sachs.

managerRegulatoryCRD

Private Fund Reporting

This table contains information about the underlying fund vehicles of a registered manager. This may include information about the fund size, number of investors, types of investors, distribution of ownership, details about third parties that service the fund [accountants, marketing agents, custodians, prime brokers, etc..] and any information about related parties to the fund [General Partner, Managing Member, etc..]

section7BPrivateFundReporting

Visual Exploration Blackstone’s Fund Vehicles.

The private fund section is chocked full of great visualizable data, and to demonstrate we are going to create a treemap visualization care of Kenton Russell’s fantastic d3treeR package that will show us Blackstone’s assets under management by fund type, fund manager, fund vehicle name, and number of fund investors.

library(treemap) # install.packages('treemap')
library(d3treeR) # devtools::install_github("timelyportfolio/d3treeR")
treemap_viz <- 
  section7BPrivateFundReporting %>% 
  treemap(
    index = c("typeFund",'nameEntityManager', "nameFund"), # structure of the trees
    vSize = "amountFundGrossAUM", # size of the tree
    vColor = "countFundOwners", # color of the tree
    palette = "RdYlGn", 
    fontsize.labels = 8,
    type = "value"
  ) %>% 
  d3tree2(rootname = "Blackstone's Fund Vehicles")
treemap_viz

Schedule A - Direct Owners

This table contains information about the individuals and entities that own the registering entity, this includes ranged disclosures on percentage of ownership. This information, along with Schedule B, are ideal uses for Network Analysis. We will demonstrate this with a quick and dirty network graph of all of our Blackstone entities primary owners and their respective ranged ownership of the registering entity using Rich Iannone’s DiagrammeR package.

sectionScheduleA # Direct Owners

Network Graph of Blackstone’s Direct Owners

  library(DiagrammeR)
owner_graph <-
  sectionScheduleA %>%
  dplyr::select(
    nameEntityManager,
    nameEntityManagerOwner,
    nameCommonEntityOwnerManager,
    rangeManagerEntityOwnership,
    idTypeEntityManagerOwner
  ) %>%
  left_join(
    sectionScheduleB %>%
      dplyr::select(
        nameEntityManagerOwnerOwner,
        nameEntityManagerOwner,
        rangeManagerEntityOwnerOwnership
      )
  )
Joining, by = "nameEntityManagerOwner"
owner_graph <-
  owner_graph %>%
  mutate_at(.cols = owner_graph %>% dplyr::select(matches('^name[A-Z]')) %>% names,
            funs(. %>% str_replace_all('\\ ', '\n')))
managers <-
  owner_graph %>%
  dplyr::select(manager = nameEntityManager) %>%
  unique() %>%
  data.frame()
entity_owner_people <-
  owner_graph %>%
  dplyr::filter(idTypeEntityManagerOwner == "I") %>%
  distinct() %>%
  dplyr::select(person = nameEntityManagerOwner) %>%
  unique() %>% 
  data.frame()
entity_owner_owners <-
  owner_graph %>%
  dplyr::filter(!idTypeEntityManagerOwner == "I") %>%
  dplyr::select(entity = nameEntityManagerOwner) %>%
  distinct() %>%
  data.frame()
entity_owner_owned_by <-
  owner_graph %>%
  dplyr::select(entity_owner = nameEntityManagerOwnerOwner) %>% 
  distinct() %>%
  dplyr::filter(!entity_owner %>% is.na()) %>% 
  unique
schedule_a_edges_people <-
  owner_graph %>%
  dplyr::filter(idTypeEntityManagerOwner == "I") %>%
  dplyr::select(nameEntityManager,
                nameEntityManagerOwner,
                rangeManagerEntityOwnership) %>%
  data.frame(stringsAsFactors = F) %>% 
  unique
schedule_a_edges_entities <-
  owner_graph %>%
  dplyr::filter(!idTypeEntityManagerOwner == "I") %>%
  dplyr::select(nameEntityManager,
                nameEntityManagerOwner,
                rangeManagerEntityOwnership) %>%
  data.frame(stringsAsFactors = F) %>% 
  unique
schedule_b_edges_entities <-
  owner_graph %>%
  dplyr::select(
    nameEntityManagerOwner,
    nameEntityManagerOwnerOwner,
    rangeManagerEntityOwnerOwnership
  ) %>%
  dplyr::filter(!nameEntityManagerOwnerOwner %>% is.na()) %>%
  distinct() %>% 
  data.frame()
create_graph(directed = T,
             graph_attrs = "layout = circo") %>%
  set_graph_name("test") %>%
  set_global_graph_attrs("graph", "output", "visNetwork") %>%
  add_nodes_from_table(managers,
                       set_type = "managers",
                       label_col = "manager") %>%
  add_nodes_from_table(entity_owner_people,
                       set_type = "people",
                       label_col = "person") %>%
  add_nodes_from_table(entity_owner_owners,
                       set_type = "entities",
                       label_col = "entity") %>%
  add_nodes_from_table(entity_owner_owned_by,
                       set_type = "entities_owners",
                       label_col = "entity_owner") %>%
  add_edges_from_table(
    schedule_a_edges_people,
    from_col = "nameEntityManager",
    from_mapping = 'manager',
    to_col = "nameEntityManagerOwner",
    to_mapping = "person",
    rel_col = "rangeManagerEntityOwnership"
  ) %>%
  add_edges_from_table(
    schedule_a_edges_entities,
    from_col = "nameEntityManager",
    from_mapping = 'manager',
    to_col = "nameEntityManagerOwner",
    to_mapping = "entity",
    rel_col = "rangeManagerEntityOwnership"
  ) %>%
  add_edges_from_table(
    schedule_b_edges_entities,
    from_col = "nameEntityManagerOwner",
    from_mapping = 'entity',
    to_col = "nameEntityManagerOwnerOwner",
    to_mapping = "entity_owner",
    rel_col = "rangeManagerEntityOwnerOwnership"
  ) %>%
  visnetwork()

Schedule B - Indirect Owners

This table contains information on the owners of any Schedule A owner that is an entity. They may include the name of the natural owner, ranges of ownership and other identifiers. This data can be unified with Schedule A to get a full picture of a manager’s ownership structure.

sectionScheduleB # Indirect Owners

Control Entities

This table contains information on control entities for a filing manager, this essentially means is the manager controlled by a public entity, and if so who controls them? A good example being Blackstone which is a public company but most registered managers are not affiliated with public companies so don’t expect to always find this information in your searches.

managerControlPublicEntities

Control Persons

This table contains information on control persons for the control entity from before.

managerControlPersons

Record Locations

This table discloses where a manager stores its records, it may include details on specific procedures.

managerRecordLocations

Other disclosures

This table discloses any other relevant information the manager wishes to communicate to the SEC including certain details regarding data in the filing.

managerOtherDisclosures

Other Office Locations

This table contains information on all secondary offices, when applicable, related to the filing manager.

managerOtherOfficeLocations

Website Information

This table contains any website related to the filing manager.

managerWebsite

Conclusion

That wraps up the data that is returned from a deep dive into a filing manager. Keep in mind not every manager is required to file each section of the form so you may not get all these sections for each manager.

Please keep in mind this package is in its extreme infancy so expect bugs. Please feel free to report them in the issues or become a contributor with a pull request! I am also unsure whether I will submit this package to CRAN so please follow the package on Github for updates.

I hope this give you a good quick overview of how these ADV functions work. This is an extremely powerful suite of functions that open up wide-scale consumption of important information that was once near impossible to access.

LS0tCnRpdGxlOiAiZnVuZE1hbmFnZVIgQURWIEZ1bmN0aW9uIFZpZ25ldHRlLCBTbGV1dGhpbmcgVGhlIEJsYWNrc3RvbmUgR3JvdXAiCm91dHB1dDogCiAgaHRtbF9ub3RlY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gbGFiZWxfY29sID0gIm1hbmFnZXIiKSAlPiUKICBhZGRfbm9kZXNfZnJvbV90YWJsZShlbnRpdHlfb3duZXJfcGVvcGxlLAogICAgICAgICAgICAgICAgICAgICAgIHNldF90eXBlID0gInBlb3BsZSIsCiAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxfY29sID0gInBlcnNvbiIpICU+JQogIGFkZF9ub2Rlc19mcm9tX3RhYmxlKGVudGl0eV9vd25lcl9vd25lcnMsCiAgICAgICAgICAgICAgICAgICAgICAgc2V0X3R5cGUgPSAiZW50aXRpZXMiLAogICAgICAgICAgICAgICAgICAgICAgIGxhYmVsX2NvbCA9ICJlbnRpdHkiKSAlPiUKICBhZGRfbm9kZXNfZnJvbV90YWJsZShlbnRpdHlfb3duZXJfb3duZWRfYnksCiAgICAgICAgICAgICAgICAgICAgICAgc2V0X3R5cGUgPSAiZW50aXRpZXNfb3duZXJzIiwKICAgICAgICAgICAgICAgICAgICAgICBsYWJlbF9jb2wgPSAiZW50aXR5X293bmVyIikgJT4lCiAgYWRkX2VkZ2VzX2Zyb21fdGFibGUoCiAgICBzY2hlZHVsZV9hX2VkZ2VzX3Blb3BsZSwKICAgIGZyb21fY29sID0gIm5hbWVFbnRpdHlNYW5hZ2VyIiwKICAgIGZyb21fbWFwcGluZyA9ICdtYW5hZ2VyJywKICAgIHRvX2NvbCA9ICJuYW1lRW50aXR5TWFuYWdlck93bmVyIiwKICAgIHRvX21hcHBpbmcgPSAicGVyc29uIiwKICAgIHJlbF9jb2wgPSAicmFuZ2VNYW5hZ2VyRW50aXR5T3duZXJzaGlwIgogICkgJT4lCiAgYWRkX2VkZ2VzX2Zyb21fdGFibGUoCiAgICBzY2hlZHVsZV9hX2VkZ2VzX2VudGl0aWVzLAogICAgZnJvbV9jb2wgPSAibmFtZUVudGl0eU1hbmFnZXIiLAogICAgZnJvbV9tYXBwaW5nID0gJ21hbmFnZXInLAogICAgdG9fY29sID0gIm5hbWVFbnRpdHlNYW5hZ2VyT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