Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Get fundamentals in notebooks: 500 Server Error INTERNAL SERVER ERROR

I'm trying to get fundamentals for certain stocks, but get an error. It seems that data is available up to 2014-07-04 only, since the error is raised whenever the starting date is after 2014-07-04. Please fix this or tell me how I can fix it.

ticker="INTC"  
fundamentals = init_fundamentals()  
stock_sid = symbols(ticker).sid  
starting_sids = [stock_sid, stock_sid]

fund_panel = get_fundamentals(query(fundamentals.company_reference.sid,  
                            fundamentals.valuation.market_cap,  
                            fundamentals.valuation_ratios.pe_ratio,  
                            fundamentals.valuation_ratios.forward_pe_ratio  
)
.filter(fundamentals.company_reference.sid.in_((starting_sids))),
str('2014-07-08'), '110d')  
fund = fund_panel.to_frame(False)  
fund = fund.reset_index()  
1 response

Thanks for reporting this. I've forwarded the problem along to our engineers. In the meantime, here's a workaround to get the same data:

from quantopian.research import run_pipeline  
from quantopian.pipeline import Pipeline  
from quantopian.pipeline.data import morningstar

def make_pipeline():

    return Pipeline(  
        columns={  
            'market_cap': morningstar.valuation.market_cap.latest,  
            'pe_ratio': morningstar.valuation_ratios.pe_ratio.latest,  
            'forward_pe_ratio': morningstar.valuation_ratios.forward_pe_ratio.latest,  
        }  
    )  

result = run_pipeline(make_pipeline(), start_date='07-01-2014', end_date='07-01-2015')  
result[result.index.get_level_values(1) == 3951]  
Disclaimer

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.