Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
qis - performance analytics, backtesting, and factsheet reporting
qis - performance analytics, backtesting, and factsheet reporting

Start here

  • Installation
  • Offline quickstart
  • Factsheet gallery

Part I - Foundations

  • Notation and conventions
  • Returns, NAVs, excess returns, fees and leverage
  • Reporting frequency and annualisation
  • Incomplete and mixed-frequency data

Part II - Performance measurement

  • The performance-statistic catalogue
  • Sharpe ratios: conventions and inference
  • Drawdowns and time under water
  • Alpha, beta and benchmark-relative performance
  • Regime-conditional performance
  • The convexity premium and smart diversification

Part III - Estimation

  • Exponentially weighted estimators
  • Covariance, correlation and principal components
  • Serial dependence and autocorrelation
  • Regression and HAC inference
  • Significance tests for factors and backtests
  • Resampling and the bootstrap
  • Private-asset unsmoothing

Part IV - Portfolios

  • Portfolio backtesting
  • Self-financed FX accounting
  • Turnover conventions
  • Risk-adjusted returns and volatility targeting
  • Signal diagnostics: information coefficient and information ratio

Part V - Risk

  • Risk monitoring guide
  • Portfolio risk and Euler contributions
  • Gaussian Monte Carlo VaR
  • Factor risk models
  • Tracking error and risk
  • Portfolio breadth
  • Factor stress testing
    • Factor stress testing
  • Instrument portfolios and stress reports
    • Instrument portfolio valuation and stress reports
  • Stress testing with options

Part VI - Currency returns, hedging and accounting

  • Multi-currency portfolio P&L in Python
  • Return conventions and FX adjustments
  • Self-financed FX accounting
  • FX hedging and market data
  • Reference-currency conversion and excess returns
  • Cash rate timing and FX adjustments
  • Hedged index replication
  • Unhedged index replication

Part VII - Attribution

  • Brinson attribution
  • Model-layer attribution

Reporting guides

  • Factsheets and reporting
  • Factsheet reference

