qis.factsheet¶
- qis.factsheet(data, benchmark_prices=None, benchmark=None, reporting_frequency='monthly', time_period=None, kind=None, data_is_returns=False, long_threshold_years=5.0, add_rates_data=False, file_name=None, local_path=None, factsheet_name=None, **kwargs)[source]¶
Render the appropriate qis factsheet across a chosen reporting frequency in a single call.
- Archetype is auto-detected from data (override with kind=):
pd.Series / pd.DataFrame of prices (or returns, if data_is_returns=True) -> multi-asset
PortfolioData -> strategy
MultiPortfolioData -> multi-strategy (pass kind=’strategy_benchmark’ to render the strategy-vs-benchmark report instead)
The reporting frequency (‘daily’/’weekly’/’monthly’/’quarterly’ or a ReportingFrequency) calibrates every rolling window, regression frequency, regime-classification frequency and annualisation consistently, via fetch_default_report_kwargs; long vs short horizon is selected automatically from the reporting span against long_threshold_years.
This is additive: the underlying
generate_*_factsheetfunctions are unchanged and remain the full-control API.- Parameters:
data (Series | DataFrame | PortfolioData | MultiPortfolioData) – prices or returns, PortfolioData, or MultiPortfolioData; drives archetype selection
benchmark_prices (Series | DataFrame | None) – reference prices; required for the strategy (PortfolioData) report
benchmark (str | None) – reference column name on the multi-asset path; defaults to the first column of
datareporting_frequency (str | ReportingFrequency) – ‘daily’, ‘weekly’, ‘monthly’, ‘quarterly’, or a ReportingFrequency
time_period (TimePeriod | None) – reporting span; defaults to the full history of
datakind (str | None) – force an archetype identifier; None auto-detects from the type of
datadata_is_returns (bool) – treat
dataandbenchmark_pricesas returns and compound them to navslong_threshold_years (float) – spans of at least this length use the long-horizon preset
add_rates_data (bool) – download the risk-free rate for the excess-return statistics; needs the [data] extra
file_name (str | None) – write the report to a PDF of this name and return its path; without it the figures are returned
local_path (str | None) – directory for the PDF; ignored when
file_nameis Nonefactsheet_name (str | None) – report title, mapped to
backtest_namefor the multi-portfolio reports**kwargs – forwarded to the underlying generator; caller values override the preset
- Returns:
the PDF path when
file_nameis given, otherwise the list of figures- Return type: