Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
How to get a security object (or sid) for a data loaded via fetcher

Say I load data via fetcher from yahoo for a stock that quantopian doesn't have, how do I create a security object so I can place an order for it?

6 responses

Unfortunately, you can't do that yet. It's high on my list of features I want to build soon.

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.

That was quick, thanks. Would be very useful even if the market impact algorithms don't come into play. Actually, is a daily volume figure all that's required for market impact?

@John, I haven't looked at the slippage model closely enough to really comment. But I would guess that volume is a big part of it.

One thing I don't even know if Quantopian is doing with the current slippage model is utilize the bid-ask spread for calculating slippage with low volume securities.

All we need to do trades, really, is price and volume in a time series. We built it at first with just stocks in mind, but then we did Fetcher, and then it was obvious we needed to make the order() command more universal. Very doable, just takes some time. The short explanation is that several parts of Quantopian assume you're trading a known stock, and those parts need to be retrofitted to handle "anything."

Dennis, we do not use bid-ask data, only trade data. There is no doubt that for some low volume securities, the default slippage model will not be sufficient.

is this feature still not possible?

is this feature still not possible for data loaded from local csv by read_csv?
Like this: https://www.quantinsti.com/blog/importing-csv-data-zipline-backtesting/