Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
SMA CROSSOVER PIPELINE HELP PLEASE!

So, I have a couple questions that I can't seem to find answers to.

First, what is the best way to find sma crossovers using the pipeline?

I have been able to accomplish the task but I have only been able to narrow the results with the pipeline and then complete the search in before_trading_start. Ultimately, it still works and it isn't necessarily to slow for my needs the only problem is that it takes hours for me to run a backtest which really slows down my progress. I have tried CustomFactor but still can't figure out exactly how to get the historical data reference I need. (This could be a simple fix I just can't seem to get it working).

Second, I've been reading on the forums that Quantopian has been planning to update the Pipeline to be able to update every minute throughout the day. Does the pipeline currently update daily or each minute?

Specifically, for one of my algorithms I am using crossovers on an intraday time frame. If necessary I can try to narrow this universe in other ways and update intraday, the only problem is again efficiency, and for this it would be even worse. To accomplish this without an updating pipeline the only thing that I can think of is using the pipeline to find intraday SMA's that are close to crossing and update every hour or so. This would be VERY slow. If the pipeline is still updating each day. Does anyone know how I could efficiently find an SMA crossover of for example 10hrs over 5hrs? I'm just having trouble efficiently navigating the Pipeline to its full potential.

Thank you guys so much for your help, the responses I get on the forums are beyond helpful and you all really go out of your way to help so I just want you to know that it is GREATLY appreciated!

Thanks again,
Abby

2 responses

Edit***

I figured out how to scan SMA in the pipeline,

All I am wondering now is how often the Pipeline updates and if it is possible to run the Pipeline through handle_data to get updates every minute if it does not automatically update.

Thanks!

Hello Abby -

I'm glad you got your pipeline working. Next time, I suggest you build your pipeline using Quantopian Research. It is much easier to build and test a pipeline there, and only roll it over into the IDE when you're ready.

The pipeline only runs once per day.

How big of a universe of stocks are you looking at? And how long (how many days or minutes) are your SMA tests? 390 minutes per day times N days times M stocks starts getting into some pretty huge amounts of memory.

I recommend taking a step back and thinking about what stocks you're looking at, and why, and what timeframe of price movement you're trying to cover.

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.