Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Input companies to be filtered by fundamental algorithm

Hello, I am new to Quantopian and I don't know how can I insert a list of 10 specific companies that I want to filter using my algo (the one attached).
Please help,
Daniel

2 responses

Take a look at the built in filters for StaticAssets and StaticSids (see the docs at https://www.quantopian.com/help#built-in-filters).

Start by importing these filters

from quantopian.pipeline.filters import, StaticAssets, StaticSids

I like to define my static list of securities up front in a 'global' constant

# initialize the constant securities one wants to trade  
MY_SECURITIES = symbols('IBM', 'AAPL', 'SPY')

Finally, use the StaticAssets filter to define ones base universe in the pipeline definition

base_universe = StaticAssets(MY_SECURITIES)

Attached is some sample code. Good luck.

Thank you very much!