Reference

  • API reference
    • qis.FactorGroupSpec
    • qis.HoldingPayoff
    • qis.InstrumentLeg
    • qis.InstrumentPortfolio
    • qis.InstrumentType
    • qis.KinkPolicy
    • qis.PayoffContext
    • qis.PortfolioHolding
    • qis.PortfolioStressResult
    • qis.PortfolioValuationResult
    • qis.ResponseBasis
    • qis.ScenarioMode
    • qis.ShockConvention
    • qis.StressScenarios
    • qis.StressTestConfig
    • qis.Underlying
    • qis.run_portfolio_stress_test
    • qis.StressReportArtifacts
    • qis.StressReportConfig
    • qis.generate_portfolio_stress_report
    • qis.PortfolioAccounting
    • qis.PositionRole
    • qis.ReportingBasis
    • qis.ResponseProvenance
    • qis.HistorySource
    • qis.ReturnBasis
    • qis.HistoricalScenarioSelection
    • qis.AccountAssetClass
    • qis.PerfParams
    • qis.PerfStat
    • qis.compute_ra_perf_table
    • qis.get_ra_perf_columns
    • qis.compute_asset_returns_dict
    • qis.to_returns
    • qis.returns_to_nav
    • qis.delever_returns
    • qis.implied_leverage
    • qis.interpolate_infrequent_returns
    • qis.SignalDiagnosticsResult
    • qis.estimate_ic_ir
    • qis.estimate_signal_diagnostics
    • qis.TurnoverComputationType
    • qis.compute_turnover
    • qis.SharpeDiffTest
    • qis.sharpe_difference_test
    • qis.compute_sharpe_difference_table
    • qis.plot_sharpe_difference_table
    • qis.FxAccountSpec
    • qis.FxAccountData
    • qis.backtest_fx_account
    • qis.backtest_model_portfolio
    • qis.generate_static_weights_schedule
    • qis.PortfolioData
    • qis.MultiPortfolioData
    • qis.RiskModel
    • qis.FactorsData
    • qis.compute_portfolio_risk_contributions
    • qis.compute_portfolio_risk_contribution_ratios
    • qis.compute_group_portfolio_risk_contribution_ratios
    • qis.EwmLinearModel
    • qis.compute_ewma_realised_tracking_error
    • qis.PortfolioBreadthResult
    • qis.compute_portfolio_breadth
    • qis.FactorScenarioProjection
    • qis.ConditionalScenarioBand
    • qis.FactorSensitivityResult
    • qis.price_target_log_shock
    • qis.return_log_shock
    • qis.duration_log_shock
    • qis.conditional_factor_shock
    • qis.conditional_factor_covariance
    • qis.project_factor_scenarios
    • qis.compute_conditional_scenario_band
    • qis.compute_factor_sensitivity
    • qis.factsheet
    • qis.generate_strategy_factsheet
    • qis.generate_strategy_benchmark_factsheet_plt
    • qis.generate_multi_portfolio_factsheet
    • qis.plot_exposures_strategy_vs_benchmark_stack
    • qis.ReportingFrequency
    • qis.fetch_default_report_kwargs
    • qis.FACTSHEET_CONFIG_DAILY_DATA_SHORT_PERIOD
    • qis.MeanAdjType
    • qis.NanBackfill
    • qis.compute_ewm
    • qis.compute_ewm_vol
    • qis.compute_ewm_trend_slope
    • qis.compute_ewm_covar_tensor
    • qis.compute_ewm_covar_tensor_vol_norm_returns
    • qis.compute_ewm_long_short_filtered_ra_returns
    • qis.compute_masked_covar_corr
    • qis.estimate_rolling_ewma_covar
    • qis.plot_corr_matrix_from_covar
    • qis.FxReturnType
    • qis.FxReturnCoordinate
    • qis.FxCashAccrual
    • qis.FxCashPolicy
    • qis.FxIndexNormalization
    • qis.compute_monthly_cash_index
    • qis.FxAssetReturnsRequest
    • qis.FxCurrencyReturnsRequest
    • qis.FxReturnsData
    • qis.compute_fx_returns
    • qis.FxRatesData
    • qis.load_fx_rates_data
    • qis.get_aligned_fx_spots
    • qis.compute_local_and_fx_return
    • qis.compute_performance_of_local_ccy_asset_in_reference_ccy
    • qis.compute_fx_vol_beta
    • qis.compute_fx_optimal_hedge
    • qis.compute_futures_fx_adjusted_returns
    • qis.compute_cash_fx_adjusted_returns
    • qis.compute_multi_asset_fx_hedging
    • qis.run_asset_fx_hedging_report
    • qis.plot_multi_asset_fx_hedging_report
    • qis.BenchmarkReturnsQuantilesRegime
    • qis.BootstrapType
    • qis.BootstrapOutput
    • qis.generate_bootstrapped_indices
    • qis.bootstrap_data
    • qis.bootstrap_price_data
    • qis.compute_ar_unsmoothed_prices
    • qis.unsmooth_returns_ar1_ewma
    • qis.unsmooth_returns_glm
    • qis.plot_time_series
    • qis.plot_prices
    • qis.plot_prices_with_dd
    • qis.plot_bars
    • qis.plot_scatter
    • qis.plot_classification_scatter
    • qis.plot_heatmap
    • qis.plot_qq
    • qis.plot_df_table
    • qis.df_boxplot_by_classification_var
    • qis.df_boxplot_by_hue_var
    • qis.LegendStats
    • qis.set_suptitle
    • qis.plot_portfolio_breadth_history
    • qis.plot_portfolio_breadth_current_comparison
    • qis.plot_portfolio_breadth_concentration
    • qis.TimePeriod
    • qis.get_time_period
    • qis.get_time_period_label
    • qis.generate_dates_schedule
    • qis.generate_rebalancing_indicators
    • qis.generate_fixed_maturity_rolls
    • qis.find_upto_date_from_datetime_index
    • qis.truncate_prior_to_start
    • qis.get_annualisation_conversion_factor
    • qis.get_annualization_factor
    • qis.infer_annualisation_factor_from_df
    • qis.df_abssum
    • qis.df_abssum_positive
    • qis.df_abssum_negative
    • qis.df_nansum
    • qis.df_nansum_positive
    • qis.df_nansum_negative
    • qis.df_nansum_clip
    • qis.df_nanmean
    • qis.df_nanmean_positive
    • qis.df_nanmean_clip
    • qis.df_nanmedian
    • qis.df_last_row
    • qis.series_nansum_weighted
    • qis.get_group_dict
    • qis.set_group_loadings
    • qis.split_df_by_groups
    • qis.df_to_cross_sectional_score
    • qis.df_to_equal_weight_allocation
    • qis.df_to_long_only_allocation_sum1
    • qis.df_to_weight_allocation_sum1
    • qis.covar_to_corr
    • qis.np_array_to_df_columns
    • qis.fit_multivariate_ols
    • qis.update_kwargs
    • qis.load_df_from_csv
    • qis.load_df_dict_from_csv
    • qis.load_df_from_excel
    • qis.save_df_to_csv
    • qis.save_df_dict_to_csv
    • qis.save_fig
    • qis.save_figs_to_pdf
    • qis.timer
    • qis.get_resource_path
    • qis.AttributionMetric
    • qis.ConvolutionType
    • qis.CorrMatrixOutput
    • qis.CrossXyType
    • qis.DdLegendType
    • qis.DescTableType
    • qis.EnumMap
    • qis.FileTypes
    • qis.InitType
    • qis.PdfType
    • qis.PerfStatsLabels
    • qis.RegimeData
    • qis.ReplacementType
    • qis.ReturnTypes
    • qis.ReturnsTransform
    • qis.RollingPerfStat
    • qis.SharpeConvention
    • qis.SignalAggType
    • qis.SignalDiagnosticsColumns
    • qis.SignalMapType
    • qis.SnapshotPeriod
    • qis.TrendLine
    • qis.UnsmoothingMethod
    • qis.ValueType
    • qis.ColumnData
    • qis.EwmaAlphaBetaHacResult
    • qis.GaussianVarSpec
    • qis.HoldingsAlphaCoverage
    • qis.LinearModel
    • qis.ModelFeatureAlphaBetaAttribution
    • qis.ModelLayerAlphaBetaAttribution
    • qis.ModelLayerCumulativeAlphaAttribution
    • qis.ModelLayerEwmaAlphaAttribution
    • qis.ModelLayerEwmaRegressionAttribution
    • qis.ModelLayerNavs
    • qis.PortfolioInput
    • qis.SmartDiversificationReport
    • qis.StrategySignalData
    • qis.BenchmarkReturnsPositiveNegativeRegime
    • qis.BenchmarkVolsQuantilesRegime
    • qis.ColVar
    • qis.FactsheetConfig
    • qis.GaussianMonteCarlo
    • qis.MultiAssetsReport
    • qis.OutlierPolicy
    • qis.RegimeClassifier
    • qis.add_bnb_regime_shadows
    • qis.adjust_component_navs_to_portfolio
    • qis.adjust_returns_with_ar
    • qis.adjust_returns_with_factor_lag
    • qis.adjust_returns_with_joint_unsmoothing
    • qis.align_weights_to_columns
    • qis.append_df_to_feather
    • qis.append_time_series
    • qis.apply_pca
    • qis.assert_list_subset
    • qis.bfill_timeseries
    • qis.bootstrap_ar_process
    • qis.bootstrap_price_fundamental_data
    • qis.check_df_for_duplicated_columns_index
    • qis.compute_ar1_unsmoothed_prices
    • qis.compute_ar_residuals
    • qis.compute_autocorr_df
    • qis.compute_autocorrelation_at_int_periods
    • qis.compute_avg_max_dd
    • qis.compute_benchmark_drawdown_events
    • qis.compute_benchmark_portfolio_risk_contributions
    • qis.compute_benchmarks_beta_attribution_from_prices
    • qis.compute_benchmarks_beta_attribution_from_returns
    • qis.compute_bnb_regimes_pa_perf_table
    • qis.compute_brinson_attribution_table
    • qis.compute_cvar
    • qis.compute_data_pca_r2
    • qis.compute_desc_freq_table
    • qis.compute_desc_table
    • qis.compute_drawdowns_stats_table
    • qis.compute_eigen_portfolio_weights
    • qis.compute_ewm_alpha_r2_given_prediction
    • qis.compute_ewm_beta_alpha_forecast
    • qis.compute_ewm_corr_df
    • qis.compute_ewm_corr_single
    • qis.compute_ewm_cross_xy
    • qis.compute_ewm_long_short_filter
    • qis.compute_ewm_matrix_autocorr_df
    • qis.compute_ewm_newey_west_vol
    • qis.compute_ewm_ra_returns_momentum
    • qis.compute_ewm_score
    • qis.compute_ewm_sharpe
    • qis.compute_ewm_sharpe_from_prices
    • qis.compute_ewm_std1_norm
    • qis.compute_ewm_vector_autocorr
    • qis.compute_ewm_vector_autocorr_df
    • qis.compute_ewm_xy_beta_tensor
    • qis.compute_excess_return_navs
    • qis.compute_excess_returns
    • qis.compute_gaussian_portfolio_risk
    • qis.compute_ic_timeseries
    • qis.compute_info_ratio_table
    • qis.compute_lookthrough_exposures
    • qis.compute_max_current_drawdown
    • qis.compute_mean_freq_regimes
    • qis.compute_model_feature_alpha_beta_attribution
    • qis.compute_model_layer_alpha_beta_attribution
    • qis.compute_model_layer_cumulative_alpha_after_warmup
    • qis.compute_model_layer_ewma_alpha_attribution
    • qis.compute_model_layer_ewma_regression_attribution
    • qis.compute_model_layer_ewma_sharpe_contributions
    • qis.compute_model_layer_ewma_stage_sharpes
    • qis.compute_model_layer_in_sample_sharpe_contributions
    • qis.compute_model_layer_rolling_ewma_regression_alpha
    • qis.compute_net_navs_ex_perf_man_fees
    • qis.compute_net_return_ex_perf_man_fees
    • qis.compute_num_years
    • qis.compute_one_factor_ewm_betas
    • qis.compute_pa_excess_compounded_returns
    • qis.compute_pa_return
    • qis.compute_pca_r2
    • qis.compute_per_asset_betas
    • qis.compute_performance_table
    • qis.compute_periodic_returns
    • qis.compute_periodic_returns_table
    • qis.compute_portfolio_benchmark_ewm_beta_alpha_attribution
    • qis.compute_portfolio_correlated_var_by_groups
    • qis.compute_portfolio_ewm_benchmark_betas
    • qis.compute_portfolio_independent_var_by_ac
    • qis.compute_portfolio_vol
    • qis.compute_ra_perf_table_with_benchmark
    • qis.compute_ra_returns
    • qis.compute_regime_avg
    • qis.compute_regimes_pa_perf_table_from_sampled_returns
    • qis.compute_returns_dict
    • qis.compute_returns_transform
    • qis.compute_risk_table
    • qis.compute_roll_mean
    • qis.compute_rolling_drawdown_time_under_water
    • qis.compute_rolling_drawdowns
    • qis.compute_rolling_mean_adj
    • qis.compute_rolling_perf_stat
    • qis.compute_rolling_ra_returns
    • qis.compute_sampled_vols
    • qis.compute_sum_freq_ra_returns
    • qis.compute_sum_rolling_ra_returns
    • qis.compute_te_ir_errors
    • qis.compute_total_return
    • qis.compute_unsmoothed_price_panel
    • qis.corr_to_pivot_row
    • qis.create_overlay_portfolio_curve
    • qis.create_rebalancing_indicators_from_freqs
    • qis.df_asfreq
    • qis.df_boxplot_by_columns
    • qis.df_boxplot_by_index
    • qis.df_dict_boxplot_by_classification_var
    • qis.df_dict_boxplot_by_columns
    • qis.df_nanmean_negative
    • qis.df_nanmean_weighted
    • qis.df_to_str
    • qis.estimate_acf_from_path
    • qis.estimate_acf_from_paths
    • qis.estimate_dimson_beta
    • qis.estimate_ewm_factor_model
    • qis.estimate_ewma_alpha_beta_hac
    • qis.estimate_vol
    • qis.ewm_insample_winsorising
    • qis.ewm_xy_convolution
    • qis.fetch_default_perf_params
    • qis.fetch_factsheet_config_kwargs
    • qis.filter_outliers
    • qis.flatten_group_attribution
    • qis.generate_current_signal_report
    • qis.generate_lookthrough_exposures_factsheet
    • qis.generate_multi_asset_factsheet
    • qis.generate_price_history_report
    • qis.generate_strategy_benchmark_active_perf_plt
    • qis.generate_strategy_signal_factsheet_by_instrument
    • qis.generate_weight_change_report
    • qis.get_all_folder_files
    • qis.get_excess_returns_nav
    • qis.get_local_file_path
    • qis.get_nonnan_index
    • qis.get_output_path
    • qis.get_paired_rareturns_signals
    • qis.get_paths
    • qis.get_pdf_path
    • qis.get_time_period_shifted_by_years
    • qis.get_time_to_maturity
    • qis.get_ytd_time_period
    • qis.idx_to_alphabet
    • qis.join_file_name_parts
    • qis.lever_returns
    • qis.load_df_dict_from_excel
    • qis.load_df_dict_from_feather
    • qis.load_df_dict_from_parquet
    • qis.load_df_from_feather
    • qis.load_df_from_parquet
    • qis.log_returns_to_nav
    • qis.long_short_to_relative_nav
    • qis.map_signal_to_weight
    • qis.matrix_regularization
    • qis.melt_scatter_data_with_xvar
    • qis.mult_df_columns_with_vector
    • qis.np_array_to_df_index
    • qis.plot_best_worst_returns
    • qis.plot_box
    • qis.plot_brinson_attribution_table
    • qis.plot_brinson_totals_table
    • qis.plot_clusters
    • qis.plot_contour
    • qis.plot_data_timeseries
    • qis.plot_dendrogram
    • qis.plot_desc_freq_table
    • qis.plot_df_table_with_ci
    • qis.plot_errorbar
    • qis.plot_histogram
    • qis.plot_histplot2d
    • qis.plot_line
    • qis.plot_lines_list
    • qis.plot_model_layer_ewma_return_bridge
    • qis.plot_model_layer_ewma_sharpe_bridge
    • qis.plot_model_layer_in_sample_sharpe_bridge
    • qis.plot_model_layer_rolling_ewma_regression_alpha
    • qis.plot_multivariate_scatter_with_prediction
    • qis.plot_overlay_allocation_frontier
    • qis.plot_periodic_returns_table
    • qis.plot_pie
    • qis.plot_price_history
    • qis.plot_prices_2ax
    • qis.plot_prices_with_fundamentals
    • qis.plot_quantile_class_table
    • qis.plot_ra_perf_annual_matrix
    • qis.plot_ra_perf_bars
    • qis.plot_ra_perf_by_dates
    • qis.plot_ra_perf_scatter
    • qis.plot_ra_perf_table
    • qis.plot_ra_perf_table_benchmark
    • qis.plot_regime_boxplot
    • qis.plot_regime_data
    • qis.plot_regime_pdf
    • qis.plot_returns_corr_matrix_time_series
    • qis.plot_returns_corr_table
    • qis.plot_returns_ewm_corr_table
    • qis.plot_returns_heatmap
    • qis.plot_returns_scatter
    • qis.plot_returns_table
    • qis.plot_rolling_drawdowns
    • qis.plot_rolling_perf_stat
    • qis.plot_rolling_time_under_water
    • qis.plot_scatter_regression
    • qis.plot_signal_diagnostics
    • qis.plot_signal_diagnostics_beta_boxplot
    • qis.plot_signal_diagnostics_boxplot
    • qis.plot_signal_diagnostics_for_returns
    • qis.plot_signal_diagnostics_group_boxplot
    • qis.plot_sorted_periodic_returns
    • qis.plot_stack
    • qis.plot_time_series_2ax
    • qis.plot_top_bottom_performers
    • qis.plot_top_drawdowns_paths
    • qis.plot_vbars
    • qis.plot_xy_qq
    • qis.portfolio_navs_to_additive
    • qis.portfolio_returns_to_nav
    • qis.prediction_r_squared
    • qis.prices_at_freq
    • qis.prices_to_scaled_nav
    • qis.save_df_dict_to_excel
    • qis.save_df_dict_to_feather
    • qis.save_df_dict_to_parquet
    • qis.save_df_to_excel
    • qis.save_df_to_feather
    • qis.save_df_to_parquet
    • qis.save_figs
    • qis.to_factor_returns
    • qis.to_finite_reciprocal
    • qis.to_flat_list
    • qis.to_portfolio_returns
    • qis.to_quarterly_returns
    • qis.to_total_returns
    • qis.to_zero_first_nonnan_returns
    • qis.update_df_in_csv
    • qis.weights_tracking_error_report_by_ac_subac
    • qis.regimes.calibrate_student_t_nu
    • qis.regimes.compute_convexity_premium
    • qis.regimes.compute_gaussian_regime_moments
    • qis.regimes.compute_null_regime_contributions
    • qis.regimes.compute_overlay_blend_frontier
    • qis.regimes.compute_portfolio_bear_sharpe
    • qis.regimes.compute_regime_betas
    • qis.regimes.compute_regime_betas_bootstrap
    • qis.regimes.compute_regime_ewm_avg
    • qis.regimes.compute_regime_ewm_betas
    • qis.regimes.compute_regime_kappa
    • qis.regimes.compute_regime_mixture_covar
    • qis.regimes.compute_regime_mixture_covar_from_sample
    • qis.regimes.compute_regime_null_loadings
    • qis.regimes.compute_regime_premium_bootstrap
    • qis.regimes.compute_regime_premium_table
    • qis.regimes.compute_sample_regime_moments
    • qis.regimes.create_sampled_returns_with_regime_id
    • qis.regimes.get_partition_quantiles
    • qis.regimes.get_regime_ids
    • qis.regimes.get_regime_probabilities
    • qis.plots.derived.regime_premium.plot_regime_beta_profiles
    • qis.plots.derived.regime_premium.plot_regime_sharpe_decomposition
    • qis.utils.quantile_buckets.EmptyQuantileBucketError
    • qis.utils.quantile_buckets.assign_bucket_codes
    • qis.utils.quantile_buckets.classify_quantile_buckets
    • qis.utils.quantile_buckets.compute_bucket_codes
    • qis.utils.quantile_buckets.compute_quantile_edges
    • qis.utils.quantile_buckets.compute_sample_quantiles
    • qis.utils.quantile_buckets.get_quantile_probabilities
  • Bibliography
  • Software design
  • Package comparison
  • Migrating from pyfolio-reloaded
  • Migrating from QuantStats
  • API migration history
  • Documentation standard
  • Sharpe convention summary
  • Reporting-frequency reference
  • Shared plotting arguments
