bayesline.api.equity.WeightsReportApi#
- class bayesline.api.equity.WeightsReportApi#
API for a weights report.
- __init__()#
Methods
__init__()calculate(start_date, end_date, **kwargs)Calculate the weights report.
calculate_as_task(start_date, end_date, **kwargs)Calculate the weights report as a task.
get_maybe_cached(start_date, end_date, **kwargs)Get the cached weights report accessor API if it is available.
to_mermaid()Get a Mermaid diagram of the report execution graph.
Attributes
settingsThe settings used to create this report.
- abstract get_maybe_cached(start_date: str | date | datetime | None, end_date: str | date | datetime | None, **kwargs: Any) WeightsReportAccessor | None#
Get the cached weights report accessor API if it is available.
Parameters#
- start_date: DateLike | None
The start date of the report.
- end_date: DateLike | None
The end date of the report.
- **kwargs: Any
Additional keyword arguments.
Returns#
- WeightsReportAccessor | None
The cached weights report accessor API, or None if not cached.
- abstract calculate(start_date: str | date | datetime | None, end_date: str | date | datetime | None, **kwargs: Any) WeightsReportAccessor#
Calculate the weights report.
Parameters#
- start_date: DateLike | None
The start date of the report.
- end_date: DateLike | None
The end date of the report.
- **kwargs: Any
Additional keyword arguments.
Returns#
- WeightsReportAccessor
The weights report accessor.
- abstract calculate_as_task(start_date: str | date | datetime | None, end_date: str | date | datetime | None, **kwargs: Any) Task[WeightsReportAccessor]#
Calculate the weights report as a task.
Parameters#
- start_date: DateLike | None
The start date of the report.
- end_date: DateLike | None
The end date of the report.
- **kwargs: Any
Additional keyword arguments.
Returns#
- Task[WeightsReportAccessor]
The task for the weights report.