I'd like to be able to add my own parameters to my own CustomFactor, is there a way to do that besides overloading the
__init__ method? and if no, what's the signature of the __init__ method?
I'd like to do something like this:
class MyFactor(CustomFactor):
def __init__(self, argument1, argument2, context):
super(CustomFactor,self).__init__(argument1, argument2)
self.my_reference_to_context = context
def compute(self, today, assets, out, values):
for i in range(out.shape[0]):
out[i] = someFunction(values[:, i], some_parameter=self.my_reference_to_context.some_constant)
Where argument1 and argument2 are the default arguments the __init__ method expects