Back to top
View this page

Development documentation; main may be ahead of PyPI. Build version: 6.1.2.

Stable · Latest · Markdown / LLM index

Factsheet gallery¶

Author: Artur Sepp / First recorded: 2026-06-19

Implemented in qis — Quantitative Investment Strategies. Software citation: CITATION.cff.

These previews illustrate four report forms. Choose by the analytical question and the input object; the reporting reference maps each form to its API.

Each preview selects four panels from a complete qis report, using a fixed synthetic sample from 2 January 2018 to 31 December 2025. The instruments represent US equities (SEQ_US), government bonds (SBD_TSY), investment-grade bonds (SBD_IG) and gold (SCM_GLD); SBM_6040 is the synthetic market reference. These are teaching examples of reporting behavior.

The published provenance record identifies the sample, seeds, calculation settings, actual source version and content hashes for the documentation images. The analytics scripts also reproduce the complete reports. Fixed sample dates do not indicate current market performance.

Multi-asset universe¶

Compare instruments with a reference series using cumulative performance, risk-adjusted statistics, rolling risk, drawdowns, correlations and regime-conditioned summaries.

Four synthetic instruments and their reference compared by cumulative performance, monthly statistics, daily drawdowns and monthly correlations

Figure 1. Synthetic investment universe. The equity series has the highest total return in this sample, while gold has the deepest drawdown. Monthly correlations describe co-movement over the whole sample. The table’s maximum drawdown uses month-end observations; the daily drawdown panel can therefore show a deeper trough.

