bayesline.api.equity.AsyncPortfolioReturnsTieoutReportApi#
- class bayesline.api.equity.AsyncPortfolioReturnsTieoutReportApi#
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 async get_maybe_cached(portfolio_names: list[str] | None, start_date: str | date | datetime | None, end_date: str | date | datetime | None, **kwargs: Any) AsyncPortfolioReturnsTieoutReportAccessor | None#
Return the cached tie-out report accessor if one exists.
Parameters#
- portfolio_nameslist[str] | None
The names of the portfolios (hierarchy nodes) to include. If None, all are included.
- start_dateDateLike | None
The start date of the report.
- end_dateDateLike | None
The end date of the report.
- **kwargs: Any
Additional keyword arguments.
Returns#
- AsyncPortfolioReturnsTieoutReportAccessor | None
The cached accessor, or None if the report has not been calculated.
- abstract async calculate(portfolio_names: list[str] | None, start_date: str | date | datetime | None, end_date: str | date | datetime | None, **kwargs: Any) AsyncPortfolioReturnsTieoutReportAccessor#
Calculate the tie-out report.
Parameters#
- portfolio_nameslist[str] | None
The names of the portfolios (hierarchy nodes) to include. If None, all are included.
- start_dateDateLike | None
The start date of the report.
- end_dateDateLike | None
The end date of the report.
- **kwargs: Any
Additional keyword arguments.
Returns#
- AsyncPortfolioReturnsTieoutReportAccessor
The tie-out report accessor.
- 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[AsyncPortfolioReturnsTieoutReportAccessor]#
Calculate the tie-out report as a background task.
Parameters#
- portfolio_nameslist[str] | None
The names of the portfolios (hierarchy nodes) to include. If None, all are included.
- start_dateDateLike | None
The start date of the report.
- end_dateDateLike | None
The end date of the report.
- **kwargs: Any
Additional keyword arguments.
Returns#
- AsyncTask[PortfolioReturnsTieoutReportAccessor]
The task wrapper for the tie-out report accessor.