Hey all,
I am trying to write a custom factor that uses MorningStar Fundamnetal data, and I am consistantly getting a TypeError. The financial health grade outputs a string, and I am trying to output that string and then add the factor to the universe. When I try explicitly setting the dtype to string, as shown below, I get the error: UnsupportedDataType: FinancialGrade instances with dtype |S0 are not supported. When I do not set it explictly, when I run_pipeline, I get this error:
TypeError: Don't know how to construct AdjustedArray on data of type
does someone know what is going on here?
Code:
class FinancialGrade(CustomFactor):
inputs = [morningstar.asset_classification.financial_health_grade]
window_length = 45
dtype ='|S0'
def compute(self,today,assets,out,volume,grade):
out[:] = grade[-1]