Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
54 2 4 13

Is there any possibility to retrieve Piotroski F-Score via Python Eikon Data API?

Is there any possibility to retrieve Piotroski F-Score via Python Eikon Data API?

I need historical values for the period of the last 15 years for the following companies:

TSLA.O

META.O

APPL.O


Thanks!

eikon-data-apipython#technology
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
83.1k 281 53 77

@alekseenkova.marina

You can try the following code:

df, err = ek.get_data(["TSLA.O","META.O","AAPL.O"],
                      "if(TR.NetIncome(Period=FY0)>0,1,0)+if(TR.CashFromOperatingAct(Period=FY0)>0,1,0)+if(TR.ROAActValue(Period=FY0)>TR.ROAActValue(Period=FY-1),1,0)+if(TR.CashFromOperatingAct(Period=FY0)>TR.NetIncomeBeforeExtraItems(Period=FY0),1,0)+if(TR.LTDebtToTotalAssetsPct(Period=FY0)>=TR.LTDebtToTotalAssetsPct(Period=FY-1),1,0)+if(TR.CurrentRatio(Period=FY0)>TR.CurrentRatio(Period=FY-1),1,0)+if(TR.SaleIssuanceOfCommon(Period=FY0)>=0,1,0)+if(TR.GrossProfitMarginIndustrialAndUtilityPct(Period=FY0)>=TR.GrossProfitMarginIndustrialAndUtilityPct(Period=FY-1),1,0)+if(TR.AssetTurnover(Period=FY0)>TR.AssetTurnover(Period=FY-1),1,0)")
df.columns = ['Instrument', 'Piotroski F-Score']
df

The output is:

1671698596926.png


1671698596926.png (21.5 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
14.9k 32 5 10

hi @alekseenkova.marina ,

The moderators on this forum do not have deep expertise in every type of content available through Refinitiv products. Such expertise is available through Refinitiv Helpdesk. If the Helpdesk can show you how to retrieve it using =@TR formula in Eikon Excel, then the moderators on this forum can help you translate it into get_data method in Eikon Data API call. Refinitiv Helpdesk can be reached via MyRefinitiv and you may request from them the data you would like to get.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Yes, it could be retrieved via Formula Builder.

=TR("","if(TR.NetIncome(Period=FY0)>0,1,0)+if(TR.CashFromOperatingAct(Period=FY0)>0,1,0)+if(TR.ROAActValue(Period=FY0)>TR.ROAActValue(Period=FY-1),1,0)+if(TR.CashFromOperatingAct(Period=FY0)>TR.NetIncomeBeforeExtraItems(Period=FY0),1,0)+if(TR.LTDebtToTotalAssetsPct(Period=FY0)>=TR.LTDebtToTotalAssetsPct(Period=FY-1),1,0)+if(TR.CurrentRatio(Period=FY0)>TR.CurrentRatio(Period=FY-1),1,0)+if(TR.SaleIssuanceOfCommon(Period=FY0)>=0,1,0)+if(TR.GrossProfitMarginIndustrialAndUtilityPct(Period=FY0)>=TR.GrossProfitMarginIndustrialAndUtilityPct(Period=FY-1),1,0)+if(TR.AssetTurnover(Period=FY0)>TR.AssetTurnover(Period=FY-1),1,0)/*Piotroski F-Score*/","CH=Fd RH=IN",J15)

Could you please help me transform it to python code?

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.