# skfolio > Python library for portfolio optimization, factor model construction, and risk management, built on top of scikit-learn: create, fine-tune, cross-validate, and stress-test portfolio models. 2026, skfolio developers (BSD License) ## Pages in this subsection - [Examples](https://skfolio.org/auto_examples/index.html.md): Examples and tutorials for skfolio, a Python library for portfolio optimization, factor model construction, and risk management built on top of scikit-learn to create, fine-tune, cross-validate, and stress-test portfolio models. - [Mean-Risk](https://skfolio.org/auto_examples/mean_risk/index.html.md): Examples using the `MeanRisk` optimization. - [NOTE](https://skfolio.org/auto_examples/mean_risk/plot_1_maximum_sharpe_ratio.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/mean_risk/plot_2_minimum_CVaR.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/mean_risk/plot_3_efficient_frontier.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/mean_risk/plot_4_mean_variance_cdar.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/mean_risk/plot_5_weight_constraints.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/mean_risk/plot_6_transaction_costs.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/mean_risk/plot_7_management_fees.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/mean_risk/plot_8_regularization.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/mean_risk/plot_9_uncertainty_set.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/mean_risk/plot_10_tracking_error.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/mean_risk/plot_11_empirical_prior.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/mean_risk/plot_12_black_and_litterman.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/mean_risk/plot_13_factor_model.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/mean_risk/plot_14_black_litterman_factor_model.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/mean_risk/plot_15_mip_cardinality_constraints.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/mean_risk/plot_16_mip_threshold_constraints.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/mean_risk/plot_17_failure_and_fallbacks.html.md): Go to the end - [Factor Models](https://skfolio.org/auto_examples/factor_models/index.html.md): Examples about `CharacteristicsFactorModel`: building a - [NOTE](https://skfolio.org/auto_examples/factor_models/plot_characteristics_factor_model.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/factor_models/plot_factor_constrained_portfolio.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/factor_models/plot_alpha_factor_neutral_portfolio.html.md): Go to the end - [Risk Budgeting](https://skfolio.org/auto_examples/risk_budgeting/index.html.md): Examples concerning the `RiskBudgeting` optimization. - [NOTE](https://skfolio.org/auto_examples/risk_budgeting/plot_1_risk_parity_variance.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/risk_budgeting/plot_2_risk_budgeting_CVaR.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/risk_budgeting/plot_3_risk_parity_ledoit_wolf.html.md): Go to the end - [Synthetic Data & Stress Test](https://skfolio.org/auto_examples/synthetic_data/index.html.md): Examples about `SyntheticData` and - [NOTE](https://skfolio.org/auto_examples/synthetic_data/plot_1_bivariate_copulas.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/synthetic_data/plot_2_vine_copula.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/synthetic_data/plot_3_min_CVaR_stressed_factors.html.md): Go to the end - [Entropy & Opinion Pooling](https://skfolio.org/auto_examples/entropy_pooling/index.html.md): Examples about `EntropyPooling` and - [NOTE](https://skfolio.org/auto_examples/entropy_pooling/plot_1_entropy_pooling.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/entropy_pooling/plot_2_opinion_pooling.html.md): Go to the end - [Hierarchical Clustering and NCO](https://skfolio.org/auto_examples/clustering/index.html.md): Examples concerning hierarchical clustering based optimizations. - [NOTE](https://skfolio.org/auto_examples/clustering/plot_1_hrp_cvar.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/clustering/plot_2_herc_cdar.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/clustering/plot_3_hrp_vs_herc.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/clustering/plot_4_nco.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/clustering/plot_5_nco_grid_search.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/clustering/plot_6_schur.html.md): Go to the end - [Maximum Diversification](https://skfolio.org/auto_examples/maximum_diversification/index.html.md): Examples concerning the `MaximumDiversification` optimization. - [NOTE](https://skfolio.org/auto_examples/maximum_diversification/plot_1_maximum_diversification.html.md): Go to the end - [Distributionally Robust CVaR](https://skfolio.org/auto_examples/distributionally_robust_cvar/index.html.md): Examples concerning the `DistributionallyRobustCVaR` optimization. - [NOTE](https://skfolio.org/auto_examples/distributionally_robust_cvar/plot_1_distributionally_robust_cvar.html.md): Go to the end - [Ensemble Optimizations](https://skfolio.org/auto_examples/ensemble/index.html.md): Examples concerning ensemble optimizations. - [NOTE](https://skfolio.org/auto_examples/ensemble/plot_1_stacking.html.md): Go to the end - [Model Selection](https://skfolio.org/auto_examples/model_selection/index.html.md): Model selection is an integral part of portfolio construction and therefore appears in - [NOTE](https://skfolio.org/auto_examples/model_selection/plot_1_multiple_randomized_cv.html.md): Go to the end - [Online Learning](https://skfolio.org/auto_examples/online_learning/index.html.md): Examples demonstrating online covariance evaluation, online hyperparameter - [NOTE](https://skfolio.org/auto_examples/online_learning/plot_1_online_covariance_forecast_evaluation.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/online_learning/plot_2_online_hyperparameter_tuning.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/online_learning/plot_3_online_portfolio_optimization_evaluation.html.md): Go to the end - [Pre-selection](https://skfolio.org/auto_examples/pre_selection/index.html.md): Examples of using pre-selection transformers with `Pipelines`. - [NOTE](https://skfolio.org/auto_examples/pre_selection/plot_1_drop_correlated.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/pre_selection/plot_2_select_best_performers.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/pre_selection/plot_3_custom_pre_selection_volumes.html.md): Go to the end - [NOTE](https://skfolio.org/auto_examples/pre_selection/plot_4_incomplete_dataset.html.md): Go to the end - [Metadata Routing](https://skfolio.org/auto_examples/metadata_routing/index.html.md): Examples about metadata routing. - [NOTE](https://skfolio.org/auto_examples/metadata_routing/plot_1_implied_volatility.html.md): Go to the end - [Data Preparation](https://skfolio.org/auto_examples/data_preparation/index.html.md): Examples about data preparation. - [NOTE](https://skfolio.org/auto_examples/data_preparation/plot_1_investment_horizon.html.md): Go to the end ## Optional - [Top-level llms.txt](https://skfolio.org/llms.txt): Complete documentation index.