Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Research platform get_pricing() limits ??? Running into problem loading all daily data for analysis

On the research platform, I am trying to do the following.
Basically I want to load all available EOD pricing data for all stocks, do some statistical analysis on monthly returns
And the kernel keeps crashing.
Is this not allowed/possible?

fund_df = get_fundamentals(query(fundamentals.valuation_ratios.pe_ratio,  
                                 fundamentals.valuation_ratios.ev_to_ebitda,  
                                 fundamentals.valuation_ratios.sales_yield,  
                                 fundamentals.operation_ratios.roic,  
                                 fundamentals.operation_ratios.financial_leverage,  
                                 fundamentals.operation_ratios.revenue_growth,  
                                 fundamentals.asset_classification.morningstar_sector_code)  
                             .order_by(fundamentals.valuation.market_cap)  
                             today)

data=get_pricing(  
    fund_df.T.index,  
    start_date='2002-01-01',  
    end_date = '2015-08-15',  
    frequency='daily'  
)
2 responses

Looks like indeed the kernel crashed because you were requesting too much information. This is asking for all of the daily bars, for thirteen years, and over 8000 securities. That's a lot of data to handle! If you reduce the query, the kernel will be able to handle the load.

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.

Well, I tried a year and it failed

Then I tried getting it month by month and accumulating and that failed as well.

I am trying do a statistical analysis of all possible trades that can generate a profit or loss in a month and then look at the statistical distribution of some fundamental and some technical indicators

How do I do that?