Open full-resolution preview.

Single strategy¶

A portfolio report adds holdings, exposure, turnover, costs and contribution panels to its performance history. Those diagnostics require a portfolio accounting object; a raw price panel alone does not provide them.

Balanced synthetic allocation showing cumulative performance, monthly statistics, daily drawdown and drifting instrument weights

Figure 2. Balanced allocation: 50% equities, 30% government bonds, 10% investment-grade bonds and 10% gold at quarterly rebalancing. Holdings drift between trades, so the monthly weights vary around their targets. The strategy NAV includes trading costs; the reference series does not.

Open full-resolution preview.

Strategy vs. benchmark¶

Compare a strategy portfolio with another portfolio. The full report includes paired rolling alpha and holdings-weighted beta panels; the focused preview below selects performance, statistics, drawdown and turnover. The comparison portfolio is distinct from a reference market series used for regimes and beta.

Balanced and Defensive synthetic allocations compared by cumulative performance, monthly statistics, daily drawdown and rolling turnover

Figure 3. Balanced versus Defensive. The lower-equity Defensive allocation has lower volatility and a shallower drawdown in this sample. Turnover is the rolling sum of 12 monthly observations, using the two-sided convention described in turnover conventions. The optional Brinson attribution appendix is omitted.

Open full-resolution preview.

