Finding the ultimate parent of a participant bank from deal screener (loans), when no identifier ...

...is possible?
Hi there, I am using a combination of the Eikon API and the RDP API, in Python on a Mac (Ventura). I am searching for all deals relating to the following ISINS (['BRJBSSACNOR8', 'BRMRFGACNOR0', 'BRBEEFACNOR6']) and would like to eventually map these to the ultimate parent of each bank that participated in each deal. From the Data Library, it seems not possible to return a PermID, RIC, or ISIN for the managers on a deal. Therefore, I need to search them by name to find either a) their ultimate parents directly or b) their ISIN, RIC, or PermID, which I can then search for their ultimate parents. Are you able to help me do this with either RDP or Eikon API? Thanks in advance for any help.
import pandas as pd
import eikon as ek
import refinitiv.data as rd
isins = ['BRJBSSACNOR8', 'BRMRFGACNOR0', 'BRBEEFACNOR6']
# convert ISINs to PermIDs to search deal screener
permids = ek.get_symbology(isins, from_symbol_type='ISIN', to_symbol_type='OAPermID
permids = ','.join(permids['OAPermID'])
# pulling loans data
fields = ["TR.LNSdcDealNum,TR.LNSDCTrancheId,TR.LNAnnouncementDate,TR.LNTrancheClosingDatePrint,TR.LNMaturityDate,TR.LNFinalMaturityDate,TR.LNIssuerUltParent,TR.LNIssuerUltParentPERMID,TR.LNIssuerUltParentNation,TR.LNIssuerUltParentSubRegion,TR.LNIssuer,TR.LNIssuerSDCCusip,TR.LNIssuerPERMID,TR.LNIssuerNation,TR.LNIssuerSubRegion,TR.LNTotalFacilityAmount(Scale=6),TR.LNTrancheAmount(Scale=6,Curn=USD),TR.LNOriginalTrancheCurrency,TR.LNTargetMarketNation,TR.LNUseOfProceeds(Concat='|'),TR.LNTrancheType,TR.LNYieldType,TR.LNStatusOfLoan,TR.LNBookRunnerParentCount,TR.LNLeadCoLeadIntCoManagerCount,TR.LNIsBookRunner(Concat='|'),TR.LNManagerRole(Concat='|'),TR.LNLeadCoLeadIntCoManagerLong(Concat='|'),TR.LNLeadCoLeadIntCoManagerParentLong(Concat='|'),TR.LNPrincipalAmountPerBookRunnerThisMarket(Scale=6),TR.LNCommitmentAmount(Scale=6,Curn=USD,Concat='|')"]
df_loans,e = ek.get_data("SCREEN(U(IN(DEALS)/*UNV:DEALSLOAN*/),IN(TR.LNParticipant(LNPartRole=LNBUP)," + permids + "))", fields, {"Curn":"USD"})
# find unique parents
unique_names = df_loans['Book, Co-Manager, Participant Parent (Full Name)'].str.split('|').explode().unique()
df_unique_names = pd.DataFrame(unique_names, columns=['Unique Names'])
## next step - find ultimate parents of each of these unique parents??
Best Answer
-
Hi @l.marsden,
I believe the best way forward here would be (i) using the RD Lib. because the EDAPI one will be deprecated soon, and (ii) using Search. I give an example as to how you may look into using it below. Please do let me know if it gives you enough of the building blocks needed for you to use in your solution:import pandas as pd
import refinitiv.data as rd
session = rd.open_session(
config_name="C:\\Example.DataLibrary.Python-main\\Configuration\\refinitiv-data.config.json",
name="platform.jllsegrdp")
# name="desktop.workspace")
isins = ['BRJBSSACNOR8', 'BRMRFGACNOR0', 'BRBEEFACNOR6']
ric_df = rd.content.symbol_conversion.Definition(
symbols=isins,
from_symbol_type=rd.content.symbol_conversion.SymbolTypes.ISIN,
to_symbol_types=[
rd.content.symbol_conversion.SymbolTypes.RIC,
rd.content.symbol_conversion.SymbolTypes.OA_PERM_ID
]).get_data().data.df
permids = ','.join(list(ric_df.IssuerOAPermID))
# pulling loans data
flds = ["RIC", "TR.LNSdcDealNum", "TR.LNSDCTrancheId", "TR.LNAnnouncementDate", "TR.LNTrancheClosingDatePrint",
"TR.LNMaturityDate", "TR.LNFinalMaturityDate", "TR.LNIssuerUltParent",
"TR.LNIssuerUltParentPERMID", "TR.LNIssuerUltParentNation", "TR.LNIssuerUltParentSubRegion",
"TR.LNIssuer", "TR.LNIssuerSDCCusip", "TR.LNIssuerPERMID", "TR.LNIssuerNation",
"TR.LNIssuerSubRegion", "TR.LNTotalFacilityAmount(Scale=6)",
"TR.LNTrancheAmount(Scale=6,Curn=USD)", "TR.LNOriginalTrancheCurrency",
"TR.LNTargetMarketNation", "TR.LNUseOfProceeds(Concat='|')", "TR.LNTrancheType",
"TR.LNYieldType", "TR.LNStatusOfLoan", "TR.LNBookRunnerParentCount", "TR.LNLeadCoLeadIntCoManagerCount",
"TR.LNIsBookRunner(Concat='|')", "TR.LNManagerRole(Concat='|')",
"TR.LNLeadCoLeadIntCoManagerLong(Concat='|')", "TR.LNLeadCoLeadIntCoManagerParentLong(Concat='|')",
"TR.LNPrincipalAmountPerBookRunnerThisMarket(Scale=6)", "TR.LNCommitmentAmount(Scale=6,Curn=USD,Concat='|')"]
df_loans = rd.get_data(
universe=["SCREEN(U(IN(DEALS)/*UNV:DEALSLOAN*/)," +
"IN(TR.LNParticipant(LNPartRole=LNBUP)," + permids + "))"],
fields=flds,
parameters={"Curn":"USD"})
# find unique parents
unique_names = df_loans['Book, Co-Manager, Participant Parent (Full Name)'].str.split('|').explode().unique()
df_unique_names = pd.DataFrame(unique_names, columns=['Unique Names'])
## next step - find ultimate parents of each of these unique parents??
single_undrlyng_srch = rd.discovery.search(
view = rd.discovery.Views.SEARCH_ALL,
query=df_unique_names.values[61][0], # "Banco Bilbao Vizcaya Argentaria SA", # "Mizuho Financial Group",
top = 2,
# filter = ,
select = "RIC, CommonName, UltimateParentCompanyOAPermID, UltimatelyCompanyPrimaryRIC, " +
# "AcquirerImmediateParentCidgen, AcquirerImmediateParentName, " +
# "AcquirerImmediateParentOAPermID, AcquirerUltimateParentCidgen, " +
# "AcquirerUltimateParentName, AcquirerUltimateParentOAPermID, " +
# "CdsUltimateParentCount, DBSParentTicker, GuarantorImmediateParentOrgId, " +
# "GuarantorUltimateParentOrgId, InvestorParentType, " +
# "IssuersUltimateParentHasCDS, IssuersUltimateParentIssuerID, " +
# "IssuersUltimateParentREC, LegacyUltimateParentId, MnaParentAcquirerCount, " +
# "MnaParentTargetCount, ParentAccountID, ParentCompanyGEMPermID, " +
# "ParentCompanyNDAPI, ParentCompanyOAPermID, ParentCompanyPI, " +
# "ParentImmedIndustrySector, ParentImmedIssuerID, ParentImmedIssuerName, " +
# "ParentImmedIssuerOrganization, ParentImmedLongName, ParentImmedOAPermID, " +
# "ParentImmedOrgID, ParentImmedSPIndustry, ParentImmedSPIndustryDescription, " +
# "ParentImmedTicker, ParentIndustrySector, ParentIssuerID, ParentIssuerName, " +
# "ParentIssuerOrganization, ParentLongName, ParentOAPermID, " +
# "ParentOrganisationName, ParentOrganisationNameJaHani, ParentOrganisationOrgid, " +
# "ParentOrgID, ParentPortId, ParentPortRIC, ParentSPIndustry, " +
# "ParentSPIndustryDescription, ParentTicker, ParentType, ParentURL, " +
# "PrimaryCompanyUltimateParentOrgid, PrimaryParentPageRIC, RCSParentDomicile, " +
# "RCSParentDomicileGenealogy, RCSParentDomicileLeaf, RCSParentDomicileLeafML, " +
# "RCSParentDomicileName, RCSParentDomicileNameML, RefEntityImmediateParentCommonName, " +
# "RefEntityImmediateParentCommonNameJaHani, RefEntityImmediateParentCommonNameJaHira, " +
# "RefEntityImmediateParentCommonNameJaKana, RefEntityImmediateParentCommonNameZhHans, " +
# "RefEntityImmediateParentCommonNameZhHant, RefEntityImmediateParentCountry, " +
# "RefEntityImmediateParentCountryName, RefEntityImmediateParentFitchIssuerRating, " +
# "RefEntityImmediateParentFitchIssuerRatingRank, RefEntityImmediateParentGics, " +
# "RefEntityImmediateParentGicsName, RefEntityImmediateParentIssueValuationRic, " +
# "RefEntityImmediateParentLegalName, RefEntityImmediateParentLegalNameJaHani, " +
# "RefEntityImmediateParentLegalNameJaHira, RefEntityImmediateParentLegalNameJaKana, " +
# "RefEntityImmediateParentLegalNameZhHans, RefEntityImmediateParentLegalNameZhHant, " +
# "RefEntityImmediateParentMarkItShortName, RefEntityImmediateParentMoodysIssuerRating, " +
# "RefEntityImmediateParentMoodysIssuerRatingRank, RefEntityImmediateParentOrgId, " +
# "RefEntityImmediateParentPi, RefEntityImmediateParentRbss, RefEntityImmediateParentRbssName, " +
# "RefEntityImmediateParentRed6Code, RefEntityImmediateParentShortName, " +
# "RefEntityImmediateParentSPIndustry, RefEntityImmediateParentSPIndustryDescription, " +
# "RefEntityImmediateParentSPIssuerRating, RefEntityImmediateParentSPIssuerRatingRank, " +
# "RefEntityImmediateParentTicker, RefEntityUltimateParentCommonName, " +
# "RefEntityUltimateParentCommonNameJaHani, RefEntityUltimateParentCommonNameJaHira, " +
# "RefEntityUltimateParentCommonNameJaKana, RefEntityUltimateParentCommonNameZhHans, " +
# "RefEntityUltimateParentCommonNameZhHant, RefEntityUltimateParentCountry, " +
# "RefEntityUltimateParentCountryName, RefEntityUltimateParentFitchIssuerRating, " +
# "RefEntityUltimateParentFitchIssuerRatingRank, RefEntityUltimateParentGics, " +
# "RefEntityUltimateParentGicsName, RefEntityUltimateParentIssueValuationRic, " +
# "RefEntityUltimateParentLegalName, RefEntityUltimateParentLegalNameJaHani, " +
# "RefEntityUltimateParentLegalNameJaHira, RefEntityUltimateParentLegalNameJaKana, " +
# "RefEntityUltimateParentLegalNameZhHans, RefEntityUltimateParentLegalNameZhHant, " +
# "RefEntityUltimateParentMarkItShortName, RefEntityUltimateParentMoodysIssuerRating, " +
# "RefEntityUltimateParentMoodysIssuerRatingRank, RefEntityUltimateParentOrgId, " +
# "RefEntityUltimateParentPi, RefEntityUltimateParentRbss, RefEntityUltimateParentRbssName, " +
# "RefEntityUltimateParentRed6Code, RefEntityUltimateParentShortName, " +
# "RefEntityUltimateParentSPIndustry, RefEntityUltimateParentSPIndustryDescription, " +
# "RefEntityUltimateParentSPIssuerRating, RefEntityUltimateParentSPIssuerRatingRank, " +
# "RefEntityUltimateParentTicker, SourceParentAccountID, TargetImmediateParentCidgen, " +
# "TargetImmediateParentName, TargetImmediateParentOAPermID, TargetUltimateParentCidgen, " +
# "TargetUltimateParentName, TargetUltimateParentOAPermID, UltimateParentCompanyGEMPermID, " +
# "UltimateParentCompanyNDAPI, UltimateParentCompanyOAPermID, UltimateParentCompanyPI, " +
# "UltimateParentId, UltimateParentIssuerEquityPrimaryRIC, UltimateParentOrganisationName, " +
# "UltimateParentOrganisationNameJaHani, " +
"UltimateParentOrganisationOrgid, UltimateParentOrganizationID",
# order_by = "AvgVol5D desc"
)
rd.discovery.search(
view = rd.discovery.Views.SEARCH_ALL,
query=single_undrlyng_srch.UltimateParentCompanyOAPermID[0], # "4295889577"
top = 30,
# filter = ,
select = "PrimaryRIC" # DelayedQuoteRIC, DTCCVolumeRIC, ExpiredRIC, GEMAlphaNumericID, " +
# "IssuerEquityPrimaryRIC, LiquidityRIC, OldRIC, OriginalRIC, " +
# "PercentageIndexRIC, PrimaryIssueRIC, PrimaryRIC, " +
# "PrimaryRICCinCUSIP, PrimaryRICCUSIP, PrimaryRICExchangeCode, " +
# "PrimaryRICExchangeName, PrimaryRICISIN, PrimaryRICPI, " +
# "PrimaryRICRCSAssetCategory, PrimaryRICRCSAssetCategoryLeaf, " +
# "PrimaryRICRICAcctsCount, PrimaryRICRICUsageCount, PrimaryRICSEDOL, " +
# "PrimaryRICTickerSymbol, QuoteRICs, RIC, SpotCurrencyRIC, SpotRIC, " +
# "SucceededCompanyPrimaryRIC, UltimateParentIssuerEquityPrimaryRIC, " +
# "YearHighToday2RIC, YearLowToday2RIC",
)You may often end up with the same 'underlying' and 'parent' because the company in `df_unique_names` may already be the Ultimate Parent and have no parent company. With that said, I am not a content expert and can hardly tell if a company is parent or not, so don't hesitate to let us know if the above gives you enough to go forward with.
0
Answers
-
Hi @jonathan.legrand, thank you very much for this, I didn't realise EDAPI was being depreceated. This search seems to do what it is intended to, I tested with a different company that is not its ultimate parent (BMO Capital Markets, index [4], since BBVA example is actually it's ultimate parent). This matched with the front end of Refinitiv.
Could you explain your second search step using the PermIDs? The first step is sufficient for my needs, I now need to run this through a loop to do this for all 61 banks.
I noticed that incorporating a reference and [0] does not actually include two banks as you stated in your comment, instead it seems to convert one bank (in the first reference) from an array to just text. Do you know why this might be the case?
df_unique_names.values[0] # returns array(['JP Morgan & Co Inc'], dtype=object)
df_unique_names.values[61][0] # returns 'Banco Bilbao Vizcaya Argentaria SA'
df_unique_names.values[61] # returns array(['Banco Bilbao Vizcaya Argentaria SA'], dtype=object)0 -
Hi @l.marsden, I was just looking for one example among the results to focus on. I thought that JPMorgan already was an ultimate parent company and would not be owned by another company; and I didn't think that was the case for 'Banco Bilbao Vizcaya Argentaria SA' who I hadn't heard of before.
The `[0]` after `[61]` was only there to get the string out of the list.FYI: I think it may be possible to get results for more than one search at a time, either through parallel calls or natively in Search. For more information on that, please read "Leveraging Parallel Programming in Python for Optimized Server Data Retrieval" & "Building Search into your Application Workflow".
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