Skip to content

skfolio/skfolio-estimator-on-optimizer

Pack Severity Fix Versions
skfolio error unsafe, with xpd check --fix --unsafe-fixes skfolio 1.14.4+

skfolio MeanRisk and RiskBudgeting take a prior estimator that produces a joint estimate of returns and covariance.

MeanRisk(mu_estimator=EWMu())
MeanRisk(prior_estimator=EmpiricalPrior(mu_estimator=EWMu()))

Put the moment estimators in EmpiricalPrior and give it to the optimizer. ConvexOptimization is an abstract base class.

Use xpd check --fix --unsafe-fixes to wrap a single mu_estimator or covariance_estimator keyword in prior_estimator=EmpiricalPrior(...) when EmpiricalPrior is imported.

MeanRisk and RiskBudgeting raise TypeError for direct mu_estimator or covariance_estimator keywords. Configure these estimators in a skfolio EmpiricalPrior.

See all rules in the skfolio pack.