Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Need help with Pipeline

First, I apologize for my ignorance. Before posting a question I do my best to research it myself, however, my research leaves me with multiple answers.

I am still learning Quantopian, and have started learning pipeline. However, the api help page conflicts with some tutorials I've seen, and even conflicts with the template when creating a new algorithm.

The api help suggests creating an empty pipeline. The tutorial suggests the same, but the template jumps right into creating the pipeline with code.

The api help uses .add
# Register outputs.
pipe.add(sma_10, 'sma_10')
pipe.add(sma_30, 'sma_30')
...whereas the template and tutorial do not make mention of this step.

The api uses '.set_screen' whereas it looks like the tutorial and template screen the data while creating the pipe ex. pipe = pipeline(screens and such)

What is the most up to date way to use pipeline? and which is up-to-date for learning the api help, or the tutorial?

Thank you,

1 response

Hi Addison, thanks for posting. Both ways of creating pipelines are actually correct. The Pipeline tutorial is more recent; in it we decided to encourage the use of keyword arguments to the Pipeline() constructor because it helps reinforce the fact that Pipeline calculations aren't necessarily done in any particular sequence, and that a screen is always applied at the very end, with no effect on the set of equities on which the columns are computed.

So I would definitely encourage you to go with the technique used in the tutorial, though both ways will work. Please let us know if you have any more questions.

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.