Multiple strategies¶

Compare portfolio variants on shared performance, risk, turnover and cost panels. Their relative results reflect the supplied portfolios and assumptions; correlation alone does not explain why performance differs.

Balanced, Defensive and Growth synthetic allocations compared by cumulative performance, monthly statistics, daily drawdowns and monthly correlations

Figure 4. Three allocations under the same data, quarterly schedule and trading-cost assumption. Growth has the highest equity weight, return and volatility in this sample. Its high correlation with Balanced does not imply equal risk or an equivalent drawdown path.

Open full-resolution preview.

Build the four report types¶

This independent workflow uses the same fixture, sample, allocations and trading assumptions as the current gallery producer. It renders the four main report forms in memory and closes them. The producer also attaches asset-class labels and exports supporting tables. By default it selects four panels from each report for the readable previews above, preserving the plotted data and displayed statistics. Its full_reports=True option retains the complete reports; the batch instructions include a PNG/PDF export example.

The four synthetic instruments represent US equities, government bonds, investment-grade bonds and gold. Allocation weights below follow that column order. The schedule includes the initial allocation and quarterly rebalancing; units are held between trades, with zero implementation lag and costs of 10 basis points per unit of traded notional. The synthetic market benchmark has no strategy trading-cost deduction. No missing observations are filled.

