Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Pipeline filter on ETF

Hi Guys,

I've been playing around with the Pipeline functionality in Research with an objective to build a momentum strategy solely for ETFs.

One area I seem to be struggling with is being able to filter out non ETF securities.

My approach so far has been to download about 1800 ETFs symbols from etfdb into a CSV and then join against the Pipeline results after the pipeline has been returned with data - which sounds ineffcient.

Also this approach hasn't worked so far as the symbol from morningstar.company_reference.primary_symbol returns 'None' for many of the ETFs - clearly I'm using the wrong field.

Any suggestions on correct approach to filter out before Pipeline returns the data and
on how to pull the Symbol out of Pipeline - for example the index has (2016-08-26 00:00:00+00:00 Equity(2 [AA])

I'm relatively new to Python and Quantopian - attached is the notebook!

Regards Stuart

6 responses

Did you ever figure out how to make an etf only pipeline?

There are no morningstar fundamentals for ETFs. Have you tried screening for securities that lack morningstar fundamentals?

@Viridian are ETFs the only securities lacking morningstar fundamentals?

In case this is still relevant for you: with the help of other community posts I was able to get what I needed, so let me also share back the results.
I'm new to this myself, but was looking for a list of all ETFs with the possibility of name query sorted by age. As I didn't find a good match, I came up with the notebook below - maybe it helps you too.
I left the source references in the code, in case you want to dive deeper.
(Please note the error below QGrid will be gone once the notebook is executed by you)

Nice! I get 2178 "etfs" out of this! Thanks!

Hey folks - depending on what you're trying to do, your best bet for creating an ETF-only universe in pipeline is to use the EquityMetadata dataset. It's one of our newer datasets that is now documented here. Note that the dataset has a 1-year holdout but it is usable in the contest. Attached is a notebook that goes through an example pipeline that creates an ETF filter using EquityMetadata

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.