<a id="general-examples"></a>

<a id="examples"></a>

# Examples

We recommend starting with [Maximum Sharpe Ratio](https://skfolio.org/auto_examples/mean_risk/plot_1_maximum_sharpe_ratio.html.md#sphx-glr-auto-examples-mean-risk-plot-1-maximum-sharpe-ratio-py)
or [Minimum CVaR](https://skfolio.org/auto_examples/mean_risk/plot_2_minimum_CVaR.html.md#sphx-glr-auto-examples-mean-risk-plot-2-minimum-cvar-py) before moving to more advanced examples.

<div id='sg-tag-list' class='sphx-glr-tag-list'></div><div class="sphx-glr-thumbnails">

</div>

<a id="mean-risk"></a>

## Mean-Risk

Examples using the [`MeanRisk`](https://skfolio.org/generated/skfolio.optimization.MeanRisk.html.md#skfolio.optimization.MeanRisk) optimization.

<div id='sg-tag-list' class='sphx-glr-tag-list'></div><div class="sphx-glr-thumbnails">
<div class="sphx-glr-thumbcontainer" tooltip="This tutorial uses the MeanRisk optimization to find the maximum Sharpe Ratio portfolio.">![](auto_examples/mean_risk/images/thumb/sphx_glr_plot_1_maximum_sharpe_ratio_thumb.png)

[Maximum Sharpe Ratio](https://skfolio.org/auto_examples/mean_risk/plot_1_maximum_sharpe_ratio.html.md)

  <div class="sphx-glr-thumbnail-title">Maximum Sharpe Ratio</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial uses the MeanRisk optimization to find the minimum CVaR (Conditional Value at Risk) portfolio.">![](auto_examples/mean_risk/images/thumb/sphx_glr_plot_2_minimum_CVaR_thumb.png)

[Minimum CVaR](https://skfolio.org/auto_examples/mean_risk/plot_2_minimum_CVaR.html.md)

  <div class="sphx-glr-thumbnail-title">Minimum CVaR</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial uses the MeanRisk optimization to find an ensemble of portfolios belonging to the Mean-Variance efficient frontier (Pareto front).">![](auto_examples/mean_risk/images/thumb/sphx_glr_plot_3_efficient_frontier_thumb.png)

[Efficient Frontier](https://skfolio.org/auto_examples/mean_risk/plot_3_efficient_frontier.html.md)

  <div class="sphx-glr-thumbnail-title">Efficient Frontier</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial uses the MeanRisk optimization to find an ensemble of portfolios belonging to the Mean-Variance-CDaR efficient frontier.">![](auto_examples/mean_risk/images/thumb/sphx_glr_plot_4_mean_variance_cdar_thumb.png)

[Mean-Variance-CDaR Surface](https://skfolio.org/auto_examples/mean_risk/plot_4_mean_variance_cdar.html.md)

  <div class="sphx-glr-thumbnail-title">Mean-Variance-CDaR Surface</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to incorporate weight constraints into the MeanRisk optimization.">![](auto_examples/mean_risk/images/thumb/sphx_glr_plot_5_weight_constraints_thumb.png)

[Weight Constraints](https://skfolio.org/auto_examples/mean_risk/plot_5_weight_constraints.html.md)

  <div class="sphx-glr-thumbnail-title">Weight Constraints</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to incorporate transaction costs (TC) into the MeanRisk optimization.">![](auto_examples/mean_risk/images/thumb/sphx_glr_plot_6_transaction_costs_thumb.png)

[Transaction Costs](https://skfolio.org/auto_examples/mean_risk/plot_6_transaction_costs.html.md)

  <div class="sphx-glr-thumbnail-title">Transaction Costs</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to incorporate management fees (MF) into the MeanRisk optimization.">![](auto_examples/mean_risk/images/thumb/sphx_glr_plot_7_management_fees_thumb.png)

[Management Fees](https://skfolio.org/auto_examples/mean_risk/plot_7_management_fees.html.md)

  <div class="sphx-glr-thumbnail-title">Management Fees</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to incorporate regularization into the MeanRisk optimization.">![](auto_examples/mean_risk/images/thumb/sphx_glr_plot_8_regularization_thumb.png)

[L1 and L2 Regularization](https://skfolio.org/auto_examples/mean_risk/plot_8_regularization.html.md)

  <div class="sphx-glr-thumbnail-title">L1 and L2 Regularization</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to incorporate expected returns uncertainty sets into the MeanRisk optimization.">![](auto_examples/mean_risk/images/thumb/sphx_glr_plot_9_uncertainty_set_thumb.png)

[Uncertainty Set](https://skfolio.org/auto_examples/mean_risk/plot_9_uncertainty_set.html.md)

  <div class="sphx-glr-thumbnail-title">Uncertainty Set</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to incorporate a tracking error constraint into the MeanRisk optimization.">![](auto_examples/mean_risk/images/thumb/sphx_glr_plot_10_tracking_error_thumb.png)

[Tracking Error](https://skfolio.org/auto_examples/mean_risk/plot_10_tracking_error.html.md)

  <div class="sphx-glr-thumbnail-title">Tracking Error</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to use the EmpiricalPrior estimator in the MeanRisk optimization.">![](auto_examples/mean_risk/images/thumb/sphx_glr_plot_11_empirical_prior_thumb.png)

[Empirical Prior](https://skfolio.org/auto_examples/mean_risk/plot_11_empirical_prior.html.md)

  <div class="sphx-glr-thumbnail-title">Empirical Prior</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to use the BlackLitterman estimator in the MeanRisk optimization.">![](auto_examples/mean_risk/images/thumb/sphx_glr_plot_12_black_and_litterman_thumb.png)

[Black & Litterman](https://skfolio.org/auto_examples/mean_risk/plot_12_black_and_litterman.html.md)

  <div class="sphx-glr-thumbnail-title">Black & Litterman</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="skfolio supports time-series factor models through TimeSeriesFactorModel and characteristics-based cross-sectional factor models through CharacteristicsFactorModel.">![](auto_examples/mean_risk/images/thumb/sphx_glr_plot_13_factor_model_thumb.png)

[Time-Series Factor Model](https://skfolio.org/auto_examples/mean_risk/plot_13_factor_model.html.md)

  <div class="sphx-glr-thumbnail-title">Time-Series Factor Model</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to use the TimeSeriesFactorModel estimator coupled with the BlackLitterman estimator in the MeanRisk optimization.">![](auto_examples/mean_risk/images/thumb/sphx_glr_plot_14_black_litterman_factor_model_thumb.png)

[Black & Litterman Factor Model](https://skfolio.org/auto_examples/mean_risk/plot_14_black_litterman_factor_model.html.md)

  <div class="sphx-glr-thumbnail-title">Black & Litterman Factor Model</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to use cardinality constraints with the MeanRisk optimization.">![](auto_examples/mean_risk/images/thumb/sphx_glr_plot_15_mip_cardinality_constraints_thumb.png)

[Cardinality Constraints](https://skfolio.org/auto_examples/mean_risk/plot_15_mip_cardinality_constraints.html.md)

  <div class="sphx-glr-thumbnail-title">Cardinality Constraints</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to use threshold constraints with the MeanRisk optimization.">![](auto_examples/mean_risk/images/thumb/sphx_glr_plot_16_mip_threshold_constraints_thumb.png)

[Threshold Constraints](https://skfolio.org/auto_examples/mean_risk/plot_16_mip_threshold_constraints.html.md)

  <div class="sphx-glr-thumbnail-title">Threshold Constraints</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial introduces the optimization parameters fallback and raise_on_failure.">![](auto_examples/mean_risk/images/thumb/sphx_glr_plot_17_failure_and_fallbacks_thumb.png)

[Failure and Fallbacks](https://skfolio.org/auto_examples/mean_risk/plot_17_failure_and_fallbacks.html.md)

  <div class="sphx-glr-thumbnail-title">Failure and Fallbacks</div>
</div>
</div>

<a id="factor-models"></a>

## Factor Models

Examples about [`CharacteristicsFactorModel`](https://skfolio.org/generated/skfolio.prior.CharacteristicsFactorModel.html.md#skfolio.prior.CharacteristicsFactorModel): building a
characteristics factor model from an [`AssetPanel`](https://skfolio.org/generated/skfolio.containers.AssetPanel.html.md#skfolio.containers.AssetPanel),
diagnosing it, and using it for portfolio construction, attribution and alpha
integration.

<div id='sg-tag-list' class='sphx-glr-tag-list'></div><div class="sphx-glr-thumbnails">
<div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to build a characteristics-based cross-sectional factor model with CharacteristicsFactorModel. The methodology is covered in the Factor Models user guide.">![](auto_examples/factor_models/images/thumb/sphx_glr_plot_characteristics_factor_model_thumb.png)

[Characteristics Factor Model](https://skfolio.org/auto_examples/factor_models/plot_characteristics_factor_model.html.md)

  <div class="sphx-glr-thumbnail-title">Characteristics Factor Model</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to build a dollar-neutral long-short portfolio with factor tilts, using the characteristics-based cross-sectional factor model CharacteristicsFactorModel and the optimizer MeanRisk. The methodology is covered in the Portfolio Construction and Attribution sections of the user guide.">![](auto_examples/factor_models/images/thumb/sphx_glr_plot_factor_constrained_portfolio_thumb.png)

[Factor-Constrained Portfolio and Attribution](https://skfolio.org/auto_examples/factor_models/plot_factor_constrained_portfolio.html.md)

  <div class="sphx-glr-thumbnail-title">Factor-Constrained Portfolio and Attribution</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to research an alpha signal that forecasts the idiosyncratic returns of the characteristics-based cross-sectional factor model CharacteristicsFactorModel, and how to trade it in a factor-neutral long-short portfolio. The methodology is covered in the Alpha Estimators and Portfolio Construction sections of the user guide.">![](auto_examples/factor_models/images/thumb/sphx_glr_plot_alpha_factor_neutral_portfolio_thumb.png)

[Alpha Research and Factor-Neutral Portfolio](https://skfolio.org/auto_examples/factor_models/plot_alpha_factor_neutral_portfolio.html.md)

  <div class="sphx-glr-thumbnail-title">Alpha Research and Factor-Neutral Portfolio</div>
</div>
</div>

<a id="risk-budgeting"></a>

## Risk Budgeting

Examples concerning the [`RiskBudgeting`](https://skfolio.org/generated/skfolio.optimization.RiskBudgeting.html.md#skfolio.optimization.RiskBudgeting) optimization.

<div id='sg-tag-list' class='sphx-glr-tag-list'></div><div class="sphx-glr-thumbnails">
<div class="sphx-glr-thumbcontainer" tooltip="This tutorial uses the RiskBudgeting optimization to find the risk parity portfolio with variance as the risk measure.">![](auto_examples/risk_budgeting/images/thumb/sphx_glr_plot_1_risk_parity_variance_thumb.png)

[Risk Parity - Variance](https://skfolio.org/auto_examples/risk_budgeting/plot_1_risk_parity_variance.html.md)

  <div class="sphx-glr-thumbnail-title">Risk Parity - Variance</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial uses the RiskBudgeting optimization to build a risk budgeting portfolio by specifying a risk budget on each asset with CVaR as the risk measure.">![](auto_examples/risk_budgeting/images/thumb/sphx_glr_plot_2_risk_budgeting_CVaR_thumb.png)

[Risk Budgeting - CVaR](https://skfolio.org/auto_examples/risk_budgeting/plot_2_risk_budgeting_CVaR.html.md)

  <div class="sphx-glr-thumbnail-title">Risk Budgeting - CVaR</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to incorporate covariance shrinkage in the RiskBudgeting optimization.">![](auto_examples/risk_budgeting/images/thumb/sphx_glr_plot_3_risk_parity_ledoit_wolf_thumb.png)

[Risk Parity - Covariance shrinkage](https://skfolio.org/auto_examples/risk_budgeting/plot_3_risk_parity_ledoit_wolf.html.md)

  <div class="sphx-glr-thumbnail-title">Risk Parity - Covariance shrinkage</div>
</div>
</div>

<a id="synthetic-data-stress-test"></a>

## Synthetic Data & Stress Test

Examples about [`SyntheticData`](https://skfolio.org/generated/skfolio.prior.SyntheticData.html.md#skfolio.prior.SyntheticData) and
[`VineCopula`](https://skfolio.org/generated/skfolio.distribution.VineCopula.html.md#skfolio.distribution.VineCopula).

<div id='sg-tag-list' class='sphx-glr-tag-list'></div><div class="sphx-glr-thumbnails">
<div class="sphx-glr-thumbcontainer" tooltip="This tutorial introduces Bivariate Copulas estimators that are the building blocks of VineCopula.">![](auto_examples/synthetic_data/images/thumb/sphx_glr_plot_1_bivariate_copulas_thumb.png)

[Bivariate Copulas](https://skfolio.org/auto_examples/synthetic_data/plot_1_bivariate_copulas.html.md)

  <div class="sphx-glr-thumbnail-title">Bivariate Copulas</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial presents the VineCopula estimator. An introduction to Bivariate Copulas can be found in this previous tutorial.">![](auto_examples/synthetic_data/images/thumb/sphx_glr_plot_2_vine_copula_thumb.png)

[Vine Copula & Stress Test](https://skfolio.org/auto_examples/synthetic_data/plot_2_vine_copula.html.md)

  <div class="sphx-glr-thumbnail-title">Vine Copula & Stress Test</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to bridge scenario generation, factor models and portfolio optimization.">![](auto_examples/synthetic_data/images/thumb/sphx_glr_plot_3_min_CVaR_stressed_factors_thumb.png)

[Minimize CVaR on Stressed Factors](https://skfolio.org/auto_examples/synthetic_data/plot_3_min_CVaR_stressed_factors.html.md)

  <div class="sphx-glr-thumbnail-title">Minimize CVaR on Stressed Factors</div>
</div>
</div>

<a id="entropy-opinion-pooling"></a>

## Entropy & Opinion Pooling

Examples about [`EntropyPooling`](https://skfolio.org/generated/skfolio.prior.EntropyPooling.html.md#skfolio.prior.EntropyPooling) and
[`OpinionPooling`](https://skfolio.org/generated/skfolio.prior.OpinionPooling.html.md#skfolio.prior.OpinionPooling).

<div id='sg-tag-list' class='sphx-glr-tag-list'></div><div class="sphx-glr-thumbnails">
<div class="sphx-glr-thumbcontainer" tooltip="This tutorial introduces the EntropyPooling estimator.">![](auto_examples/entropy_pooling/images/thumb/sphx_glr_plot_1_entropy_pooling_thumb.png)

[Entropy Pooling](https://skfolio.org/auto_examples/entropy_pooling/plot_1_entropy_pooling.html.md)

  <div class="sphx-glr-thumbnail-title">Entropy Pooling</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial introduces the OpinionPooling estimator.">![](auto_examples/entropy_pooling/images/thumb/sphx_glr_plot_2_opinion_pooling_thumb.png)

[Opinion Pooling](https://skfolio.org/auto_examples/entropy_pooling/plot_2_opinion_pooling.html.md)

  <div class="sphx-glr-thumbnail-title">Opinion Pooling</div>
</div>
</div>

<a id="hierarchical-clustering-and-nco"></a>

## Hierarchical Clustering and NCO

Examples concerning hierarchical clustering based optimizations.

<div id='sg-tag-list' class='sphx-glr-tag-list'></div><div class="sphx-glr-thumbnails">
<div class="sphx-glr-thumbcontainer" tooltip="This tutorial introduces the HierarchicalRiskParity optimization.">![](auto_examples/clustering/images/thumb/sphx_glr_plot_1_hrp_cvar_thumb.png)

[Hierarchical Risk Parity - CVaR](https://skfolio.org/auto_examples/clustering/plot_1_hrp_cvar.html.md)

  <div class="sphx-glr-thumbnail-title">Hierarchical Risk Parity - CVaR</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial introduces the HierarchicalEqualRiskContribution optimization.">![](auto_examples/clustering/images/thumb/sphx_glr_plot_2_herc_cdar_thumb.png)

[Hierarchical Equal Risk Contribution - CDaR](https://skfolio.org/auto_examples/clustering/plot_2_herc_cdar.html.md)

  <div class="sphx-glr-thumbnail-title">Hierarchical Equal Risk Contribution - CDaR</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="In this tutorial, we will compare the HierarchicalRiskParity (HRP) optimization with the HierarchicalEqualRiskContribution (HERC) optimization.">![](auto_examples/clustering/images/thumb/sphx_glr_plot_3_hrp_vs_herc_thumb.png)

[HRP vs HERC](https://skfolio.org/auto_examples/clustering/plot_3_hrp_vs_herc.html.md)

  <div class="sphx-glr-thumbnail-title">HRP vs HERC</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial introduces the NestedClustersOptimization optimization.">![](auto_examples/clustering/images/thumb/sphx_glr_plot_4_nco_thumb.png)

[Nested Clusters Optimization](https://skfolio.org/auto_examples/clustering/plot_4_nco.html.md)

  <div class="sphx-glr-thumbnail-title">Nested Clusters Optimization</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="The previous tutorial introduced the NestedClustersOptimization.">![](auto_examples/clustering/images/thumb/sphx_glr_plot_5_nco_grid_search_thumb.png)

[NCO - Combinatorial Purged CV](https://skfolio.org/auto_examples/clustering/plot_5_nco_grid_search.html.md)

  <div class="sphx-glr-thumbnail-title">NCO - Combinatorial Purged CV</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial introduces the SchurComplementary allocation.">![](auto_examples/clustering/images/thumb/sphx_glr_plot_6_schur_thumb.png)

[Schur Complementary Allocation](https://skfolio.org/auto_examples/clustering/plot_6_schur.html.md)

  <div class="sphx-glr-thumbnail-title">Schur Complementary Allocation</div>
</div>
</div>

<a id="maximum-diversification"></a>

## Maximum Diversification

Examples concerning the [`MaximumDiversification`](https://skfolio.org/generated/skfolio.optimization.MaximumDiversification.html.md#skfolio.optimization.MaximumDiversification) optimization.

<div id='sg-tag-list' class='sphx-glr-tag-list'></div><div class="sphx-glr-thumbnails">
<div class="sphx-glr-thumbcontainer" tooltip="This tutorial uses the MaximumDiversification optimization to find the portfolio that maximizes the diversification ratio, which is the ratio of the weighted volatilities over the total volatility.">![](auto_examples/maximum_diversification/images/thumb/sphx_glr_plot_1_maximum_diversification_thumb.png)

[Maximum Diversification](https://skfolio.org/auto_examples/maximum_diversification/plot_1_maximum_diversification.html.md)

  <div class="sphx-glr-thumbnail-title">Maximum Diversification</div>
</div>
</div>

<a id="distributionally-robust-cvar"></a>

## Distributionally Robust CVaR

Examples concerning the [`DistributionallyRobustCVaR`](https://skfolio.org/generated/skfolio.optimization.DistributionallyRobustCVaR.html.md#skfolio.optimization.DistributionallyRobustCVaR) optimization.

<div id='sg-tag-list' class='sphx-glr-tag-list'></div><div class="sphx-glr-thumbnails">
<div class="sphx-glr-thumbcontainer" tooltip="This tutorial introduces the DistributionallyRobustCVaR model.">![](auto_examples/distributionally_robust_cvar/images/thumb/sphx_glr_plot_1_distributionally_robust_cvar_thumb.png)

[Distributionally Robust CVaR](https://skfolio.org/auto_examples/distributionally_robust_cvar/plot_1_distributionally_robust_cvar.html.md)

  <div class="sphx-glr-thumbnail-title">Distributionally Robust CVaR</div>
</div>
</div>

<a id="ensemble-optimizations"></a>

## Ensemble Optimizations

Examples concerning ensemble optimizations.

<div id='sg-tag-list' class='sphx-glr-tag-list'></div><div class="sphx-glr-thumbnails">
<div class="sphx-glr-thumbcontainer" tooltip="This tutorial introduces the StackingOptimization.">![](auto_examples/ensemble/images/thumb/sphx_glr_plot_1_stacking_thumb.png)

[Stacking Optimization](https://skfolio.org/auto_examples/ensemble/plot_1_stacking.html.md)

  <div class="sphx-glr-thumbnail-title">Stacking Optimization</div>
</div>
</div>

<a id="model-selection"></a>

## Model Selection

Model selection is an integral part of portfolio construction and therefore appears in
most examples.

Tutorials using [`WalkForward`](https://skfolio.org/generated/skfolio.model_selection.WalkForward.html.md#skfolio.model_selection.WalkForward):
: * [Custom Pre-selection Using Volumes](https://skfolio.org/auto_examples/pre_selection/plot_3_custom_pre_selection_volumes.html.md#sphx-glr-auto-examples-pre-selection-plot-3-custom-pre-selection-volumes-py)
  * [HRP vs HERC](https://skfolio.org/auto_examples/clustering/plot_3_hrp_vs_herc.html.md#sphx-glr-auto-examples-clustering-plot-3-hrp-vs-herc-py)
  * [L1 and L2 Regularization](https://skfolio.org/auto_examples/mean_risk/plot_8_regularization.html.md#sphx-glr-auto-examples-mean-risk-plot-8-regularization-py)
  * [NCO - Combinatorial Purged CV](https://skfolio.org/auto_examples/clustering/plot_5_nco_grid_search.html.md#sphx-glr-auto-examples-clustering-plot-5-nco-grid-search-py)
  * [Stacking Optimization](https://skfolio.org/auto_examples/ensemble/plot_1_stacking.html.md#sphx-glr-auto-examples-ensemble-plot-1-stacking-py)

Tutorials using [`CombinatorialPurgedCV`](https://skfolio.org/generated/skfolio.model_selection.CombinatorialPurgedCV.html.md#skfolio.model_selection.CombinatorialPurgedCV):
: * [Drop Highly Correlated Assets](https://skfolio.org/auto_examples/pre_selection/plot_1_drop_correlated.html.md#sphx-glr-auto-examples-pre-selection-plot-1-drop-correlated-py)
  * [HRP vs HERC](https://skfolio.org/auto_examples/clustering/plot_3_hrp_vs_herc.html.md#sphx-glr-auto-examples-clustering-plot-3-hrp-vs-herc-py)
  * [NCO - Combinatorial Purged CV](https://skfolio.org/auto_examples/clustering/plot_5_nco_grid_search.html.md#sphx-glr-auto-examples-clustering-plot-5-nco-grid-search-py)

Below are dedicated Model Selection tutorials.

<div id='sg-tag-list' class='sphx-glr-tag-list'></div><div class="sphx-glr-thumbnails">
<div class="sphx-glr-thumbcontainer" tooltip="This tutorial introduces MultipleRandomizedCV, which is based on the &quot;Multiple Randomized Backtests&quot; methodology of Palomar in [1]_. This cross-validation strategy performs a resampling-based evaluation by repeatedly sampling distinct asset subsets (without replacement) and contiguous time windows, then applying an inner walk-forward split to each subsample, capturing both temporal and cross-sectional variability in performance.">![](auto_examples/model_selection/images/thumb/sphx_glr_plot_1_multiple_randomized_cv_thumb.png)

[Multiple Randomized Cross-Validation](https://skfolio.org/auto_examples/model_selection/plot_1_multiple_randomized_cv.html.md)

  <div class="sphx-glr-thumbnail-title">Multiple Randomized Cross-Validation</div>
</div>
</div>

<a id="online-learning"></a>

## Online Learning

Examples demonstrating online covariance evaluation, online hyperparameter
tuning, and online evaluation of portfolio optimization with incremental
estimators.

<div id='sg-tag-list' class='sphx-glr-tag-list'></div><div class="sphx-glr-thumbnails">
<div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to evaluate online covariance estimators with online_covariance_forecast_evaluation.">![](auto_examples/online_learning/images/thumb/sphx_glr_plot_1_online_covariance_forecast_evaluation_thumb.png)

[Online Covariance Forecast Evaluation](https://skfolio.org/auto_examples/online_learning/plot_1_online_covariance_forecast_evaluation.html.md)

  <div class="sphx-glr-thumbnail-title">Online Covariance Forecast Evaluation</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to tune covariance estimator hyperparameters in an online setting using OnlineGridSearch and OnlineRandomizedSearch.">![](auto_examples/online_learning/images/thumb/sphx_glr_plot_2_online_hyperparameter_tuning_thumb.png)

[Online Covariance Hyperparameter Tuning](https://skfolio.org/auto_examples/online_learning/plot_2_online_hyperparameter_tuning.html.md)

  <div class="sphx-glr-thumbnail-title">Online Covariance Hyperparameter Tuning</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to tune a MeanRisk estimator with online search and evaluate it out-of-sample with an online walk-forward procedure.">![](auto_examples/online_learning/images/thumb/sphx_glr_plot_3_online_portfolio_optimization_evaluation_thumb.png)

[Online Evaluation of Portfolio Optimization](https://skfolio.org/auto_examples/online_learning/plot_3_online_portfolio_optimization_evaluation.html.md)

  <div class="sphx-glr-thumbnail-title">Online Evaluation of Portfolio Optimization</div>
</div>
</div>

<a id="pre-selection"></a>

## Pre-selection

Examples of using [pre-selection transformers](https://skfolio.org/user_guide/pre_selection.html.md#pre-selection) with `Pipelines`.

<div id='sg-tag-list' class='sphx-glr-tag-list'></div><div class="sphx-glr-thumbnails">
<div class="sphx-glr-thumbcontainer" tooltip="This tutorial introduces the  pre-selection transformers DropCorrelated to remove highly correlated assets before the optimization.">![](auto_examples/pre_selection/images/thumb/sphx_glr_plot_1_drop_correlated_thumb.png)

[Drop Highly Correlated Assets](https://skfolio.org/auto_examples/pre_selection/plot_1_drop_correlated.html.md)

  <div class="sphx-glr-thumbnail-title">Drop Highly Correlated Assets</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial introduces the pre-selection transformers SelectKExtremes to select the k best or the k worst assets according to a given measure before the optimization.">![](auto_examples/pre_selection/images/thumb/sphx_glr_plot_2_select_best_performers_thumb.png)

[Select Best Performers](https://skfolio.org/auto_examples/pre_selection/plot_2_select_best_performers.html.md)

  <div class="sphx-glr-thumbnail-title">Select Best Performers</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This tutorial demonstrates how to implement a custom pre-selection transformer with metadata-routing, integrate it into a Pipeline, and run walk-forward cross-validation.">![](auto_examples/pre_selection/images/thumb/sphx_glr_plot_3_custom_pre_selection_volumes_thumb.png)

[Custom Pre-selection Using Volumes](https://skfolio.org/auto_examples/pre_selection/plot_3_custom_pre_selection_volumes.html.md)

  <div class="sphx-glr-thumbnail-title">Custom Pre-selection Using Volumes</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="When working with large datasets over long timeframes, we commonly encounter:">![](auto_examples/pre_selection/images/thumb/sphx_glr_plot_4_incomplete_dataset_thumb.png)

[Handling Incomplete Datasets: Inception, Expiry, and Default](https://skfolio.org/auto_examples/pre_selection/plot_4_incomplete_dataset.html.md)

  <div class="sphx-glr-thumbnail-title">Handling Incomplete Datasets: Inception, Expiry, and Default</div>
</div>
</div>

<a id="metadata-routing"></a>

## Metadata Routing

Examples about metadata routing.

<div id='sg-tag-list' class='sphx-glr-tag-list'></div><div class="sphx-glr-thumbnails">
<div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to use metadata routing.">![](auto_examples/metadata_routing/images/thumb/sphx_glr_plot_1_implied_volatility_thumb.png)

[Using Implied Volatility with Metadata Routing](https://skfolio.org/auto_examples/metadata_routing/plot_1_implied_volatility.html.md)

  <div class="sphx-glr-thumbnail-title">Using Implied Volatility with Metadata Routing</div>
</div>
</div>

<a id="data-preparation"></a>

## Data Preparation

Examples about data preparation.

<div id='sg-tag-list' class='sphx-glr-tag-list'></div><div class="sphx-glr-thumbnails">
<div class="sphx-glr-thumbcontainer" tooltip="This tutorial explores the difference between the general procedure using different investment horizons and the simplified procedure as explained in data preparation.">![](auto_examples/data_preparation/images/thumb/sphx_glr_plot_1_investment_horizon_thumb.png)

[Investment Horizon](https://skfolio.org/auto_examples/data_preparation/plot_1_investment_horizon.html.md)

  <div class="sphx-glr-thumbnail-title">Investment Horizon</div>
</div>
</div>

[`Download all examples in Python source code: auto_examples_python.zip`](https://skfolio.org/auto_examples/_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip)

[`Download all examples in Jupyter notebooks: auto_examples_jupyter.zip`](https://skfolio.org/auto_examples/_downloads/6f1e7a639e0699d6164445b55e6c116d/auto_examples_jupyter.zip)

[Gallery generated by Sphinx-Gallery](https://sphinx-gallery.github.io)
