Hi
I have a CustomFactor which measures price change when Earnings was announced. I have the below:
This line causes an error
prices = close[dt] # this line causes errors!
Any ideas how to fix?
thanks
Rohit
class ReturnSinceAnnouncement(CustomFactor):
window_length = 100
window_safe = True
fq0_eps_act = fe.Actuals.slice('EPS', 'qf', 0)
# Factor for the asof_date
fq0_eps_asof_date = fq0_eps_act.asof_date.latest
# Factor for business days since the asof_date
days_since_release = BusinessDaysSincePreviousEvent(inputs=[fq0_eps_act.asof_date])
inputs = [USEquityPricing.close, fe_fundamentals.sales_qf_asof_date, days_since_release]
def compute(self, today, assets, out, close, earning_date, dt):
prices = close[dt] # this line causes errors!
out[:] = dt[-1]