Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Pricing feed - correct values?

Hi,
I am struggling with the pricing feed and get some closes that don't seem plausible.
Example for closing prices for Equity(39495 [SDRL]) :

2018-06-18 00:00:00+00:00     0.409  
2018-06-19 00:00:00+00:00     0.392  
2018-06-20 00:00:00+00:00     0.387  
2018-06-21 00:00:00+00:00     0.350  
2018-06-22 00:00:00+00:00     0.349  
2018-06-25 00:00:00+00:00     0.323  
2018-06-26 00:00:00+00:00     0.319  
2018-06-27 00:00:00+00:00     0.349  
2018-06-28 00:00:00+00:00     0.308  
2018-06-29 00:00:00+00:00     0.204  
2018-07-02 00:00:00+00:00     0.106  
2018-07-03 00:00:00+00:00    18.800  
2018-07-05 00:00:00+00:00       NaN  
2018-07-06 00:00:00+00:00       NaN  
2018-07-09 00:00:00+00:00       NaN  
2018-07-10 00:00:00+00:00       NaN  
2018-07-11 00:00:00+00:00       NaN  
2018-07-12 00:00:00+00:00       NaN  
2018-07-13 00:00:00+00:00       NaN  
2018-07-16 00:00:00+00:00       NaN  
Freq: C, Name: Equity(39495 [SDRL]), dtype: float64  

That price jump from 0.106 to 18.8 simply did not exist according to yahoo. And also, it seems that SDRL is still trading according to yahoo (https://finance.yahoo.com/quote/SDRL/history?period1=1135724400&period2=1565906400&interval=1d&filter=history&frequency=1d). Why is it displayed with NaN values after that enormous price jump?

I am also having problems with other stocks, but I still need to investigate.

What am I doing wrong? And if it is indeed a mistake in the feed. How do you guys deal with such mistakes in the feed?

3 responses

I have another weird one. This one seems to have been liquidated already.
I have dropped all N/As from the price series to show the trading days on which prices are displayed.

Equity(52110 [PETZC])  
2018-06-20 00:00:00+00:00   5.20  
2018-06-22 00:00:00+00:00   4.61  
2018-06-25 00:00:00+00:00   4.58  
2018-08-08 00:00:00+00:00   2.54  
2018-08-09 00:00:00+00:00   2.66  
2018-08-24 00:00:00+00:00   2.65  
2018-08-27 00:00:00+00:00   2.67  
2019-01-17 00:00:00+00:00   99.97  
2019-01-29 00:00:00+00:00   99.97  
2019-02-25 00:00:00+00:00   99.97  

Now I don't understand why only in june and august prices were displayed, an the rest were NaNs. Secondly, why did we have that enormous price jump in 2019 and then again with lots of NaN days in between.

SDRL (Seadrill Limited SID 39495) is an interesting case. The company had publicly traded shares of stock but then went into bankruptcy. It emerged from bankruptcy and, effective 2018-7-3, began trading with the same ticker but a different CUSIP. Quantopian uses CUSIPS as one measure to connect particular equities to companies. Since the CUSIP changed it appeared to be a different equity after 2018-7-3. That is what is causing the nans in pricing. After 2018-7-3 the stock was tracked on Quantopian as SID 52182 but with the same ticker of SDRL. See the Seadrill press release here for more info on the split info.

PETZC (Gabelli Pet Parents’ NextShares SID 52110) is simply a VERY thinly traded ETF. There were no trades on the days with nans . Look at the history in Yahoo . One sees the same data repeated each day with no trading volume. Yahoo forward fills their pricing while Quantopian displays a nan. Generally don't expect any such thinly traded ETFs to have 'correct' trade data. The Yahoo data is even odd. There are price changes with no volume listed while there are sometimes volumes listed but no price change. Much of it has to do with which trades are collected and reported. Low liquidity ETFs especially experience a lot of 'market maker' trades on the primary market which may or may not get recorded the same way as trades on the secondary market. (see https://www.etf.com/etf-education-center/21034-understanding-etf-liquidity.html). Generally exclude such low liquidity equities from ones analysis and certainly backtests. Backtesting these stocks will definitely not, and I repeat, definitely not bear any relationship to real live trading results.

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.

Thanks Dan for the clarification!