bayesline.api.equity.PortfolioReturnsTieoutReportApi#
- class bayesline.api.equity.PortfolioReturnsTieoutReportApi#
API for a portfolio returns tie-out report.
- __init__()#
Methods
__init__()calculate(portfolio_names, start_date, ...)Calculate the tie-out report.
calculate_as_task(portfolio_names, ...)Calculate the tie-out report as a background task.
get_maybe_cached(portfolio_names, ...)Return the cached tie-out report accessor if one exists.
to_mermaid()Get a Mermaid diagram of the report execution graph.
Attributes
settingsThe settings used to create this report.
- abstract get_maybe_cached(portfolio_names: list[str] | None, start_date: str | date | datetime | None, end_date: str | date | datetime | None, **kwargs: Any) PortfolioReturnsTieoutReportAccessor | None#
Return the cached tie-out report accessor if one exists.
Parameters#
- portfolio_names: list[str] | None
The names of the portfolios (hierarchy nodes) to include. If None, all are included.
- 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#
- PortfolioReturnsTieoutReportAccessor | None
The cached accessor, or None if the report has not been calculated.
- abstract calculate(portfolio_names: list[str] | None, start_date: str | date | datetime | None, end_date: str | date | datetime | None, **kwargs: Any) PortfolioReturnsTieoutReportAccessor#
Calculate the tie-out report.
Parameters#
- portfolio_names: list[str] | None
The names of the portfolios (hierarchy nodes) to include. If None, all are included.
- 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#
- PortfolioReturnsTieoutReportAccessor
The tie-out report accessor.
- abstract calculate_as_task(portfolio_names: list[str] | None, start_date: str | date | datetime | None, end_date: str | date | datetime | None, **kwargs: Any) Task[PortfolioReturnsTieoutReportAccessor]#
Calculate the tie-out report as a background task.
Parameters#
- portfolio_names: list[str] | None
The names of the portfolios (hierarchy nodes) to include. If None, all are included.
- 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[PortfolioReturnsTieoutReportAccessor]
The task wrapper for the tie-out report accessor.