Hi All,
I am new to quantopian. I am finding problem in calculating current percentile score of price to cash flow compared to its 5 year historical value. I have used following code in the 'customfactor'.
class PCFPecentile(CustomFactor):
inputs = [morningstar.valuation_ratios.pcf_ratio]
window_length = 1250
def compute(self, today, assets, out, ratio):
out[:] = stats.percentileofscore(ratio,ratio(1))
Could you please help me figure out my mistake.
Thanks