Hi everyone,
I just started working on Quantopian yesterday I'm very new :) I tried making this fundamental filters to long stocks. Even though the code doesn't have error, somehow it's not trading. Please help me find a solution! Thank you!
Hi everyone,
I just started working on Quantopian yesterday I'm very new :) I tried making this fundamental filters to long stocks. Even though the code doesn't have error, somehow it's not trading. Please help me find a solution! Thank you!
The algorithm code seems to be ok. The problem is simply no stocks meet your filter criteria.
It's often a good idea to run a pipeline in a notebook first to see what the data actually looks like. Attached is a notebook with the factors in the algorithm. The resulting pipeline dataframe is then displayed. Note that (for whatever reason) two factors 'roe5_yr_avg' and 'roa5_yr_avg' only return NaNs. This seems to to be an issue with the Morningstar data but maybe look into it more. That is the biggest reason why the algo doesn't select any stocks. However, the 'testing_factor1_filter' (which is 'revenue_growth.top(50)') also limits the results. Basically there are no stocks which meet all the criteria AND are also in the top 50 of revenue growth.
See attached notebook. Good luck.