Back to Community
ETF Pricing Pipeline

I would like to trade ETFs using the Pipeline, however I cannot find a dataset that has the pricing for ETFs. For example,

from quantopian.pipeline.data.builtin import USEquityPricing  

will get me the OHLC of stock/securities, but not ETFs. What import should I use to get the same data, but for ETFs?

Thanks

7 responses

Any security (stock, etf, etn, etc) that's traded on a major US exchange should be in that USEquityPricing data set. Are there any specific ETFs that you haven't been able to get pricing for?

Hi Dan,

I am trying to import 100 ETFs using the symbols() function and the StaticAssets filter, however when I use USEquityPricing.close.latest, for instance, or any CustomFactor that uses such data, I always get NaN for the values. This is not the case, however, when I run the algorithm on the default universe of tradable assets.

Hi Dan,

Never mind, I found out there was an implementation error in my end. Am I correct in concluding, however, that the morningstar.valuation.shares_outstanding library does not contain the number of outstanding shares for ETFs? Where can I pull this information, if possible? I would like to generate a CustomFactor for liquidity for ETFs, specifically Share Turnover, however it seems that without the number of outstanding shares, this would not be possible.

Hmm, not sure what the issue is. Are you sure that those ETFs have inception dates after the dates you are checking? I've never had any problem. Here is a notebook which uses the USEquityPricing data set and the '.latest' method as well as a custom factor. I picked 10 random ETFs. There's high, low, open, close, and volume data for all of them. See attached.

Loading notebook preview...
Notebook previews are currently unavailable.

Hi Dan,

Thanks for following up, turns out it was an error at my end! USEquityPricing does provide the OHLC data about the ETFs I am considering. I have not been able to get the number of outstanding shares, however, as that seems to be provided by morningstar. Am I incorrect in assuming that the number of outstanding shares is a relevant indicator for ETFs, or is it generally more helpful for evaluating securities?

The Morningstar corporate fundamental data covers companies, but does not include data on ETFs. I don't know of a source of that data offhand.

I don't have any insight as to whether outstanding shares is relevant for ETFs. They have a very different share creation mechanism than a regular company, though, so I'd expect it to be a different dynamic than a regular company.

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.

Hi Dan,

Thanks for following up, I did some light reading and figured that was the case as well.