How to exclude trusts/funds stock in pipeline? They paid high dividends that i dont want.
f = Fundamentals
basic = ( # mask
f.is_primary_share # primary_share
& ~f.is_depositary_receipt.latest # not_depositary
& ~f.exchange_id .latest.startswith('OTC') # not_otc
& ~f.symbol .latest.endswith('.WI') # not_wi
& ~f.standard_name .latest.matches('.* L[. ]?P.?$') # not_limited partnership
& f.security_type .latest.eq('ST00000001') # common_stock
& f.market_cap .latest.notnull() # has market_cap
)