Hello, can anybody help me ? In the contest I can only use the sma_buy and sma_sell
How do I add the sma_buy or sma_sell ?? Just add buyOrder = sma_buy
& low_returns and sellOrder = sma_sell & high_returns for example ?
securities_to_trade = ( buyOrder | sellOrder )
sma_10 = SimpleMovingAverage(
inputs=[USEquityPricing.close],
window_length = 10)
ema_30 = ExponentialWeightedMovingAverage(
inputs=[USEquityPricing.close],
window_length=30,
decay_rate=(1 - (2.0 / (1 + 15.0))),
)
sma_buy = sma_10 > ema_30
sma_sell = sma_10 < ema_30
low_returns = recent_returns_zscore.percentile_between(0,20)
high_returns = recent_returns_zscore.percentile_between(80,100)
securities_to_trade = ( low_returns | high_returns )
pipe = Pipeline(
columns={
'recent_returns_zscore': recent_returns_zscore,
},
screen=securities_to_trade
)