Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Missing data on Q?

Hi,

I'm testing a proprietary signal I've uploaded using "Self Serve" data utility.
The data has been formatted in a .CSV file and has been correctly loaded.

Now I need to retrieve pricing infos about many stocks, and some seems missing.

For instance, running this cell on the notebook:

start = "2014-10-20"  
end = "2014-11-1"  
prices = get_pricing("AA", start_date=start, end_date=end, fields="price")  
prices

yields the following output

2014-10-20 00:00:00+00:00   NaN  
2014-10-21 00:00:00+00:00   NaN  
2014-10-22 00:00:00+00:00   NaN  
2014-10-23 00:00:00+00:00   NaN  
2014-10-24 00:00:00+00:00   NaN  
2014-10-27 00:00:00+00:00   NaN  
2014-10-28 00:00:00+00:00   NaN  
2014-10-29 00:00:00+00:00   NaN  
2014-10-30 00:00:00+00:00   NaN  
2014-10-31 00:00:00+00:00   NaN  
Freq: C, Name: Equity(50428 [AA]), dtype: float64  
2 responses
start = "2017-10-2"  
end = "2017-11-3"  
prices = get_pricing("AA", start_date=start, end_date=end, fields="price",frequency='daily')  
prices  

switching dates to 2017, returns prices correctly, how is that?

2017-10-02 00:00:00+00:00    47.650  
2017-10-03 00:00:00+00:00    48.300  
2017-10-04 00:00:00+00:00    47.910  
2017-10-05 00:00:00+00:00    48.250  
2017-10-06 00:00:00+00:00    47.500  
2017-10-09 00:00:00+00:00    47.050  
2017-10-10 00:00:00+00:00    46.890  
2017-10-11 00:00:00+00:00    46.940  
2017-10-12 00:00:00+00:00    47.520  
2017-10-13 00:00:00+00:00    47.700  
2017-10-16 00:00:00+00:00    48.235  
2017-10-17 00:00:00+00:00    47.750  
2017-10-18 00:00:00+00:00    47.740  
2017-10-19 00:00:00+00:00    46.530  
2017-10-20 00:00:00+00:00    47.940  
2017-10-23 00:00:00+00:00    47.920  
2017-10-24 00:00:00+00:00    50.080  
2017-10-25 00:00:00+00:00    49.520  
2017-10-26 00:00:00+00:00    49.170  
2017-10-27 00:00:00+00:00    47.915  
2017-10-30 00:00:00+00:00    47.410  
2017-10-31 00:00:00+00:00    47.770  
2017-11-01 00:00:00+00:00    47.710  
2017-11-02 00:00:00+00:00    47.460  
2017-11-03 00:00:00+00:00    47.120  
Freq: C, Name: Equity(50428 [AA]), dtype: float64  

Hi Emiliano,

In 2017, Alcoa Inc. (symbol='AA', sid=2) changed its name to Arconic, Inc. and changed its ticker symbol to 'ARNC'. On Quantopian, this asset kept its sid (2). In the same 2017 event, the newly named Arconic, Inc. spun out a new entity and called it Alcoa, Inc. giving it the older ticker, 'AA'. This new asset received a new sid on Quantopian (50428). The asset for which you are querying pricing data is the new Alcoa, Inc. which was only created in 2017. If you want to reference the old Alcoa, Inc. you should specify a symbol_reference_date. The attached code attempts to demonstrate what the assets and prices look like over the event in 2017.

Here's a reference for what happened with Alcoa/Arconic in 2017: https://www.schwabpt.com/public/file/P-9765482/SPT013688.pdf

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.