Hello, I want to generate sub_weight factor like the following, but get an error.
Is there anyway to achieve this?
Thanks in advance.
def make_pipeline():
sub_weight = 0 if EquityPricing.close.latest < 10 else 0.5
pipeline = Pipeline(
columns={
"sub_weight":sub_weight,
},
)
return pipeline
result = run_pipeline(make_pipeline(), '2018-01-01', '2018-01-01', bundle="sharadar-stk-1d")
print(result)