Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Int and Boolean Types In Pipeline

Yesterday, we shipped a fix that solved the issue of int and boolean Morningstar fundamentals fields not working in Pipeline. You can now create CustomFactors or use .latest on all float, int, and boolean-typed Morningstar fundamentals fields.

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.

7 responses

Thanks Jamie,

Where would I find a list of all of the int and boolean Morningstar fundamentals fields and their definitiions? And the float ones, too?

Also, what does .latest do? How would I apply it?

Presumably, you are working on adding string codes? Will all of Morningstar fundamentals eventually be compatible with pipeline?

Grant

Do filters work? I can't filter the symbol universe using set_screen!!

@Grant: It sounds like you're looking for the Fundamentals Reference Page. .latest is a shortcut to the Latest CustomFactor. String codes are on our list to implement with Pipeline and yes, we hope to eventually include all of the fundamentals data in pipeline.

@kamran: see the backtest I attached to this post for set_screen examples.

Thanks Jamie, What kind of timeline is planned for the release of the string vars?

Hi Kamran,
I don't have a timeline for when it will be complete, but it's getting closer to the top of the list. Is there a particular field or data set you are interested in?

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,

The use case I have in mind is to be able to do something like Simon illustrates here:

https://www.quantopian.com/posts/equity-long-short

However, rather than doing some/all of the universe selection in before_trading_start the idea would be to have a more logical flow, setting up the universe within pipeline, using the fundamentals database, and then applying additional filters/optimizations within pipeline to the subset of securities. I think this would imply having access to all fundamentals fields within pipeline. Is that the goal?

Then before_trading_start could be used to further refine the security selection/weighting/signal generation, using minute data. This is sorta clunky as things stand today, as I show on https://www.quantopian.com/posts/code-for-getting-minute-data-into-before-trading-start. Since history is not supported in before_trading_start(and I don't think update_universe takes effect within before_trading_start), one has to use the output of pipeline from the prior day, and the corresponding history output from the end of the prior day, tacking on data from the opening minute of the current day.

For example, say I wanted to set up a proxy universe for an index (e.g. Russell 2000 or NASDAQ 100). Within pipeline, I'd make the selection, and then do further refinements/filtering within pipeline, using daily data. These data would flow into before_trading_start where minute data could be applied. Finally, if any minute-by-minute decisions needed to be made, either handle_data or a scheduled function would be used.

Grant

Hi Karen,

I was primarily looking to apply the string filters for security class selection such as:

.filter(fundamentals.share_class_reference.security_type == 'ST00000001') # common stock .filter(~fundamentals.share_class_reference.symbol.contains('_WI')) # drop when-issued

when using get_fundamentals call.

Kamran