Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Customfactor assign different numbers depending on if asset in list or not

I remember reading a post that used a Customfactor to assign assets in a list a specific number (like 1) and assets not in the list another number (like 0). Now I can't find this post. Can someone help me find it or explain how I could do this?

Thanks!!
A cat lover from Sweden

1 response

What you describe looks more like a filter, not a factor

https://www.quantopian.com/tutorials/pipeline#lesson5

Here is an example: