Skip to content

skfolio

The skfolio pack catches skfolio 1.14 migrations, financial validation leaks, return and weight accounting errors, and optimizer misconfigurations on files that import skfolio.

Rules Safe fix Unsafe fix Manual fix
24 1 12 11
Rule Severity Fix What it finds
removed-in-skfolio error unsafe skfolio 1.0 removed the decay keyword on exponentially weighted moments, the misspelled WalkForward keyword and the old uncertainty set fields.
skfolio-factor-model-class error unsafe The skfolio FactorModel dataclass holds fitted results.
deprecated-in-skfolio error safe skfolio plans to remove its deprecated hierarchical import paths, annualized_factor and non_denominated_sort in 2.0.
skfolio-hierarchical-seriation error unsafe skfolio HRP and Schur configure their clustering through a HierarchicalSeriation estimator.
skfolio-base-hierarchical-check warning unsafe skfolio HRP, HERC and Schur no longer inherit from BaseHierarchicalOptimization.
Rule Severity Fix What it finds
skfolio-shuffled-returns-split warning unsafe A shuffled split can train a skfolio model on returns from after the dates used for testing.
skfolio-preselection-before-split warning none Fitting skfolio asset selection on the full input before splitting can change the assets selected using future returns.
skfolio-fit-on-holdout warning none Fit the portfolio optimizer on the training split, then predict or score on the holdout.
skfolio-sklearn-cross-val-predict warning unsafe scikit-learn's cross_val_predict can reject skfolio financial splitters or convert portfolio predictions to a NumPy array.
skfolio-cpcv-zero-purge info none skfolio defaults purged_size and embargo_size to zero.
Rule Severity Fix What it finds
skfolio-log-returns-in-optimizer warning unsafe skfolio portfolio weights combine asset returns linearly.
skfolio-prices-not-returns warning unsafe The skfolio S&P 500, FTSE 100 and Nasdaq loaders return price levels.
skfolio-weight-drift-uncompounded info unsafe skfolio weight drift changes holdings and period returns.
skfolio-cost-periodicity info none skfolio management fees use the period of each return observation.
skfolio-unchecked-failed-portfolio info none With raise_on_failure=False, skfolio can produce a FailedPortfolio with NaN values and a stored error.
Rule Severity Fix What it finds
skfolio-string-enum-option error unsafe skfolio expects enum members for risk measures and objectives.
skfolio-invalid-convex-bounds error none Contradictory asset weight bounds are infeasible.
skfolio-estimator-on-optimizer error unsafe skfolio MeanRisk and RiskBudgeting take a prior estimator that produces a joint estimate of returns and covariance.
skfolio-missing-fallback-in-cv info none A skfolio convex optimizer can fail on one fold when the constraints or estimated inputs change.
Rule Severity Fix What it finds
skfolio-fit-loop-vs-online info none Repeatedly calling fit resets a skfolio estimator's state.
skfolio-grid-search-vs-online info none scikit-learn GridSearchCV fits each skfolio estimator clone on each fold.
skfolio-metadata-routing-setup info none When a parent passes metadata to a skfolio estimator, the consuming estimator may need an explicit request and the scikit-learn configuration must allow routing.
Rule Severity Fix What it finds
skfolio-panel-inactive-policy error unsafe skfolio AssetPanel distinguishes inactive pairs from missing values for active assets.
skfolio-unseeded-estimator info none Several skfolio estimators draw random samples.