Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
When Will .Open Be Fixed?

I know the USEquitiesPrices.open function is broken and I was just wondering when it would be fixed. I want to get the current price of the entire pipeline database but haven't thought of a work around yet.

Thoughts?

11 responses

You could use the previous day close price, it should do until a fix is provided by Q

Travis - just to be clear - you're looking for the open price specifically, not the current price? Generally, when we talk about "current price" we're talking about the close price of the minute bar.

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.

Dan - At the start of the day I want to analyse the open price of every stock in the Quantopian database to check for gap up or gap down securities. Once I select my gap up stocks I want to create a universe with them and check their price/percentage change periodically throughout the day.

The universe I create can be checked with current_price = data[context.stock].open_price right?

Luca - Thanks for responding, I've already written an algo to check the close price of the previous day. It's useful to get the percentage change but check out the response I gave to dan for more clarity on what I want to do.

I think even if they fix their open bug, it will be yesterday's open, not today's open, since pipeline runs in the early morning.

You would have to access the day's open through history(lookback_days, '1d', 'open_price') I think.
Is that on the fix-list?

Yeah, the real trick here is that for gap strategies, you want to restrict your universe to those stocks which have gapped, which is not possible using pipeline since it runs to early in the morning. Even fetcher doesn't help, since that also runs around midnight or something. The best you can do is pick 500 stocks, then run your gap screen at 9:31am on just those 500 stocks.

If you are just wanting to test out an idea, it would seem possible to use the research platform to create lists of stocks that have gapped at the open, every trading day. Then, you could copy-and-paste those lists into the backtester. As the backtest runs, you could keep your universe updated with the appropriate stocks. There wouldn't be look-ahead bias, since you'd be simulating as if you could run pipeline at the open.

Q support, why not allow data to be written out to a file from the research platform, that could then be read by the backtester?

Going live, though, is another matter. I don't know how it could be done, other than limiting your universe as Simon describes.

Hi all, open price has been fixed for pipeline, so you can now use USEquityPricing.open.

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.

To clarify, that if we run pipeline on 3/23, the open price is from 3/22?

Correct. Pipeline runs before the current trading day begins, so the open price it gives you will be yesterdays open.

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.