Back to Community
Pipeline vs get_fundamentals

I've been going through several examples, but I can't seem to find what benefits are there with the new pipeline API. The only difference that I see is that you can combine price and fundamental histories to filter out a universe.

Am I missing something?

For example, let's says I wanted to replicated the Magic Formula. Which one should I use? There is already an implementation with get_fundamentals here:

https://www.quantopian.com/posts/value-investing-in-quantopian-comparing-the-acquirers-multiple-to-the-magic-formula

Is there any added benefit to convert this to pipeline?

5 responses

Jonathan,
Great question. Both get_fundamentals and the pipeline API allow you to filter your universe using fundamentals data. You are right that at the feature level the pipeline API also allows you use pricing data. It also offers is access to historical fundamentals data.

I think the real benefit of the pipeline API comes from how easy it makes combining factors and ranking and selecting your universe. You can use get_fundamentals to get various fundamentals fields, but if you want to do any calculations with the data, or use it to rank and filter a universe, you are doing the coding in pandas on your own.

The pipeline API makes combining factors and doing calculations easier, but the addition of the .rank(), .top(), .bottom() and mask functionality should make narrowing down to the securities you want to invest in much easier.

You might like this section of the documentation on pipeline, where much of this is explained.

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.

Hi Karen,

Does the pipeline API support strategies using minute data ?

Thanks.

No. The thinking is that you use the least granular data to narrow down the universe and identify the stocks you are interested in. You can then set the universe with the output of your pipeline and get minutely data on the most interesting securities.

In terms of the specifics of the Magic Formula algorithm referenced above, when we implemented it, we did not have access to time series of data for fundamental data. On day 1 of an algo's life, we only had access to the current quarter's worth of data. To compensate, we would "warm up" the algo for the 15 months of simulated time to gain access to multiple quarters' worth of metrics.

If you look closely, the algo stays in cash for 15 months while it accumulates data. That approach isn't reliable or desired in real life. Pipeline solves that problem.

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.

As I mostly implement factors based algorithms, the Pipeline API was a very important step, but - by my point of view - still an incomplete one, until there is a direct way to access to historical fundamentals data on a quarterly or annually timeframe.
I mean, daily timeframe is okay for pricing data, but of course not very useful when it comes to fundamentals or other economics data.

Anyway I'm optimistic, because Quantopian said in this post, that this feature is on their short list:
https://www.quantopian.com/posts/how-to-get-historical-fundamental-data-with-the-pipeline-api#564f4bf44c1eb86fdb0000a5
I can only hope, it will happen soon in a foreseeable future!