import matplotlib.pyplot as plt

import qis
from qis.datasets import generate_synthetic_universe

universe = generate_synthetic_universe(
    start='2018-01-02', end='2025-12-31', seed=20260725, apply_quirks=True
)
prices = universe.prices[['SEQ_US', 'SBD_TSY', 'SBD_IG', 'SCM_GLD']]
assert prices.notna().all().all() and (prices > 0).all().all()
benchmark = universe.benchmark_prices
allocations = {
    'Balanced': [0.5, 0.3, 0.1, 0.1],
    'Defensive': [0.2, 0.5, 0.2, 0.1],
    'Growth': [0.7, 0.1, 0.1, 0.1],
}
portfolios = []
for name, weights in allocations.items():
    schedule = qis.generate_static_weights_schedule(
        prices=prices, weights=weights, rebalancing_freq='QE'
    )
    portfolios.append(qis.backtest_model_portfolio(
        prices=prices, weights=schedule, rebalancing_freq=None,
        rebalancing_costs=0.001, weight_implementation_lag=0, ticker=name,
    ))

pair = qis.MultiPortfolioData(
    portfolio_datas=portfolios[:2], benchmark_prices=benchmark
)
multi = qis.MultiPortfolioData(
    portfolio_datas=portfolios, benchmark_prices=benchmark
)
common = dict(reporting_frequency='monthly', add_rates_data=False)
reports = {
    'multi_asset': qis.factsheet(prices, benchmark_prices=benchmark, **common),
    'strategy': qis.factsheet(portfolios[0], benchmark_prices=benchmark, **common),
    'strategy_benchmark': qis.factsheet(
        pair, kind='strategy_benchmark', add_brinson_attribution=False, **common
    ),
    'multi_strategy': qis.factsheet(
        multi, add_group_exposures_and_pnl=False, add_strategy_factsheets=False, **common
    ),
}
assert all(pages for pages in reports.values())
for pages in reports.values():
    for figure in pages:
        assert isinstance(figure, plt.Figure)
        figure.canvas.draw()
        plt.close(figure)

