Back to Community
Getting error when trying to access EPS information

I am trying to get EPS information from the fundamentals and for some reason getting an error. I have other criteria extracting data successfully from the Fundamentals so not sure where I am getting the EPS wrong.

I am specifically trying to use basic_eps from

In my code (Notebook) this line is the one causing the problem:

basic_eps = Fundamentals.basic_eps.latest  

This is the fragment of the error that contains the issue:

---> 12     basic_eps = Fundamentals.basic_eps.latest  

AttributeError: type object 'Fundamentals' has no attribute 'basic_eps'  

Am I using the wrong attribute for EPS?

3 responses

Verified that error and these also:

Although some of these return values:

My       Pipe  
Score    Len     Fundamental  
2.8      82      diluted_eps_other_gains_losses_earnings_reports  
3.3      82      basic_eps_other_gains_losses_earnings_reports  
8.5      254     basic_eps_earnings_reports  
8.5      254     continuing_and_discontinued_basic_eps_earnings_reports  
8.5      254     continuing_and_discontinued_diluted_eps_earnings_reports  
8.5      254     diluted_eps_earnings_reports  
8.6      254     normalized_diluted_eps_earnings_reports  
8.6      254     normalized_basic_eps_earnings_reports  
8.6      254     tax_loss_carryforward_basic_eps_earnings_reports  
n/a        4     tax_loss_carryforward_diluted_eps_earnings_reports  

Sorry for the confusion. It looks like there are indeed a few typos in the fundamentals reference page. Blue Seahawk listed the correct fields. @Joseph, you should be able to access basic eps numbers from Fundamentals.basic_eps_earnings_reports.latest. We'll have to fix the documentation.


The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

Is Morningstar adding fundamentals over time?
If so, then if you're reading this at some point in the future, you can use this backtest to find new ones fairly easily.
The fundamentals reference page mentioned 600+ and then lists 900+. The backtest finds 1100+. It could be tedious to keep up with documenting descriptions of new fundamentals, a script using that code could automatically list any new in interim bare form on the page with the day they appeared. Anyway thanks.