Dear all,
I am new to Quantopian and I am trying to create a screening to pick up the 50 stocks from the Q500US with the most negative factor: "Cash flow from financing / Market Cap".
Up until now, I managed to draft the following code:
fundamental_df = get_fundamentals(
query(
fundamentals.cash_flow_statement.financing_cash_flow, fundamentals.valuation.market_cap
)
.filter([fundamentals.cash_flow_statement.financing_cash_flow / fundamentals.valuation.market_cap] < 0)
.order_by([fundamentals.cash_flow_statement.financing_cash_flow / fundamentals.valuation.market_cap].asc())
.limit(context.num_stocks)
)
where: num_stocks = 50.
When I run I get an error:
"AttributeError: 'list' object has no attribute 'asc'
.order_by([fundamentals.cash_flow_statement.financing_cash_flow / fundamentals.valuation.market_cap].asc())"
I also need to filter only from Q500US universe but I don't know how to code this part yet.
Can anybody assist in this.
Many thanks for your help...