dau_core.workflows¶
Registrable ccflow workflows over the temporal goldens.
HeroWorkflow is the composable form of
dau_core.hero.run_hero_workflow(): the bar clock, rolling window,
tolerance, and rolled field are configuration; the market stream under
evaluation is the runtime input, a hashable
dau_core.temporal.MarketStream carried in a GenericContext.
The result is the typed dau_core.hero.HeroResult.
Classes¶
The predeclared align -> derive -> bar -> roll pipeline over the |
Module Contents¶
- class dau_core.workflows.HeroWorkflow(/, **data: Any)[source]¶
Bases:
dau_core.models.CheckedMixin,ccflow.CallableModelThe predeclared align -> derive -> bar -> roll pipeline over the temporal goldens, recording the cardinality funnel and stage outputs.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config: ClassVar¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- bar_width: int¶
- roll_window: int¶
- tolerance: int | None = None¶
- roll_value: str = 'close'¶
- model_post_init(_context: object) None[source]¶
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- __call__(context: ccflow.GenericContext[dau_core.temporal.MarketStream]) dau_core.hero.HeroResult[source]¶
This method produces the result for the given context.
Instead of passing the context, one can pass an object that pydantic will try to validate as the context. Additionally, if kwargs are passed instead of the context, it will use these to construct the context.