Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
problem with GOOG data

When I type the following code

 prices = data.history(sid(46631), ['open','close','price'], 20, '1d')  
 print(prices)  

with test ranges as 03/27/2014 - 06/01/2017 I'm getting

                           close  open  price  
2014-02-27 00:00:00+00:00    NaN   NaN    NaN  
2014-02-28 00:00:00+00:00    NaN   NaN    NaN  
2014-03-03 00:00:00+00:00    NaN   NaN    NaN  
2014-03-04 00:00:00+00:00    NaN   NaN    NaN  
2014-03-05 00:00:00+00:00    NaN   NaN    NaN  
2014-03-06 00:00:00+00:00    NaN   NaN    NaN  
2014-03-07 00:00:00+00:00    NaN   NaN    NaN  
2014-03-10 00:00:00+00:00    NaN   NaN    NaN  
2014-03-11 00:00:00+00:00    NaN   NaN    NaN  
2014-03-12 00:00:00+00:00    NaN   NaN    NaN  
2014-03-13 00:00:00+00:00    NaN   NaN    NaN  
2014-03-14 00:00:00+00:00    NaN   NaN    NaN  
2014-03-17 00:00:00+00:00    NaN   NaN    NaN  
2014-03-18 00:00:00+00:00    NaN   NaN    NaN  
2014-03-19 00:00:00+00:00    NaN   NaN    NaN  
2014-03-20 00:00:00+00:00    NaN   NaN    NaN  
2014-03-21 00:00:00+00:00    NaN   NaN    NaN  
2014-03-24 00:00:00+00:00    NaN   NaN    NaN  
2014-03-25 00:00:00+00:00    NaN   NaN    NaN  
2014-03-26 00:00:00+00:00    NaN   NaN    NaN  

Anyone else having problem with GOOG or other stocks that return all NaNs?

3 responses

Hi Boris,

This happens because there is no pricing data for GOOG until 3/27/2014. On this date, Google changed its symbol to GOOG_L (before GOOG) and payed out special dividends in the form of GOOG shares.

To refer to the "main" company, which started publicly trading back in 2004, you need to use the GOOG_L symbol.

I hope this helps clarify things.

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.

Ernesto,

Both GOOG and GOOG_L are trade-able today.
If there is a bug in GOOG data it should be fixed.

Hi Ernesto

Thank you for the quick response!
Is there a "cleaner" way to solve this issue then than to check every day for the date and switch and GOOG_L stocks to GOOG ones, i.e. sell GOOG_L and buy GOOG?