I use a Python code to export into Excel some Data from your StarMine Model. I use the ISIN code as identifier. Unfortunately, there is an issue with Ferrovial (ISIN = NL0015001FS8). I think the right RIC to use is FER.MC. Is it possible, from the ISIN code, to get the primary RIC code ? I guess it may help me on this issue...
But my main question is: is there a function where I can put an ISIN code and get the primary quote RIC?
Resolution provided
When you enter an ISIN in codebook, you will have to select a RIC to use. To get the Primary RIC quote you can use the code below.
import refinitiv.data as rdrd.open_session()df = rd.get_data(universe = ['FER.MC'],fields = ['TR.PrimaryQuote'])display(df)
Client follow up
I am a bit surprized here. In the Python code you had provided to us, the ISIN code is the sole we use. Normally, it is sufficient to get the data. But not for ferrovial.... In what you provided in your answer, you used the FER.MC RIC... But this, I do not have for all the ISIN I provide to the system. To give you some insight, here is the part of the code we use:
#Calcul des champs maison
resultat.fillna(0, inplace=True)resultat["Value"]=((resultat["Relative Valuation Region Rank"]+resultat["Price / Intrinsic Value Region Rank"])/2)/10resultat["Quality"]=(resultat["Earnings Quality Region Rank, Current"])/10resultat["Momentum"]=((resultat["Analyst Revisions Model Region Rank"]+resultat["Price Momentum Region Rank"])/2)/10resultat["Smart_Holdings"]=(resultat["SmartHoldings Region Rank"])/10resultat["Note Starmine"]=(resultat["Value"]+resultat["Quality"]+resultat["Momentum"]+resultat["Smart_Holdings"])/4resultat.rename(columns={"Instrument": "ISIN"},inplace=True)cols=['ISIN','Note Starmine','Value','Quality','Momentum','Smart_Holdings','Value-Momentum Region Rank','Price Momentum Region Rank','Analyst Revisions Model Region Rank','Price / Intrinsic Value Region Rank','Relative Valuation Region Rank','SmartHoldings Region Rank','Short Interest Country Rank','Insider Country Rank','Earnings Quality Region Rank, Current','Credit Combined Region Rank','Credit SmartRatios Region Rank','Credit Structural Region Rank','Credit Text Mining Region Rank']resultat=resultat[cols]resultat_clean=pd.concat([pd.DataFrame([resultat.columns], columns=resultat.columns), resultat], ignore_index=True)output=pd.merge(output_nom,resultat_clean.drop_duplicates(subset='ISIN'),on='ISIN', how='inner')
#Export
date_txt=datetime.datetime.today().strftime('%Y%m%d')output.to_excel("F:/_applicationdata/EUDA_Investissements_Dataset_FR/44_Starmine/Historique/Starmine_"+date_txt+".xlsx",index=False,sheet_name="Feuil1")