def make_pipeline(): fd = Fundamentals() td = TransactionData() sectors = NASDAQSectorCodes() ipos = NASDAQIPO() return Pipeline( columns={ 'marketcap': fd.marketcap, 'liabilities': fd.liabilities, 'revenue': fd.revenue, 'eps': fd.eps, 'rnd': fd.rnd, 'netinc': fd.netinc, 'pe': fd.pe, 'ipoyear': ipos, 'yoy_sales': fd.yoy_sales, 'qoq_earnings': fd.qoq_earnings, 'sector': sectors, # 'filingdate': td.Date, 'sharesownedbeforetransaction': td.sharesownedbeforetransaction, 'transactionshares': td.transactionshares, 'sharesownedfollowingtransaction': td.sharesownedfollowingtransaction, # 'pctSharesBotSld': td.pctSharesBotSld, # 'dDiffInt': td.dDiffInt }, )
def make_pipeline(): rsi = RSI() fd = Fundamentals() sectors = NASDAQSectorCodes() return Pipeline( columns={ 'longs': rsi.top(3), 'shorts': rsi.bottom(3), 'ROE': fd.ROE_ART, # 'CAPEX': fd.CAPEX_MRQ, 'sector': sectors, }, )
def make_pipeline(): """Sets up the pipeline""" dollar_volume = AverageDollarVolume(window_length=20) adv1000 = dollar_volume.top(1000) fd = Fundamentals(mask=adv1000) market_cap = fd.cshoq * fd.prccq # this is how to calculate market cap with Computstat fields book_equity = fd.seqq - fd.PS # this is a quick way to calculate book_equity book_to_price = book_equity / market_cap biggest = market_cap.top(500, mask=adv1000) smallest = market_cap.bottom(500, mask=adv1000) highpb = book_to_price.top(500, mask=adv1000) lowpb = book_to_price.bottom(500, mask=adv1000) momentum = Momentum(mask=adv1000) # momentum high_momentum = momentum.top(500, mask=adv1000) low_momentum = momentum.bottom(500, mask=adv1000) volatility = Volatility(mask=adv1000) highvol = volatility.top(500, mask=adv1000) lowvol = volatility.bottom(500, mask=adv1000) streversal = RSI(window_length=14, mask=adv1000) high_streversal = streversal.top(500, mask=adv1000) low_streversal = streversal.bottom(500, mask=adv1000) universe = biggest | smallest | highpb | lowpb | low_momentum | high_momentum return Pipeline( columns={ 'returns': Returns(window_length=2), # 'market_cap': market_cap, # not needed # 'book_to_price': book_to_price, # not needed 'biggest': biggest, 'smallest': smallest, 'highpb': highpb, 'lowpb': lowpb, # 'momentum': momentum, # not needed 'low_momentum': low_momentum, 'high_momentum': high_momentum, # 'volatility': volatility, # not needed 'highvol': highvol, 'lowvol': lowvol, # 'streversal': streversal, # not needed 'high_streversal': high_streversal, 'low_streversal': low_streversal }, screen=universe)
def make_pipeline(): fd = Fundamentals() sectors = NASDAQSectorCodes() ipos = NASDAQIPO() return Pipeline(columns={ 'marketcap': fd.marketcap, 'liabilities': fd.liabilities, 'revenue': fd.revenue, 'eps': fd.eps, 'rnd': fd.rnd, 'netinc': fd.netinc, 'pe': fd.pe, 'ipoyear': ipos, 'yoy_sales': fd.yoy_sales, 'qoq_earnings': fd.qoq_earnings, 'sector': sectors }, )
def make_pipeline(): fd = Fundamentals() sectors = NASDAQSectorCodes() ipos = NASDAQIPO() return Pipeline( columns={ 'marketcap': fd.marketcap, 'liabilities': fd.liabilities, 'revenue': fd.revenue, 'eps': fd.eps, 'rnd': fd.rnd, 'netinc': fd.netinc, 'pe': fd.pe, 'ipoyear': ipos, 'yoy_sales': fd.yoy_sales, 'qoq_earnings': fd.qoq_earnings, 'sector': sectors, 'fcf': fd.fcf, 'pb': fd.pb, 'assets': fd.assets, 'cor': fd.cor, 'currentratio': fd.currentratio, 'de': fd.de, 'ebitda': fd.ebitda, 'ebt': fd.ebt, 'grossmargin': fd.grossmargin, 'inventory': fd.inventory, 'ncf': fd.ncf, 'netmargin': fd.netmargin, 'opex': fd.opex, 'payables': fd.payables, 'payoutratio': fd.payoutratio, 'receivables': fd.receivables, 'roa': fd.roa, 'roe': fd.roe, 'sgna': fd.sgna, 'taxassets': fd.taxassets, 'taxliabilities': fd.taxliabilities, 'workingcapital': fd.workingcapital, 'capex': fd.capex }, )