Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
SID not found in pipe

I am trying to filter out a securities by SID from the dataframe some reason I am not able to filter few of the securities. I am not sure why they work for some SID's and not for other.

result[result['sids'] == 351] # don't work
result[result['sids'] == 25766] # works

Is there something I need to do to hold all the securities in data frame.

3 responses

Hello,

It looks like the filter is working correctly but the pipeline result simply doesn't have any rows for sid 351. It's possible that it didn't pass your close price filters.

Does this help?

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.

Jamie is exactly correct. SID 351 is getting filtered out by the statement

lowest_lows=results[results.low_5 <= results.low_250]  
result = lowest_lows.reset_index()

Change the '<=' to ' >='. Then rerun the cell. SID now shows up.

Thanks Jamie and Dan. It works now.