Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Custom Factor array confusion

I'm trying to make a Custom factor that retrieves the past four quarters of data for a given factor. The problem is I don't understand how to test the values of arrays inside custom factors. Below is my non-working function. How do I make the if statements work with the arrays?

2 responses

Fundamentals have some idiosyncrasies to work around. Maybe take a look at these posts for some ideas
https://www.quantopian.com/posts/eps-ttm
https://www.quantopian.com/posts/trailing-twelve-months-ttm-with-as-of-date

Thanks Dan! That second link is pretty close to what I am trying to do. It helps me understand as well. I appreciate the info