Just had a look at my transaction log and noticed some unwanted stocks slipping through.
I tried using two filters to find stocks with positive cash flow
1. (valuation.enterprise / cash_flow_statement.free_cash_flow) to calculate ev/fcf
2. free_cash_flow > 0
RAIL was purchased in may of this year and was free cash flow negative for most recent quarter and on an annual/ttm basis.
Here is a copy of my code (query includes free cash flow and ev)
.filter(fundamentals.income_statement.ebitda > 0) # Positive EBITDA
.filter(fundamentals.cash_flow_statement.free_cash_flow > 0) # Positive FCF
.filter(fundamentals.valuation_ratios.ev_to_ebitda < 10) # < 10 EV/EBITDA
.filter((fundamentals.valuation.enterprise_value / fundamentals.cash_flow_statement.free_cash_flow) < 10) # < 10 EV/FCF
Pretty confused as all the other filters worked properly.