Hi - I am struggling checking the correlation between a custom factor, WVIX, and stock returns.
Hate to ask, but can someone point me in the right direction in how I can get the correlation calculated? Keep getting an error that my custom factor object is not callable... pretty sure that someone who knows his/her way around notebooks can solve in under 2 mins.
Just starting off playing with notebooks.
class WVIX(CustomFactor):
inputs = [USEquityPricing.high, USEquityPricing.low,USEquityPricing.close]
window_length = 22
def compute(self, today, assets, out, highs, lows, close):
highest_lows = nanmax(lows, axis=0)
highest_close = nanmax(close, axis=0)
lowest_lows = nanmin(lows, axis=0)
out[:] = ((highest_close - lows[0]) / (highest_close))