You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to calculate PE ratio for some tickers and to get the most accurate result I need to base the PE off of the diluted EPS. However the python client only gives me basic EPS which gets me close, but not perfectly accurate results. The REST API has a diluted EPS field so I assumed it would be present.
Are there any plans on adding support for diluted EPS in the Python client?
The text was updated successfully, but these errors were encountered:
You should be able to just run pip install -U polygon-api-client to get the latest update.
Here's an example for fetching diluted_earnings_per_share and net_income_loss:
from polygon import RESTClient
client = RESTClient() # POLYGON_API_KEY environment variable is used
financials = []
for f in client.vx.list_stock_financials("AAPL", filing_date="2024-11-01"):
financials.append(f)
# get diluted_earnings_per_share
print(f.financials.income_statement.diluted_earnings_per_share)
# get net_income_loss
print(f.financials.income_statement.net_income_loss)
I am trying to calculate PE ratio for some tickers and to get the most accurate result I need to base the PE off of the diluted EPS. However the python client only gives me basic EPS which gets me close, but not perfectly accurate results. The REST API has a diluted EPS field so I assumed it would be present.
Are there any plans on adding support for diluted EPS in the Python client?
The text was updated successfully, but these errors were encountered: