bayesline.api.equity.AsyncPortfolioCoverageReportApi#

class bayesline.api.equity.AsyncPortfolioCoverageReportApi#

API for raw portfolio identifier coverage.

__init__()#

Methods

__init__()

calculate(portfolio_names, start_date, ...)

Triggers the calculation of the report and returns an accessor API.

calculate_as_task(portfolio_names, ...)

get_maybe_cached(portfolio_names, ...)

Get the cached report accessor API if it is available.

to_mermaid()

Get a Mermaid diagram of the report execution graph.

Attributes

settings

The settings used to create this report.

abstract async get_maybe_cached(portfolio_names: list[str] | None, start_date: str | date | datetime | None, end_date: str | date | datetime | None, **kwargs: Any) AsyncPortfolioCoverageReportAccessor | None#

Get the cached report accessor API if it is available.

Parameters#

*args: P.args

The arguments to the report calculation.

**kwargs: P.kwargs

The keyword arguments to the report calculation.

Returns#

T | None

The cached report accessor API, or None if the report is not cached.

abstract async calculate(portfolio_names: list[str] | None, start_date: str | date | datetime | None, end_date: str | date | datetime | None, **kwargs: Any) AsyncPortfolioCoverageReportAccessor#

Triggers the calculation of the report and returns an accessor API.

Parameters#

*args: P.args

The arguments to the report calculation.

**kwargs: P.kwargs

The keyword arguments to the report calculation.

Returns#

T

The accessor API for the report result.

abstract async calculate_as_task(portfolio_names: list[str] | None, start_date: str | date | datetime | None, end_date: str | date | datetime | None, **kwargs: Any) AsyncTask[AsyncPortfolioCoverageReportAccessor]#