Hi,
I am looking to detect if a stock falls below $5 and then return the ticker/id , I can't find a way of search for all prices in the data set.
Apologies if easy solution,
Kr.
Hi,
I am looking to detect if a stock falls below $5 and then return the ticker/id , I can't find a way of search for all prices in the data set.
Apologies if easy solution,
Kr.
Hi John,
You can't search the entire database, only a subset of it, using set_universe described on https://www.quantopian.com/help. Would this work for you? If so, and you have trouble putting together an algorithm, I can provide an example.
Grant
Thanks for the reply,
I've been playing around with your suggestion, I keep getting the error that the error, UniverseExceedsSizeLimit: .
So I am guessing, an algorithm which detects when a share has fallen below $5 is not possible on Quantopian.
John
John,
Please see attached. To find the ticker symbol, you'll need to look it up manually within the Quantopian editor, using the SID.
I suspect you were trying to get access to more of the universe than allowed.
Cheers,
Grant
@John, I'm not sure I fully understand your question. The way you have worded it could mean a couple things.
1) You'd like to track a particular stock and set a flag when the price is under $5 in the backtest.
2) You'd like to track all stocks in the database and get a list of all those under $5 at a certain point in time.
Option 1 is very easy, just use data[stock].price < 5.0
Option 2 is currently not possible as the entire database is about 8000 stocks. The backtester is limited in the number of stocks in can deal with. The exact number depends on whether you are specifying them manually or using set_universe. Also the backtester will accept more stocks simultaneously in daily mode than in minute mode.
At the moment Quantopian doesn't provide a historical stock screener as such.
We don't currently have a stock screener that can do what John is asking, but it's commonly requested and is in our development pipeline. We've been prioritizing getting live market data and live trading done, but then I wouldn't be surprised if stock screening became a very high priority.
Sorry for the temporary inconvenience!
thanks,
Jean
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.