Closed svjack closed 3 years ago
the persistence of factor could be implemented in this way:
the reference is: https://github.com/zvtvz/zvt/blob/master/zvt/factors/zen/zen_factor.py
the persistence of factor could be implemented in this way:
- define your factor domain, state(if need)
- set Factor arg need_persist
- implement sedes logic
the reference is: https://github.com/zvtvz/zvt/blob/master/zvt/factors/zen/zen_factor.py
Why can not support pickle ? it report error like following: PicklingError: Can't pickle ...: it's not the same object as... describe in https://stackoverflow.com/questions/1412787/picklingerror-cant-pickle-class-decimal-decimal-its-not-the-same-object Is this object construction have some complex import components ?
@svjack yes. most of the pandas/numpy data type.
the persistence of factor could be implemented in this way:
- define your factor domain, state(if need)
- set Factor arg need_persist
- implement sedes logic
the reference is: https://github.com/zvtvz/zvt/blob/master/zvt/factors/zen/zen_factor.py
Dose mainly persist and load logic of Factor cls is defined in persist_factor and load_factor in Factor class, And all i can do should with the help of them ?
you're right. You could try MaFactor with need_persist ,it's simpler than ZenFacor which using State persistence too.
you're right. You could try MaFactor with need_persist ,it's more simpler than ZenFacor(with State persistence).
What should i do if i want to have a overview of all serialized factors in engine-map level ?
you're right. You could try MaFactor with need_persist ,it's more simpler than ZenFacor(with State persistence).
What should i do if i want to have a overview of all serialized factors in engine-map level ?
not registering them to context yet,maybe latter.
Can you try following code
in init_selectors in MacdDayTrader ?