I need to filter down the pipeline based on fundamental data . How do I do that.
I tried but this is not working
def make_pipeline():
till_earnings = BusinessDaysUntilNextEarnings()
dollar_volume = AverageDollarVolume(window_length=30)
high_dollar_volume = dollar_volume.percentile_between(0, 100)
longs = (till_earnings >= 0) & (till_earnings <= 0) & (till_earnings.notnan())
dollar_volume_flag=(dollar_volume>1000000)
current_debt=fundamentals.balance_sheet.current_debt
current_assets=fundamentals.balance_sheet.current_assets
return Pipeline(
columns={
'till_earnings': till_earnings,
'market_cap': mstar.valuation.market_cap.latest,
'pricing': USEquityPricing.close.latest,
'longs': longs,
'dollar_volume': dollar_volume,
'current_assets':current_assets
},
screen=( longs & Q500US() & high_dollar_volume & dollar_volume_flag )
)