These prices have business-day observations. The monthly long preset uses ME statistics with 12 periods per year, 36-observation risk/beta windows or spans, 12-observation turnover/cost sums, and quarterly regimes. Default performance tables use log-return volatility and zero-rate Sharpe conventions. Refer to the reporting methodology for native-path drawdowns, missing-data limitations and the distinction between spans and windows.

Regenerate the documentation images together¶

The batch instructions describe environment and output-directory setup. From a prepared source export, one command regenerates all registered documentation analytics, including the gallery and model-layer figures:

python -m tools.docs_analytics.run --all --output-dir <new-local-bundle-directory>

Replace the directory placeholder with a new local output directory below AGENT_LOCAL_ROOT, outside OneDrive and the source export. Use the interpreter required by the repository’s AGENTS.md. This command writes a new bundle; it does not overwrite published previews.

Each bundle contains PNGs, supporting CSVs and analytics_manifest.json, which records sample dates, seeds, calculation settings, source/package versions and file hashes. The coverage manifest maps every registered image to its producer. The reproducibility note explains why fixed samples and recorded source state matter.

A new generation timestamp means the implementation was rerun. It does not turn a fixed synthetic sample into recent market data. Review figures at full resolution and at the final page width before publishing them with their provenance.

References¶

  • qis contributors. Gallery producer and analytics coverage manifest.

  • Sepp, A. qis: Performance analytics, portfolio backtesting, risk analysis, and factsheet reporting in Python. Software citation metadata.

Next
Notation and conventions
Previous
Offline quickstart
Copyright © 2026, Artur Sepp
Made with Sphinx and @pradyunsg's Furo
On this page
  • Factsheet gallery
    • Multi-asset universe
    • Single strategy
    • Strategy vs. benchmark
    • Multiple strategies
    • Build the four report types
    • Regenerate the documentation images together
    • References